From 5e7c75a498f0b307a36320d6a9270601c9e49325 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 29 Jun 2024 17:49:10 +1200 Subject: [PATCH 001/253] Disabled honeypot system This system is being a little buggy and will be fixed in the future --- .../Modules/Administration/Honeypot/HoneyPotService.cs | 8 +++++--- .../Modules/Administration/Honeypot/HoneypotCommands.cs | 7 ++++--- .../Modules/Administration/Honeypot/IHoneyPotService.cs | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs index ab0d0f0..8108aad 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs @@ -5,7 +5,7 @@ using EllieBot.Db.Models; using System.Threading.Channels; namespace EllieBot.Modules.Administration.Honeypot; - +/* public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoCommand, IEService { private readonly DbService _db; @@ -71,7 +71,8 @@ public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoC try { Log.Information("Honeypot caught user {User} [{UserId}]", user, user.Id); - await user.BanAsync(); + await user.BanAsync(pruneDays: 1); + await user.Guild.RemoveBanAsync(user.Id); } catch (Exception e) { @@ -91,4 +92,5 @@ public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoC await _punishments.Writer.WriteAsync(sgu); } } -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs index 479e975..9a1f5b3 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs @@ -1,7 +1,7 @@ -using EllieBot.Modules.Administration.Honeypot; +using EllieBot.Modules.Administration.Honeypot; namespace EllieBot.Modules.Administration; - +/* public partial class Administration { [Group] @@ -26,4 +26,5 @@ public partial class Administration await Response().Confirm(strs.honeypot_off).SendAsync(); } } -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs index e6d6c20..c64e7b9 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs @@ -1,6 +1,7 @@ -namespace EllieBot.Modules.Administration.Honeypot; - +namespace EllieBot.Modules.Administration.Honeypot; +/* public interface IHoneyPotService { public Task ToggleHoneypotChannel(ulong guildId, ulong channelId); -} \ No newline at end of file +} +*/ \ No newline at end of file -- 2.43.0 From c5cd772126afd480dea82d80508f3c496d140345 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 29 Jun 2024 17:50:16 +1200 Subject: [PATCH 002/253] Updated Db models --- src/EllieBot/Db/EllieContext.cs | 52 +++++++++---------- src/EllieBot/Db/EllieDbService.cs | 10 ++-- src/EllieBot/Db/LevelStats.cs | 1 + src/EllieBot/Db/Models/DiscordUser.cs | 1 + src/EllieBot/Db/Models/HoneypotChannel.cs | 4 +- .../Db/Models/anti/AntiRaidSetting.cs | 1 + src/EllieBot/Db/Models/support/PatronQuota.cs | 6 +-- 7 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index 8f5c2d8..860e834 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using EllieBot.Db.Models; @@ -149,7 +149,7 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.Cascade); // start antispam - + modelBuilder.Entity() .HasOne(x => x.AntiSpamSetting) .WithOne() @@ -282,10 +282,10 @@ public abstract class EllieContext : DbContext var selfassignableRolesEntity = modelBuilder.Entity(); selfassignableRolesEntity.HasIndex(s => new - { - s.GuildId, - s.RoleId - }) + { + s.GuildId, + s.RoleId + }) .IsUnique(); selfassignableRolesEntity.Property(x => x.Group).HasDefaultValue(0); @@ -358,10 +358,10 @@ public abstract class EllieContext : DbContext var xps = modelBuilder.Entity(); xps.HasIndex(x => new - { - x.UserId, - x.GuildId - }) + { + x.UserId, + x.GuildId + }) .IsUnique(); xps.HasIndex(x => x.UserId); @@ -407,9 +407,9 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.SetNull); ci.HasIndex(x => new - { - x.Name - }) + { + x.Name + }) .IsUnique(); #endregion @@ -528,10 +528,10 @@ public abstract class EllieContext : DbContext .IsUnique(false); rr2.HasIndex(x => new - { - x.MessageId, - x.Emote - }) + { + x.MessageId, + x.Emote + }) .IsUnique(); }); @@ -606,11 +606,11 @@ public abstract class EllieContext : DbContext { // user can own only one of each item x.HasIndex(model => new - { - model.UserId, - model.ItemType, - model.ItemKey - }) + { + model.UserId, + model.ItemType, + model.ItemKey + }) .IsUnique(); }); @@ -635,10 +635,10 @@ public abstract class EllieContext : DbContext #region Sticky Roles modelBuilder.Entity(sr => sr.HasIndex(x => new - { - x.GuildId, - x.UserId - }) + { + x.GuildId, + x.UserId + }) .IsUnique()); #endregion diff --git a/src/EllieBot/Db/EllieDbService.cs b/src/EllieBot/Db/EllieDbService.cs index 2a3382e..52e0bf9 100644 --- a/src/EllieBot/Db/EllieDbService.cs +++ b/src/EllieBot/Db/EllieDbService.cs @@ -4,14 +4,14 @@ using Microsoft.EntityFrameworkCore; namespace EllieBot.Db; -public sealed class EllieDbService : DbService +public sealed class EllieDbService : DbService { private readonly IBotCredsProvider _creds; // these are props because creds can change at runtime private string DbType => _creds.GetCreds().Db.Type.ToLowerInvariant().Trim(); private string ConnString => _creds.GetCreds().Db.ConnectionString; - + public EllieDbService(IBotCredsProvider creds) { LinqToDBForEFTools.Initialize(); @@ -26,13 +26,13 @@ public sealed class EllieDbService : DbService var connString = ConnString; await using var context = CreateRawDbContext(dbType, connString); - + // make sure sqlite db is in wal journal mode if (context is SqliteContext) { await context.Database.ExecuteSqlRawAsync("PRAGMA journal_mode=WAL"); } - + await context.Database.MigrateAsync(); } @@ -52,7 +52,7 @@ public sealed class EllieDbService : DbService throw new NotSupportedException($"The database provide type of '{dbType}' is not supported."); } } - + private EllieContext GetDbContextInternal() { var dbType = DbType; diff --git a/src/EllieBot/Db/LevelStats.cs b/src/EllieBot/Db/LevelStats.cs index 0f3e02c..25a3936 100644 --- a/src/EllieBot/Db/LevelStats.cs +++ b/src/EllieBot/Db/LevelStats.cs @@ -1,4 +1,5 @@ #nullable disable + namespace EllieBot.Db; public readonly struct LevelStats diff --git a/src/EllieBot/Db/Models/DiscordUser.cs b/src/EllieBot/Db/Models/DiscordUser.cs index cae2bb3..69eecb6 100644 --- a/src/EllieBot/Db/Models/DiscordUser.cs +++ b/src/EllieBot/Db/Models/DiscordUser.cs @@ -1,6 +1,7 @@ #nullable disable namespace EllieBot.Db.Models; + // FUTURE remove LastLevelUp from here and UserXpStats public class DiscordUser : DbEntity { diff --git a/src/EllieBot/Db/Models/HoneypotChannel.cs b/src/EllieBot/Db/Models/HoneypotChannel.cs index 418543a..bd074c9 100644 --- a/src/EllieBot/Db/Models/HoneypotChannel.cs +++ b/src/EllieBot/Db/Models/HoneypotChannel.cs @@ -6,6 +6,6 @@ public class HoneypotChannel { [Key] public ulong GuildId { get; set; } - + public ulong ChannelId { get; set; } -} +} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs index 351d194..b5e5f67 100644 --- a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs +++ b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema; namespace EllieBot.Db.Models; + public class AntiRaidSetting : DbEntity { public int GuildConfigId { get; set; } diff --git a/src/EllieBot/Db/Models/support/PatronQuota.cs b/src/EllieBot/Db/Models/support/PatronQuota.cs index 688d005..d493807 100644 --- a/src/EllieBot/Db/Models/support/PatronQuota.cs +++ b/src/EllieBot/Db/Models/support/PatronQuota.cs @@ -6,12 +6,12 @@ public class PatronUser public string UniquePlatformUserId { get; set; } public ulong UserId { get; set; } public int AmountCents { get; set; } - + public DateTime LastCharge { get; set; } - + // Date Only component public DateTime ValidThru { get; set; } - + public PatronUser Clone() => new PatronUser() { -- 2.43.0 From d31cf1bfaeff6b7c3d7a0465300822771b222d8e Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 29 Jun 2024 17:50:59 +1200 Subject: [PATCH 003/253] Updated Administration module --- .../ServerLog/DummyLogCommandService.cs | 2 +- .../ServerLog/ServerLogCommandService.cs | 4 ++-- .../Administration/Ticket/TicketCommands.cs | 14 ++++++++++++++ .../Administration/UserPunish/UserPunishService.cs | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs diff --git a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs index 00576b7..aade00c 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs @@ -3,7 +3,7 @@ namespace EllieBot.Modules.Administration; public sealed class DummyLogCommandService : ILogCommandService -#if GLOBAL_ELLIE +#if GLOBAL_NADEKO , IEService #endif { diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs index 6ea5345..232f90d 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs @@ -8,8 +8,8 @@ using EllieBot.Db.Models; namespace EllieBot.Modules.Administration; public sealed class LogCommandService : ILogCommandService, IReadyExecutor -#if !GLOBAL_ELLIE - , IEService // don't load this service on global ellie +#if !GLOBAL_NADEKO + , IEService // don't load this service on global nadeko #endif { public ConcurrentDictionary GuildLogSettings { get; } diff --git a/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs b/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs new file mode 100644 index 0000000..67f5ca6 --- /dev/null +++ b/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs @@ -0,0 +1,14 @@ +// namespace EllieBot.Modules.Administration; +// +// public partial class Administration +// { +// [Group] +// public partial class TicketCommands : EllieModule +// { +// [Cmd] +// public async Task Ticket() +// { +// +// } +// } +// } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index cdc9900..5847bea 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -228,7 +228,7 @@ public class UserPunishService : IEService, IReadyExecutor case PunishmentAction.RemoveRoles: return botUser.GuildPermissions.ManageRoles; case PunishmentAction.ChatMute: - return botUser.GuildPermissions.ManageRoles; // adds ellie-mute role + return botUser.GuildPermissions.ManageRoles; // adds nadeko-mute role case PunishmentAction.VoiceMute: return botUser.GuildPermissions.MuteMembers; case PunishmentAction.AddRole: -- 2.43.0 From 62319ebb1a21be5d746cb48cbfbc162a946e8d4f Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 29 Jun 2024 17:54:54 +1200 Subject: [PATCH 004/253] Updated changelog and upped version to 5.1.2 --- CHANGELOG.md | 10 ++++++++-- src/EllieBot/EllieBot.csproj | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef2508..d7faabc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,18 +2,24 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o +## [5.1.2] - 29.06.2024 + +### Fixed + +- Compile issues by disabling honeypot submodule for the time being + ## [5.1.1] - 29.06.2024 ### Added -- Added `.honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. +- Added `'honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. - Useful to auto softban bots who spam every channel upon joining - Users who run commands or expressions won't be softbanned. - Users who have ban member permissions are also excluded. ### Fixed -- Fixed `.betdraw` not respecting maxbet +- Fixed `'betdraw` not respecting maxbet - Fixed `'xpshop` pagination for real this time? ## [5.1.0] - 28.06.2024 diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index cef48b0..174d25d 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.1 + 5.1.2 $(MSBuildProjectDirectory) -- 2.43.0 From 56d82a5a26c641b275429f1e16e8375a690d87a3 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 14:27:42 +1200 Subject: [PATCH 005/253] Updated Db models --- src/EllieBot/Db/EllieContext.cs | 50 +++++++++++++++---------------- src/EllieBot/Db/EllieDbService.cs | 10 +++---- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index 860e834..afc50ca 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -149,7 +149,7 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.Cascade); // start antispam - + modelBuilder.Entity() .HasOne(x => x.AntiSpamSetting) .WithOne() @@ -282,10 +282,10 @@ public abstract class EllieContext : DbContext var selfassignableRolesEntity = modelBuilder.Entity(); selfassignableRolesEntity.HasIndex(s => new - { - s.GuildId, - s.RoleId - }) + { + s.GuildId, + s.RoleId + }) .IsUnique(); selfassignableRolesEntity.Property(x => x.Group).HasDefaultValue(0); @@ -358,10 +358,10 @@ public abstract class EllieContext : DbContext var xps = modelBuilder.Entity(); xps.HasIndex(x => new - { - x.UserId, - x.GuildId - }) + { + x.UserId, + x.GuildId + }) .IsUnique(); xps.HasIndex(x => x.UserId); @@ -407,9 +407,9 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.SetNull); ci.HasIndex(x => new - { - x.Name - }) + { + x.Name + }) .IsUnique(); #endregion @@ -528,10 +528,10 @@ public abstract class EllieContext : DbContext .IsUnique(false); rr2.HasIndex(x => new - { - x.MessageId, - x.Emote - }) + { + x.MessageId, + x.Emote + }) .IsUnique(); }); @@ -606,11 +606,11 @@ public abstract class EllieContext : DbContext { // user can own only one of each item x.HasIndex(model => new - { - model.UserId, - model.ItemType, - model.ItemKey - }) + { + model.UserId, + model.ItemType, + model.ItemKey + }) .IsUnique(); }); @@ -635,10 +635,10 @@ public abstract class EllieContext : DbContext #region Sticky Roles modelBuilder.Entity(sr => sr.HasIndex(x => new - { - x.GuildId, - x.UserId - }) + { + x.GuildId, + x.UserId + }) .IsUnique()); #endregion diff --git a/src/EllieBot/Db/EllieDbService.cs b/src/EllieBot/Db/EllieDbService.cs index 52e0bf9..2a3382e 100644 --- a/src/EllieBot/Db/EllieDbService.cs +++ b/src/EllieBot/Db/EllieDbService.cs @@ -4,14 +4,14 @@ using Microsoft.EntityFrameworkCore; namespace EllieBot.Db; -public sealed class EllieDbService : DbService +public sealed class EllieDbService : DbService { private readonly IBotCredsProvider _creds; // these are props because creds can change at runtime private string DbType => _creds.GetCreds().Db.Type.ToLowerInvariant().Trim(); private string ConnString => _creds.GetCreds().Db.ConnectionString; - + public EllieDbService(IBotCredsProvider creds) { LinqToDBForEFTools.Initialize(); @@ -26,13 +26,13 @@ public sealed class EllieDbService : DbService var connString = ConnString; await using var context = CreateRawDbContext(dbType, connString); - + // make sure sqlite db is in wal journal mode if (context is SqliteContext) { await context.Database.ExecuteSqlRawAsync("PRAGMA journal_mode=WAL"); } - + await context.Database.MigrateAsync(); } @@ -52,7 +52,7 @@ public sealed class EllieDbService : DbService throw new NotSupportedException($"The database provide type of '{dbType}' is not supported."); } } - + private EllieContext GetDbContextInternal() { var dbType = DbType; -- 2.43.0 From 30f859b9a0eca5532785689976da1a12ab897d29 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 14:36:27 +1200 Subject: [PATCH 006/253] Updated Db migrations --- .../Mysql/20240627033532_honeypot.Designer.cs | 5416 ++++++++--------- .../Mysql/MysqlContextModelSnapshot.cs | 5416 ++++++++--------- .../20240627033522_honeypot.Designer.cs | 5410 ++++++++-------- .../PostgreSqlContextModelSnapshot.cs | 5410 ++++++++-------- .../20240627033508_honeypot.Designer.cs | 3840 ++++++------ .../Sqlite/EllieSqliteContextModelSnapshot.cs | 3840 ++++++------ 6 files changed, 14666 insertions(+), 14666 deletions(-) diff --git a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs index e54e7c8..8d0bf29 100644 --- a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs +++ b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs @@ -26,3777 +26,3777 @@ namespace EllieBot.Migrations.Mysql MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("datetime(6)") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("int") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); + b.Property("StickyRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("stickyroles"); - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); - b.HasKey("Id") - .HasName("pk_guildconfigs"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("longtext") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("longtext") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("int") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("tinyint(1)") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("longtext") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs index 61d7cdc..964a3ea 100644 --- a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs @@ -23,3777 +23,3777 @@ namespace EllieBot.Migrations.Mysql MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("datetime(6)") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("int") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); + b.Property("StickyRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("stickyroles"); - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); - b.HasKey("Id") - .HasName("pk_guildconfigs"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("longtext") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("longtext") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("int") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("tinyint(1)") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("longtext") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs index 8735fdb..b0380ea 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs @@ -26,3772 +26,3772 @@ namespace EllieBot.Migrations.PostgreSql NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("integer") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("interval") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("integer") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("integer") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("integer") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("integer") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("integer") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("text") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("text") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("text") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("integer") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("text") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("boolean") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("integer") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("text") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("integer") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("text") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("name"); - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("integer") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("integer") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("text") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("text") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("text") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("text") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("numeric(20,0)") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("text") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("text") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("text") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("text") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("numeric") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("text") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("integer") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("integer") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("text") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletebyemessagestimer"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletegreetmessagestimer"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("boolean") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); + b.Property("BoostMessage") + .HasColumnType("text") + .HasColumnName("boostmessage"); - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); + b.Property("BoostMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("boostmessagechannelid"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("integer") + .HasColumnName("boostmessagedeleteafter"); - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); + b.Property("ByeMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("byemessagechannelid"); - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); + b.Property("ChannelByeMessageText") + .HasColumnType("text") + .HasColumnName("channelbyemessagetext"); - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); + b.Property("ChannelGreetMessageText") + .HasColumnType("text") + .HasColumnName("channelgreetmessagetext"); - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); + b.Property("CleverbotEnabled") + .HasColumnType("boolean") + .HasColumnName("cleverbotenabled"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("boolean") + .HasColumnName("deletemessageoncommand"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("boolean") + .HasColumnName("deletestreamonlinemessage"); - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); + b.Property("DisableGlobalExpressions") + .HasColumnType("boolean") + .HasColumnName("disableglobalexpressions"); - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); + b.Property("DmGreetMessageText") + .HasColumnType("text") + .HasColumnName("dmgreetmessagetext"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("boolean") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); + b.Property("FilterInvites") + .HasColumnType("boolean") + .HasColumnName("filterinvites"); - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); + b.Property("FilterLinks") + .HasColumnType("boolean") + .HasColumnName("filterlinks"); - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); + b.Property("FilterWords") + .HasColumnType("boolean") + .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); + b.Property("GameVoiceChannel") + .HasColumnType("numeric(20,0)") + .HasColumnName("gamevoicechannel"); - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); + b.Property("GreetMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("greetmessagechannelid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); + b.Property("Locale") + .HasColumnType("text") + .HasColumnName("locale"); - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); + b.Property("MuteRoleName") + .HasColumnType("text") + .HasColumnName("muterolename"); - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); + b.Property("NotifyStreamOffline") + .HasColumnType("boolean") + .HasColumnName("notifystreamoffline"); - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); + b.Property("PermissionRole") + .HasColumnType("text") + .HasColumnName("permissionrole"); - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); + b.Property("Prefix") + .HasColumnType("text") + .HasColumnName("prefix"); - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); + b.Property("SendBoostMessage") + .HasColumnType("boolean") + .HasColumnName("sendboostmessage"); - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); + b.Property("SendChannelByeMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelbyemessage"); - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); + b.Property("SendChannelGreetMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelgreetmessage"); - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); + b.Property("SendDmGreetMessage") + .HasColumnType("boolean") + .HasColumnName("senddmgreetmessage"); - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); + b.Property("StickyRoles") + .HasColumnType("boolean") + .HasColumnName("stickyroles"); - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); + b.Property("TimeZoneId") + .HasColumnType("text") + .HasColumnName("timezoneid"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); + b.Property("VerbosePermissions") + .HasColumnType("boolean") + .HasColumnName("verbosepermissions"); - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); + b.Property("WarnExpireAction") + .HasColumnType("integer") + .HasColumnName("warnexpireaction"); - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); + b.Property("WarnExpireHours") + .HasColumnType("integer") + .HasColumnName("warnexpirehours"); - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); + b.Property("WarningsInitialized") + .HasColumnType("boolean") + .HasColumnName("warningsinitialized"); - b.HasKey("Id") - .HasName("pk_guildconfigs"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("integer") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("boolean") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("boolean") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("integer") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("integer") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("text") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("boolean") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("boolean") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("boolean") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("boolean") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("text") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("text") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("integer") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("text") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("timestamp without time zone") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("boolean") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("integer") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("numeric(20,0)") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("integer") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("text") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("text") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("integer") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("text") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("integer") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("text") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("text") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("text") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("text") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("integer") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("integer") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("boolean") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("timestamp without time zone") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("interval") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("boolean") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("interval") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("text") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("text") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("integer") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("integer") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("text") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("numeric(20,0)") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("integer") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("text") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("boolean") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("text") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("integer") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("boolean") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("text") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("integer") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("integer") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("integer") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("integer") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("text") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("integer") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("integer") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("integer") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("integer") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("boolean") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("text") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("text") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("text") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("integer") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("integer") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("integer") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("boolean") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("boolean") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("boolean") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("text") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs index c761af1..bb87c9c 100644 --- a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs @@ -23,3772 +23,3772 @@ namespace EllieBot.Migrations.PostgreSql NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("integer") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("interval") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("integer") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("integer") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("integer") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("integer") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("integer") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("text") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("text") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("text") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("integer") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("text") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("boolean") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("integer") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("text") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("integer") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("text") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("name"); - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("integer") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("integer") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("text") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("text") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("text") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("text") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("numeric(20,0)") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("text") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("text") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("text") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("text") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("numeric") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("text") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("integer") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("integer") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("text") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletebyemessagestimer"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletegreetmessagestimer"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("boolean") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); + b.Property("BoostMessage") + .HasColumnType("text") + .HasColumnName("boostmessage"); - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); + b.Property("BoostMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("boostmessagechannelid"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("integer") + .HasColumnName("boostmessagedeleteafter"); - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); + b.Property("ByeMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("byemessagechannelid"); - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); + b.Property("ChannelByeMessageText") + .HasColumnType("text") + .HasColumnName("channelbyemessagetext"); - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); + b.Property("ChannelGreetMessageText") + .HasColumnType("text") + .HasColumnName("channelgreetmessagetext"); - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); + b.Property("CleverbotEnabled") + .HasColumnType("boolean") + .HasColumnName("cleverbotenabled"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("boolean") + .HasColumnName("deletemessageoncommand"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("boolean") + .HasColumnName("deletestreamonlinemessage"); - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); + b.Property("DisableGlobalExpressions") + .HasColumnType("boolean") + .HasColumnName("disableglobalexpressions"); - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); + b.Property("DmGreetMessageText") + .HasColumnType("text") + .HasColumnName("dmgreetmessagetext"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("boolean") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); + b.Property("FilterInvites") + .HasColumnType("boolean") + .HasColumnName("filterinvites"); - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); + b.Property("FilterLinks") + .HasColumnType("boolean") + .HasColumnName("filterlinks"); - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); + b.Property("FilterWords") + .HasColumnType("boolean") + .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); + b.Property("GameVoiceChannel") + .HasColumnType("numeric(20,0)") + .HasColumnName("gamevoicechannel"); - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); + b.Property("GreetMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("greetmessagechannelid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); + b.Property("Locale") + .HasColumnType("text") + .HasColumnName("locale"); - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); + b.Property("MuteRoleName") + .HasColumnType("text") + .HasColumnName("muterolename"); - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); + b.Property("NotifyStreamOffline") + .HasColumnType("boolean") + .HasColumnName("notifystreamoffline"); - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); + b.Property("PermissionRole") + .HasColumnType("text") + .HasColumnName("permissionrole"); - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); + b.Property("Prefix") + .HasColumnType("text") + .HasColumnName("prefix"); - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); + b.Property("SendBoostMessage") + .HasColumnType("boolean") + .HasColumnName("sendboostmessage"); - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); + b.Property("SendChannelByeMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelbyemessage"); - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); + b.Property("SendChannelGreetMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelgreetmessage"); - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); + b.Property("SendDmGreetMessage") + .HasColumnType("boolean") + .HasColumnName("senddmgreetmessage"); - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); + b.Property("StickyRoles") + .HasColumnType("boolean") + .HasColumnName("stickyroles"); - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); + b.Property("TimeZoneId") + .HasColumnType("text") + .HasColumnName("timezoneid"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); + b.Property("VerbosePermissions") + .HasColumnType("boolean") + .HasColumnName("verbosepermissions"); - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); + b.Property("WarnExpireAction") + .HasColumnType("integer") + .HasColumnName("warnexpireaction"); - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); + b.Property("WarnExpireHours") + .HasColumnType("integer") + .HasColumnName("warnexpirehours"); - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); + b.Property("WarningsInitialized") + .HasColumnType("boolean") + .HasColumnName("warningsinitialized"); - b.HasKey("Id") - .HasName("pk_guildconfigs"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("integer") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("boolean") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("boolean") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("integer") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("integer") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("text") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("boolean") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("boolean") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("boolean") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("boolean") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("text") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("text") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("integer") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("text") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("timestamp without time zone") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("boolean") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("integer") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("numeric(20,0)") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("integer") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("text") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("text") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("integer") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("text") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("integer") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("text") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("text") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("text") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("text") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("integer") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("integer") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("boolean") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("timestamp without time zone") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("interval") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("boolean") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("interval") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("text") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("text") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("integer") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("integer") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("text") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("numeric(20,0)") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("integer") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("text") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("boolean") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("text") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("integer") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("boolean") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("text") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("integer") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("integer") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("integer") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("integer") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("text") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("integer") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("integer") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("integer") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("integer") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("boolean") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("text") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("text") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("text") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("integer") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("integer") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("integer") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("boolean") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("boolean") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("boolean") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("text") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs index 986b883..c9ab166 100644 --- a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs +++ b/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs @@ -21,2914 +21,2914 @@ namespace EllieBot.Migrations modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); + b.Property("ActionDurationMinutes") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MinAge") - .HasColumnType("TEXT"); + b.Property("MinAge") + .HasColumnType("TEXT"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiAltSetting"); - }); + b.ToTable("AntiAltSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("PunishDuration") - .HasColumnType("INTEGER"); + b.Property("PunishDuration") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.Property("UserThreshold") - .HasColumnType("INTEGER"); + b.Property("UserThreshold") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiRaidSetting"); - }); + b.ToTable("AntiRaidSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); + b.Property("AntiSpamSettingId") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AntiSpamSettingId"); + b.HasIndex("AntiSpamSettingId"); - b.ToTable("AntiSpamIgnore"); - }); + b.ToTable("AntiSpamIgnore"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); + b.Property("MessageThreshold") + .HasColumnType("INTEGER"); - b.Property("MuteTime") - .HasColumnType("INTEGER"); + b.Property("MuteTime") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiSpamSetting"); - }); + b.ToTable("AntiSpamSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("TodosArchive"); - }); + b.ToTable("TodosArchive"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("ChannelName") - .HasColumnType("TEXT"); + b.Property("ChannelName") + .HasColumnType("TEXT"); - b.Property("CommandText") - .HasColumnType("TEXT"); + b.Property("CommandText") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("GuildName") - .HasColumnType("TEXT"); + b.Property("GuildName") + .HasColumnType("TEXT"); - b.Property("Interval") - .HasColumnType("INTEGER"); + b.Property("Interval") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); + b.Property("VoiceChannelName") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("AutoCommands"); - }); + b.ToTable("AutoCommands"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("AutoPublishChannel"); - }); + b.ToTable("AutoPublishChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDelete") - .HasColumnType("INTEGER"); + b.Property("AutoDelete") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.ToTable("AutoTranslateChannels"); - }); + b.ToTable("AutoTranslateChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Source") - .HasColumnType("TEXT"); + b.Property("Source") + .HasColumnType("TEXT"); - b.Property("Target") - .HasColumnType("TEXT"); + b.Property("Target") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("ChannelId", "UserId"); + b.HasAlternateKey("ChannelId", "UserId"); - b.ToTable("AutoTranslateUsers"); - }); + b.ToTable("AutoTranslateUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("PruneDays") - .HasColumnType("INTEGER"); + b.Property("PruneDays") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("BanTemplates"); - }); + b.ToTable("BanTemplates"); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Balance") - .HasColumnType("INTEGER"); + b.Property("Balance") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId") - .IsUnique(); + b.HasIndex("UserId") + .IsUnique(); - b.ToTable("BankUsers"); - }); + b.ToTable("BankUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Blacklist"); - }); + b.ToTable("Blacklist"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubApplicants"); - }); + b.ToTable("ClubApplicants"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubBans"); - }); + b.ToTable("ClubBans"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Description") - .HasColumnType("TEXT"); + b.Property("Description") + .HasColumnType("TEXT"); - b.Property("ImageUrl") - .HasColumnType("TEXT"); + b.Property("ImageUrl") + .HasColumnType("TEXT"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("TEXT"); - b.Property("OwnerId") - .HasColumnType("INTEGER"); + b.Property("OwnerId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Name") - .IsUnique(); + b.HasIndex("Name") + .IsUnique(); - b.HasIndex("OwnerId") - .IsUnique(); + b.HasIndex("OwnerId") + .IsUnique(); - b.ToTable("Clubs"); - }); + b.ToTable("Clubs"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Mapping") - .HasColumnType("TEXT"); + b.Property("Mapping") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandAlias"); - }); + b.ToTable("CommandAlias"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("CommandName") - .HasColumnType("TEXT"); + b.Property("CommandName") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandCooldown"); - }); + b.ToTable("CommandCooldown"); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Extra") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Note") - .HasColumnType("TEXT"); + b.Property("Note") + .HasColumnType("TEXT"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Type") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("CurrencyTransactions"); - }); + b.ToTable("CurrencyTransactions"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("DelMsgOnCmdChannel"); - }); + b.ToTable("DelMsgOnCmdChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Perm") - .HasColumnType("INTEGER"); + b.Property("Perm") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "Command") - .IsUnique(); + b.HasIndex("GuildId", "Command") + .IsUnique(); - b.ToTable("DiscordPermOverrides"); - }); + b.ToTable("DiscordPermOverrides"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AvatarId") - .HasColumnType("TEXT"); + b.Property("AvatarId") + .HasColumnType("TEXT"); - b.Property("ClubId") - .HasColumnType("INTEGER"); + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Discriminator") - .HasColumnType("TEXT"); + b.Property("Discriminator") + .HasColumnType("TEXT"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("UserId"); + b.HasAlternateKey("UserId"); - b.HasIndex("ClubId"); + b.HasIndex("ClubId"); - b.HasIndex("CurrencyAmount"); + b.HasIndex("CurrencyAmount"); - b.HasIndex("TotalXp"); + b.HasIndex("TotalXp"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("DiscordUser"); - }); + b.ToTable("DiscordUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("ExcludedItem"); - }); + b.ToTable("ExcludedItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Url") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("GuildConfigId", "Url"); + b.HasAlternateKey("GuildConfigId", "Url"); - b.ToTable("FeedSub"); - }); + b.ToTable("FeedSub"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterChannelId"); - }); + b.ToTable("FilterChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterLinksChannelId"); - }); + b.ToTable("FilterLinksChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterWordsChannelId"); - }); + b.ToTable("FilterWordsChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Word") - .HasColumnType("TEXT"); + b.Property("Word") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilteredWord"); - }); + b.ToTable("FilteredWord"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FollowedStream"); - }); + b.ToTable("FollowedStream"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("GCChannelId"); - }); + b.ToTable("GCChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Bet") - .HasColumnType("TEXT"); + b.Property("Bet") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Feature") - .HasColumnType("TEXT"); + b.Property("Feature") + .HasColumnType("TEXT"); - b.Property("PaidOut") - .HasColumnType("TEXT"); + b.Property("PaidOut") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Feature") - .IsUnique(); + b.HasIndex("Feature") + .IsUnique(); - b.ToTable("GamblingStats"); - }); + b.ToTable("GamblingStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("EndsAt") - .HasColumnType("TEXT"); + b.Property("EndsAt") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("GiveawayModel"); - }); + b.ToTable("GiveawayModel"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("GiveawayId") - .HasColumnType("INTEGER"); + b.Property("GiveawayId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); + b.HasIndex("GiveawayId", "UserId") + .IsUnique(); - b.ToTable("GiveawayUser"); - }); + b.ToTable("GiveawayUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Number") - .HasColumnType("INTEGER"); + b.Property("Number") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); + b.HasIndex("GuildConfigId", "Number") + .IsUnique(); - b.ToTable("GroupName"); - }); + b.ToTable("GroupName"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); + b.Property("AutoAssignRoleIds") + .HasColumnType("TEXT"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("INTEGER"); - b.Property("BoostMessage") - .HasColumnType("TEXT"); + b.Property("BoostMessage") + .HasColumnType("TEXT"); - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("BoostMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("INTEGER"); - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("ByeMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); + b.Property("ChannelByeMessageText") + .HasColumnType("TEXT"); - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); + b.Property("ChannelGreetMessageText") + .HasColumnType("TEXT"); - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); + b.Property("CleverbotEnabled") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("INTEGER"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("INTEGER"); - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); + b.Property("DisableGlobalExpressions") + .HasColumnType("INTEGER"); - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); + b.Property("DmGreetMessageText") + .HasColumnType("TEXT"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("INTEGER"); - b.Property("FilterInvites") - .HasColumnType("INTEGER"); + b.Property("FilterInvites") + .HasColumnType("INTEGER"); - b.Property("FilterLinks") - .HasColumnType("INTEGER"); + b.Property("FilterLinks") + .HasColumnType("INTEGER"); - b.Property("FilterWords") - .HasColumnType("INTEGER"); + b.Property("FilterWords") + .HasColumnType("INTEGER"); - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); + b.Property("GameVoiceChannel") + .HasColumnType("INTEGER"); - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("GreetMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Locale") - .HasColumnType("TEXT"); + b.Property("Locale") + .HasColumnType("TEXT"); - b.Property("MuteRoleName") - .HasColumnType("TEXT"); + b.Property("MuteRoleName") + .HasColumnType("TEXT"); - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); + b.Property("NotifyStreamOffline") + .HasColumnType("INTEGER"); - b.Property("PermissionRole") - .HasColumnType("TEXT"); + b.Property("PermissionRole") + .HasColumnType("TEXT"); - b.Property("Prefix") - .HasColumnType("TEXT"); + b.Property("Prefix") + .HasColumnType("TEXT"); - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); + b.Property("SendBoostMessage") + .HasColumnType("INTEGER"); - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); + b.Property("SendChannelByeMessage") + .HasColumnType("INTEGER"); - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); + b.Property("SendChannelGreetMessage") + .HasColumnType("INTEGER"); - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); + b.Property("SendDmGreetMessage") + .HasColumnType("INTEGER"); - b.Property("StickyRoles") - .HasColumnType("INTEGER"); + b.Property("StickyRoles") + .HasColumnType("INTEGER"); - b.Property("TimeZoneId") - .HasColumnType("TEXT"); + b.Property("TimeZoneId") + .HasColumnType("TEXT"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(true); - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); + b.Property("VerbosePermissions") + .HasColumnType("INTEGER"); - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); + b.Property("WarnExpireAction") + .HasColumnType("INTEGER"); - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); + b.Property("WarnExpireHours") + .HasColumnType("INTEGER"); - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); + b.Property("WarningsInitialized") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.HasIndex("WarnExpireHours"); + b.HasIndex("WarnExpireHours"); - b.ToTable("GuildConfigs"); - }); + b.ToTable("GuildConfigs"); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.HasKey("GuildId"); + b.HasKey("GuildId"); - b.ToTable("HoneyPotChannels"); - }); + b.ToTable("HoneyPotChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("LogItemId") - .HasColumnType("INTEGER"); + b.Property("LogItemId") + .HasColumnType("INTEGER"); - b.Property("LogSettingId") - .HasColumnType("INTEGER"); + b.Property("LogSettingId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique(); - b.ToTable("IgnoredLogChannels"); - }); + b.ToTable("IgnoredLogChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.ToTable("ImageOnlyChannels"); - }); + b.ToTable("ImageOnlyChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelCreatedId") + .HasColumnType("INTEGER"); - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); + b.Property("ChannelDestroyedId") + .HasColumnType("INTEGER"); - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelUpdatedId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LogOtherId") - .HasColumnType("INTEGER"); + b.Property("LogOtherId") + .HasColumnType("INTEGER"); - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); + b.Property("LogUserPresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("INTEGER"); - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); + b.Property("LogWarnsId") + .HasColumnType("INTEGER"); - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); + b.Property("MessageDeletedId") + .HasColumnType("INTEGER"); - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); + b.Property("MessageUpdatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); + b.Property("ThreadCreatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); + b.Property("ThreadDeletedId") + .HasColumnType("INTEGER"); - b.Property("UserBannedId") - .HasColumnType("INTEGER"); + b.Property("UserBannedId") + .HasColumnType("INTEGER"); - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); + b.Property("UserJoinedId") + .HasColumnType("INTEGER"); - b.Property("UserLeftId") - .HasColumnType("INTEGER"); + b.Property("UserLeftId") + .HasColumnType("INTEGER"); - b.Property("UserMutedId") - .HasColumnType("INTEGER"); + b.Property("UserMutedId") + .HasColumnType("INTEGER"); - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); + b.Property("UserUnbannedId") + .HasColumnType("INTEGER"); - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); + b.Property("UserUpdatedId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("LogSettings"); - }); + b.ToTable("LogSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); + b.Property("AutoDisconnect") + .HasColumnType("INTEGER"); - b.Property("AutoPlay") - .HasColumnType("INTEGER"); + b.Property("AutoPlay") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); + b.Property("MusicChannelId") + .HasColumnType("INTEGER"); - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); + b.Property("PlayerRepeat") + .HasColumnType("INTEGER"); - b.Property("QualityPreset") - .HasColumnType("INTEGER"); + b.Property("QualityPreset") + .HasColumnType("INTEGER"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(100); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("MusicPlayerSettings"); - }); + b.ToTable("MusicPlayerSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Author") - .HasColumnType("TEXT"); + b.Property("Author") + .HasColumnType("TEXT"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("MusicPlaylists"); - }); + b.ToTable("MusicPlaylists"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("MutedUserId"); - }); + b.ToTable("MutedUserId"); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AllowTarget") - .HasColumnType("INTEGER"); + b.Property("AllowTarget") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteTrigger") + .HasColumnType("INTEGER"); - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); + b.Property("ContainsAnywhere") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("DmResponse") - .HasColumnType("INTEGER"); + b.Property("DmResponse") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Reactions") - .HasColumnType("TEXT"); + b.Property("Reactions") + .HasColumnType("TEXT"); - b.Property("Response") - .HasColumnType("TEXT"); + b.Property("Response") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Expressions"); - }); + b.ToTable("Expressions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountCents") - .HasColumnType("INTEGER"); + b.Property("AmountCents") + .HasColumnType("INTEGER"); - b.Property("LastCharge") - .HasColumnType("TEXT"); + b.Property("LastCharge") + .HasColumnType("TEXT"); - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); + b.Property("UniquePlatformUserId") + .HasColumnType("TEXT"); - b.Property("ValidThru") - .HasColumnType("TEXT"); + b.Property("ValidThru") + .HasColumnType("TEXT"); - b.HasKey("UserId"); + b.HasKey("UserId"); - b.HasIndex("UniquePlatformUserId") - .IsUnique(); + b.HasIndex("UniquePlatformUserId") + .IsUnique(); - b.ToTable("Patrons"); - }); + b.ToTable("Patrons"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); + b.Property("IsCustomCommand") + .HasColumnType("INTEGER"); - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); + b.Property("PrimaryTarget") + .HasColumnType("INTEGER"); - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); + b.Property("PrimaryTargetId") + .HasColumnType("INTEGER"); - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); + b.Property("SecondaryTarget") + .HasColumnType("INTEGER"); - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); + b.Property("SecondaryTargetName") + .HasColumnType("TEXT"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("Permissions"); - }); + b.ToTable("Permissions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Password") - .HasColumnType("TEXT"); + b.Property("Password") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId"); + b.HasIndex("ChannelId"); - b.HasIndex("MessageId") - .IsUnique(); + b.HasIndex("MessageId") + .IsUnique(); - b.ToTable("PlantedCurrency"); - }); + b.ToTable("PlantedCurrency"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); + b.Property("MusicPlaylistId") + .HasColumnType("INTEGER"); - b.Property("Provider") - .HasColumnType("TEXT"); + b.Property("Provider") + .HasColumnType("TEXT"); - b.Property("ProviderType") - .HasColumnType("INTEGER"); + b.Property("ProviderType") + .HasColumnType("INTEGER"); - b.Property("Query") - .HasColumnType("TEXT"); + b.Property("Query") + .HasColumnType("TEXT"); - b.Property("Title") - .HasColumnType("TEXT"); + b.Property("Title") + .HasColumnType("TEXT"); - b.Property("Uri") - .HasColumnType("TEXT"); + b.Property("Uri") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MusicPlaylistId"); + b.HasIndex("MusicPlaylistId"); - b.ToTable("PlaylistSong"); - }); + b.ToTable("PlaylistSong"); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Text") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("Keyword"); + b.HasIndex("Keyword"); - b.ToTable("Quotes"); - }); + b.ToTable("Quotes"); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("TEXT"); - b.Property("Group") - .HasColumnType("INTEGER"); + b.Property("Group") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelReq") - .HasColumnType("INTEGER"); + b.Property("LevelReq") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("MessageId", "Emote") - .IsUnique(); + b.HasIndex("MessageId", "Emote") + .IsUnique(); - b.ToTable("ReactionRoles"); - }); + b.ToTable("ReactionRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsPrivate") - .HasColumnType("INTEGER"); + b.Property("IsPrivate") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("ServerId") - .HasColumnType("INTEGER"); + b.Property("ServerId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("When") - .HasColumnType("TEXT"); + b.Property("When") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("When"); + b.HasIndex("When"); - b.ToTable("Reminders"); - }); + b.ToTable("Reminders"); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Interval") - .HasColumnType("TEXT"); + b.Property("Interval") + .HasColumnType("TEXT"); - b.Property("LastMessageId") - .HasColumnType("INTEGER"); + b.Property("LastMessageId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("NoRedundant") - .HasColumnType("INTEGER"); + b.Property("NoRedundant") + .HasColumnType("INTEGER"); - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); + b.Property("StartTimeOfDay") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Repeaters"); - }); + b.ToTable("Repeaters"); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("LastReward") - .HasColumnType("TEXT"); + b.Property("LastReward") + .HasColumnType("TEXT"); - b.Property("PlatformUserId") - .HasColumnType("TEXT"); + b.Property("PlatformUserId") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PlatformUserId") - .IsUnique(); + b.HasIndex("PlatformUserId") + .IsUnique(); - b.ToTable("RewardedUsers"); - }); + b.ToTable("RewardedUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Status") - .HasColumnType("TEXT"); + b.Property("Status") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("RotatingStatus"); - }); + b.ToTable("RotatingStatus"); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); + b.Property("LevelRequirement") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "RoleId") - .IsUnique(); + b.HasIndex("GuildId", "RoleId") + .IsUnique(); - b.ToTable("SelfAssignableRoles"); - }); + b.ToTable("SelfAssignableRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("RoleName") - .HasColumnType("TEXT"); + b.Property("RoleName") + .HasColumnType("TEXT"); - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); + b.Property("RoleRequirement") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("ShopEntry"); - }); + b.ToTable("ShopEntry"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); + b.Property("ShopEntryId") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ShopEntryId"); + b.HasIndex("ShopEntryId"); - b.ToTable("ShopEntryItem"); - }); + b.ToTable("ShopEntryItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredRole"); - }); + b.ToTable("SlowmodeIgnoredRole"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredUser"); - }); + b.ToTable("SlowmodeIgnoredUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("RoleIds") - .HasColumnType("TEXT"); + b.Property("RoleIds") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "UserId") - .IsUnique(); + b.HasIndex("GuildId", "UserId") + .IsUnique(); - b.ToTable("StickyRoles"); - }); + b.ToTable("StickyRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("StreamOnlineMessages"); - }); + b.ToTable("StreamOnlineMessages"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleBlacklistedUser"); - }); + b.ToTable("StreamRoleBlacklistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AddRoleId") - .HasColumnType("INTEGER"); + b.Property("AddRoleId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Enabled") - .HasColumnType("INTEGER"); + b.Property("Enabled") + .HasColumnType("INTEGER"); - b.Property("FromRoleId") - .HasColumnType("INTEGER"); + b.Property("FromRoleId") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .HasColumnType("TEXT"); + b.Property("Keyword") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("StreamRoleSettings"); - }); + b.ToTable("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleWhitelistedUser"); - }); + b.ToTable("StreamRoleWhitelistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ArchiveId") - .HasColumnType("INTEGER"); + b.Property("ArchiveId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsDone") - .HasColumnType("INTEGER"); + b.Property("IsDone") + .HasColumnType("INTEGER"); - b.Property("Todo") - .HasColumnType("TEXT"); + b.Property("Todo") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ArchiveId"); + b.HasIndex("ArchiveId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Todos"); - }); + b.ToTable("Todos"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnbanTimer"); - }); + b.ToTable("UnbanTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnmuteAt") - .HasColumnType("TEXT"); + b.Property("UnmuteAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnmuteTimer"); - }); + b.ToTable("UnmuteTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnroleTimer"); - }); + b.ToTable("UnroleTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AwardedXp") - .HasColumnType("INTEGER"); + b.Property("AwardedXp") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); + b.Property("NotifyOnLevelUp") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AwardedXp"); + b.HasIndex("AwardedXp"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.HasIndex("Xp"); + b.HasIndex("Xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique(); + b.HasIndex("UserId", "GuildId") + .IsUnique(); - b.ToTable("UserXpStats"); - }); + b.ToTable("UserXpStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("VcRoleInfo"); - }); + b.ToTable("VcRoleInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AffinityId") - .HasColumnType("INTEGER"); + b.Property("AffinityId") + .HasColumnType("INTEGER"); - b.Property("ClaimerId") - .HasColumnType("INTEGER"); + b.Property("ClaimerId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("WaifuId") - .HasColumnType("INTEGER"); + b.Property("WaifuId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AffinityId"); + b.HasIndex("AffinityId"); - b.HasIndex("ClaimerId"); + b.HasIndex("ClaimerId"); - b.HasIndex("Price"); + b.HasIndex("Price"); - b.HasIndex("WaifuId") - .IsUnique(); + b.HasIndex("WaifuId") + .IsUnique(); - b.ToTable("WaifuInfo"); - }); + b.ToTable("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemEmoji") - .HasColumnType("TEXT"); + b.Property("ItemEmoji") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); + b.Property("WaifuInfoId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("WaifuInfoId"); + b.HasIndex("WaifuInfoId"); - b.ToTable("WaifuItem"); - }); + b.ToTable("WaifuItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("NewId") - .HasColumnType("INTEGER"); + b.Property("NewId") + .HasColumnType("INTEGER"); - b.Property("OldId") - .HasColumnType("INTEGER"); + b.Property("OldId") + .HasColumnType("INTEGER"); - b.Property("UpdateType") - .HasColumnType("INTEGER"); + b.Property("UpdateType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("NewId"); + b.HasIndex("NewId"); - b.HasIndex("OldId"); + b.HasIndex("OldId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("WaifuUpdates"); - }); + b.ToTable("WaifuUpdates"); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Forgiven") - .HasColumnType("INTEGER"); + b.Property("Forgiven") + .HasColumnType("INTEGER"); - b.Property("ForgivenBy") - .HasColumnType("TEXT"); + b.Property("ForgivenBy") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Moderator") - .HasColumnType("TEXT"); + b.Property("Moderator") + .HasColumnType("TEXT"); - b.Property("Reason") - .HasColumnType("TEXT"); + b.Property("Reason") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(1L); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DateAdded"); + b.HasIndex("DateAdded"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Warnings"); - }); + b.ToTable("Warnings"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Count") - .HasColumnType("INTEGER"); + b.Property("Count") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Punishment") - .HasColumnType("INTEGER"); + b.Property("Punishment") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("Time") - .HasColumnType("INTEGER"); + b.Property("Time") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("WarningPunishment"); - }); + b.ToTable("WarningPunishment"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("XpCurrencyReward"); - }); + b.ToTable("XpCurrencyReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("Remove") - .HasColumnType("INTEGER"); + b.Property("Remove") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); - b.ToTable("XpRoleReward"); - }); + b.ToTable("XpRoleReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); + b.Property("ServerExcluded") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("XpSettings"); - }); + b.ToTable("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsUsing") - .HasColumnType("INTEGER"); + b.Property("IsUsing") + .HasColumnType("INTEGER"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique(); - b.ToTable("XpShopOwnedItem"); - }); + b.ToTable("XpShopOwnedItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs index 84561b0..0b6c04d 100644 --- a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs @@ -18,2914 +18,2914 @@ namespace EllieBot.Migrations modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); + b.Property("ActionDurationMinutes") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MinAge") - .HasColumnType("TEXT"); + b.Property("MinAge") + .HasColumnType("TEXT"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiAltSetting"); - }); + b.ToTable("AntiAltSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("PunishDuration") - .HasColumnType("INTEGER"); + b.Property("PunishDuration") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.Property("UserThreshold") - .HasColumnType("INTEGER"); + b.Property("UserThreshold") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiRaidSetting"); - }); + b.ToTable("AntiRaidSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); + b.Property("AntiSpamSettingId") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AntiSpamSettingId"); + b.HasIndex("AntiSpamSettingId"); - b.ToTable("AntiSpamIgnore"); - }); + b.ToTable("AntiSpamIgnore"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); + b.Property("MessageThreshold") + .HasColumnType("INTEGER"); - b.Property("MuteTime") - .HasColumnType("INTEGER"); + b.Property("MuteTime") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiSpamSetting"); - }); + b.ToTable("AntiSpamSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("TodosArchive"); - }); + b.ToTable("TodosArchive"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("ChannelName") - .HasColumnType("TEXT"); + b.Property("ChannelName") + .HasColumnType("TEXT"); - b.Property("CommandText") - .HasColumnType("TEXT"); + b.Property("CommandText") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("GuildName") - .HasColumnType("TEXT"); + b.Property("GuildName") + .HasColumnType("TEXT"); - b.Property("Interval") - .HasColumnType("INTEGER"); + b.Property("Interval") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); + b.Property("VoiceChannelName") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("AutoCommands"); - }); + b.ToTable("AutoCommands"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("AutoPublishChannel"); - }); + b.ToTable("AutoPublishChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDelete") - .HasColumnType("INTEGER"); + b.Property("AutoDelete") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.ToTable("AutoTranslateChannels"); - }); + b.ToTable("AutoTranslateChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Source") - .HasColumnType("TEXT"); + b.Property("Source") + .HasColumnType("TEXT"); - b.Property("Target") - .HasColumnType("TEXT"); + b.Property("Target") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("ChannelId", "UserId"); + b.HasAlternateKey("ChannelId", "UserId"); - b.ToTable("AutoTranslateUsers"); - }); + b.ToTable("AutoTranslateUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("PruneDays") - .HasColumnType("INTEGER"); + b.Property("PruneDays") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("BanTemplates"); - }); + b.ToTable("BanTemplates"); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Balance") - .HasColumnType("INTEGER"); + b.Property("Balance") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId") - .IsUnique(); + b.HasIndex("UserId") + .IsUnique(); - b.ToTable("BankUsers"); - }); + b.ToTable("BankUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Blacklist"); - }); + b.ToTable("Blacklist"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubApplicants"); - }); + b.ToTable("ClubApplicants"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubBans"); - }); + b.ToTable("ClubBans"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Description") - .HasColumnType("TEXT"); + b.Property("Description") + .HasColumnType("TEXT"); - b.Property("ImageUrl") - .HasColumnType("TEXT"); + b.Property("ImageUrl") + .HasColumnType("TEXT"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("TEXT"); - b.Property("OwnerId") - .HasColumnType("INTEGER"); + b.Property("OwnerId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Name") - .IsUnique(); + b.HasIndex("Name") + .IsUnique(); - b.HasIndex("OwnerId") - .IsUnique(); + b.HasIndex("OwnerId") + .IsUnique(); - b.ToTable("Clubs"); - }); + b.ToTable("Clubs"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Mapping") - .HasColumnType("TEXT"); + b.Property("Mapping") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandAlias"); - }); + b.ToTable("CommandAlias"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("CommandName") - .HasColumnType("TEXT"); + b.Property("CommandName") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandCooldown"); - }); + b.ToTable("CommandCooldown"); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Extra") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Note") - .HasColumnType("TEXT"); + b.Property("Note") + .HasColumnType("TEXT"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Type") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("CurrencyTransactions"); - }); + b.ToTable("CurrencyTransactions"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("DelMsgOnCmdChannel"); - }); + b.ToTable("DelMsgOnCmdChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Perm") - .HasColumnType("INTEGER"); + b.Property("Perm") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "Command") - .IsUnique(); + b.HasIndex("GuildId", "Command") + .IsUnique(); - b.ToTable("DiscordPermOverrides"); - }); + b.ToTable("DiscordPermOverrides"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AvatarId") - .HasColumnType("TEXT"); + b.Property("AvatarId") + .HasColumnType("TEXT"); - b.Property("ClubId") - .HasColumnType("INTEGER"); + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Discriminator") - .HasColumnType("TEXT"); + b.Property("Discriminator") + .HasColumnType("TEXT"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("UserId"); + b.HasAlternateKey("UserId"); - b.HasIndex("ClubId"); + b.HasIndex("ClubId"); - b.HasIndex("CurrencyAmount"); + b.HasIndex("CurrencyAmount"); - b.HasIndex("TotalXp"); + b.HasIndex("TotalXp"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("DiscordUser"); - }); + b.ToTable("DiscordUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("ExcludedItem"); - }); + b.ToTable("ExcludedItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Url") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("GuildConfigId", "Url"); + b.HasAlternateKey("GuildConfigId", "Url"); - b.ToTable("FeedSub"); - }); + b.ToTable("FeedSub"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterChannelId"); - }); + b.ToTable("FilterChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterLinksChannelId"); - }); + b.ToTable("FilterLinksChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterWordsChannelId"); - }); + b.ToTable("FilterWordsChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Word") - .HasColumnType("TEXT"); + b.Property("Word") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilteredWord"); - }); + b.ToTable("FilteredWord"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FollowedStream"); - }); + b.ToTable("FollowedStream"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("GCChannelId"); - }); + b.ToTable("GCChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Bet") - .HasColumnType("TEXT"); + b.Property("Bet") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Feature") - .HasColumnType("TEXT"); + b.Property("Feature") + .HasColumnType("TEXT"); - b.Property("PaidOut") - .HasColumnType("TEXT"); + b.Property("PaidOut") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Feature") - .IsUnique(); + b.HasIndex("Feature") + .IsUnique(); - b.ToTable("GamblingStats"); - }); + b.ToTable("GamblingStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("EndsAt") - .HasColumnType("TEXT"); + b.Property("EndsAt") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("GiveawayModel"); - }); + b.ToTable("GiveawayModel"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("GiveawayId") - .HasColumnType("INTEGER"); + b.Property("GiveawayId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); + b.HasIndex("GiveawayId", "UserId") + .IsUnique(); - b.ToTable("GiveawayUser"); - }); + b.ToTable("GiveawayUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Number") - .HasColumnType("INTEGER"); + b.Property("Number") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); + b.HasIndex("GuildConfigId", "Number") + .IsUnique(); - b.ToTable("GroupName"); - }); + b.ToTable("GroupName"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); + b.Property("AutoAssignRoleIds") + .HasColumnType("TEXT"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("INTEGER"); - b.Property("BoostMessage") - .HasColumnType("TEXT"); + b.Property("BoostMessage") + .HasColumnType("TEXT"); - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("BoostMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); + b.Property("BoostMessageDeleteAfter") + .HasColumnType("INTEGER"); - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("ByeMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); + b.Property("ChannelByeMessageText") + .HasColumnType("TEXT"); - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); + b.Property("ChannelGreetMessageText") + .HasColumnType("TEXT"); - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); + b.Property("CleverbotEnabled") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("INTEGER"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("INTEGER"); - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); + b.Property("DisableGlobalExpressions") + .HasColumnType("INTEGER"); - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); + b.Property("DmGreetMessageText") + .HasColumnType("TEXT"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("INTEGER"); - b.Property("FilterInvites") - .HasColumnType("INTEGER"); + b.Property("FilterInvites") + .HasColumnType("INTEGER"); - b.Property("FilterLinks") - .HasColumnType("INTEGER"); + b.Property("FilterLinks") + .HasColumnType("INTEGER"); - b.Property("FilterWords") - .HasColumnType("INTEGER"); + b.Property("FilterWords") + .HasColumnType("INTEGER"); - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); + b.Property("GameVoiceChannel") + .HasColumnType("INTEGER"); - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("GreetMessageChannelId") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Locale") - .HasColumnType("TEXT"); + b.Property("Locale") + .HasColumnType("TEXT"); - b.Property("MuteRoleName") - .HasColumnType("TEXT"); + b.Property("MuteRoleName") + .HasColumnType("TEXT"); - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); + b.Property("NotifyStreamOffline") + .HasColumnType("INTEGER"); - b.Property("PermissionRole") - .HasColumnType("TEXT"); + b.Property("PermissionRole") + .HasColumnType("TEXT"); - b.Property("Prefix") - .HasColumnType("TEXT"); + b.Property("Prefix") + .HasColumnType("TEXT"); - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); + b.Property("SendBoostMessage") + .HasColumnType("INTEGER"); - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); + b.Property("SendChannelByeMessage") + .HasColumnType("INTEGER"); - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); + b.Property("SendChannelGreetMessage") + .HasColumnType("INTEGER"); - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); + b.Property("SendDmGreetMessage") + .HasColumnType("INTEGER"); - b.Property("StickyRoles") - .HasColumnType("INTEGER"); + b.Property("StickyRoles") + .HasColumnType("INTEGER"); - b.Property("TimeZoneId") - .HasColumnType("TEXT"); + b.Property("TimeZoneId") + .HasColumnType("TEXT"); - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(true); - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); + b.Property("VerbosePermissions") + .HasColumnType("INTEGER"); - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); + b.Property("WarnExpireAction") + .HasColumnType("INTEGER"); - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); + b.Property("WarnExpireHours") + .HasColumnType("INTEGER"); - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); + b.Property("WarningsInitialized") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.HasIndex("WarnExpireHours"); + b.HasIndex("WarnExpireHours"); - b.ToTable("GuildConfigs"); - }); + b.ToTable("GuildConfigs"); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.HasKey("GuildId"); + b.HasKey("GuildId"); - b.ToTable("HoneyPotChannels"); - }); + b.ToTable("HoneyPotChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("LogItemId") - .HasColumnType("INTEGER"); + b.Property("LogItemId") + .HasColumnType("INTEGER"); - b.Property("LogSettingId") - .HasColumnType("INTEGER"); + b.Property("LogSettingId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique(); - b.ToTable("IgnoredLogChannels"); - }); + b.ToTable("IgnoredLogChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.ToTable("ImageOnlyChannels"); - }); + b.ToTable("ImageOnlyChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelCreatedId") + .HasColumnType("INTEGER"); - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); + b.Property("ChannelDestroyedId") + .HasColumnType("INTEGER"); - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelUpdatedId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LogOtherId") - .HasColumnType("INTEGER"); + b.Property("LogOtherId") + .HasColumnType("INTEGER"); - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); + b.Property("LogUserPresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("INTEGER"); - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); + b.Property("LogWarnsId") + .HasColumnType("INTEGER"); - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); + b.Property("MessageDeletedId") + .HasColumnType("INTEGER"); - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); + b.Property("MessageUpdatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); + b.Property("ThreadCreatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); + b.Property("ThreadDeletedId") + .HasColumnType("INTEGER"); - b.Property("UserBannedId") - .HasColumnType("INTEGER"); + b.Property("UserBannedId") + .HasColumnType("INTEGER"); - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); + b.Property("UserJoinedId") + .HasColumnType("INTEGER"); - b.Property("UserLeftId") - .HasColumnType("INTEGER"); + b.Property("UserLeftId") + .HasColumnType("INTEGER"); - b.Property("UserMutedId") - .HasColumnType("INTEGER"); + b.Property("UserMutedId") + .HasColumnType("INTEGER"); - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); + b.Property("UserUnbannedId") + .HasColumnType("INTEGER"); - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); + b.Property("UserUpdatedId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("LogSettings"); - }); + b.ToTable("LogSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); + b.Property("AutoDisconnect") + .HasColumnType("INTEGER"); - b.Property("AutoPlay") - .HasColumnType("INTEGER"); + b.Property("AutoPlay") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); + b.Property("MusicChannelId") + .HasColumnType("INTEGER"); - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); + b.Property("PlayerRepeat") + .HasColumnType("INTEGER"); - b.Property("QualityPreset") - .HasColumnType("INTEGER"); + b.Property("QualityPreset") + .HasColumnType("INTEGER"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(100); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("MusicPlayerSettings"); - }); + b.ToTable("MusicPlayerSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Author") - .HasColumnType("TEXT"); + b.Property("Author") + .HasColumnType("TEXT"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("MusicPlaylists"); - }); + b.ToTable("MusicPlaylists"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("MutedUserId"); - }); + b.ToTable("MutedUserId"); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AllowTarget") - .HasColumnType("INTEGER"); + b.Property("AllowTarget") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteTrigger") + .HasColumnType("INTEGER"); - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); + b.Property("ContainsAnywhere") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("DmResponse") - .HasColumnType("INTEGER"); + b.Property("DmResponse") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Reactions") - .HasColumnType("TEXT"); + b.Property("Reactions") + .HasColumnType("TEXT"); - b.Property("Response") - .HasColumnType("TEXT"); + b.Property("Response") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Expressions"); - }); + b.ToTable("Expressions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountCents") - .HasColumnType("INTEGER"); + b.Property("AmountCents") + .HasColumnType("INTEGER"); - b.Property("LastCharge") - .HasColumnType("TEXT"); + b.Property("LastCharge") + .HasColumnType("TEXT"); - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); + b.Property("UniquePlatformUserId") + .HasColumnType("TEXT"); - b.Property("ValidThru") - .HasColumnType("TEXT"); + b.Property("ValidThru") + .HasColumnType("TEXT"); - b.HasKey("UserId"); + b.HasKey("UserId"); - b.HasIndex("UniquePlatformUserId") - .IsUnique(); + b.HasIndex("UniquePlatformUserId") + .IsUnique(); - b.ToTable("Patrons"); - }); + b.ToTable("Patrons"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); + b.Property("IsCustomCommand") + .HasColumnType("INTEGER"); - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); + b.Property("PrimaryTarget") + .HasColumnType("INTEGER"); - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); + b.Property("PrimaryTargetId") + .HasColumnType("INTEGER"); - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); + b.Property("SecondaryTarget") + .HasColumnType("INTEGER"); - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); + b.Property("SecondaryTargetName") + .HasColumnType("TEXT"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("Permissions"); - }); + b.ToTable("Permissions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Password") - .HasColumnType("TEXT"); + b.Property("Password") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId"); + b.HasIndex("ChannelId"); - b.HasIndex("MessageId") - .IsUnique(); + b.HasIndex("MessageId") + .IsUnique(); - b.ToTable("PlantedCurrency"); - }); + b.ToTable("PlantedCurrency"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); + b.Property("MusicPlaylistId") + .HasColumnType("INTEGER"); - b.Property("Provider") - .HasColumnType("TEXT"); + b.Property("Provider") + .HasColumnType("TEXT"); - b.Property("ProviderType") - .HasColumnType("INTEGER"); + b.Property("ProviderType") + .HasColumnType("INTEGER"); - b.Property("Query") - .HasColumnType("TEXT"); + b.Property("Query") + .HasColumnType("TEXT"); - b.Property("Title") - .HasColumnType("TEXT"); + b.Property("Title") + .HasColumnType("TEXT"); - b.Property("Uri") - .HasColumnType("TEXT"); + b.Property("Uri") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MusicPlaylistId"); + b.HasIndex("MusicPlaylistId"); - b.ToTable("PlaylistSong"); - }); + b.ToTable("PlaylistSong"); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Text") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("Keyword"); + b.HasIndex("Keyword"); - b.ToTable("Quotes"); - }); + b.ToTable("Quotes"); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("TEXT"); - b.Property("Group") - .HasColumnType("INTEGER"); + b.Property("Group") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelReq") - .HasColumnType("INTEGER"); + b.Property("LevelReq") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("MessageId", "Emote") - .IsUnique(); + b.HasIndex("MessageId", "Emote") + .IsUnique(); - b.ToTable("ReactionRoles"); - }); + b.ToTable("ReactionRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsPrivate") - .HasColumnType("INTEGER"); + b.Property("IsPrivate") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("ServerId") - .HasColumnType("INTEGER"); + b.Property("ServerId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("When") - .HasColumnType("TEXT"); + b.Property("When") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("When"); + b.HasIndex("When"); - b.ToTable("Reminders"); - }); + b.ToTable("Reminders"); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Interval") - .HasColumnType("TEXT"); + b.Property("Interval") + .HasColumnType("TEXT"); - b.Property("LastMessageId") - .HasColumnType("INTEGER"); + b.Property("LastMessageId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("NoRedundant") - .HasColumnType("INTEGER"); + b.Property("NoRedundant") + .HasColumnType("INTEGER"); - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); + b.Property("StartTimeOfDay") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Repeaters"); - }); + b.ToTable("Repeaters"); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("LastReward") - .HasColumnType("TEXT"); + b.Property("LastReward") + .HasColumnType("TEXT"); - b.Property("PlatformUserId") - .HasColumnType("TEXT"); + b.Property("PlatformUserId") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PlatformUserId") - .IsUnique(); + b.HasIndex("PlatformUserId") + .IsUnique(); - b.ToTable("RewardedUsers"); - }); + b.ToTable("RewardedUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Status") - .HasColumnType("TEXT"); + b.Property("Status") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("RotatingStatus"); - }); + b.ToTable("RotatingStatus"); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); + b.Property("LevelRequirement") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "RoleId") - .IsUnique(); + b.HasIndex("GuildId", "RoleId") + .IsUnique(); - b.ToTable("SelfAssignableRoles"); - }); + b.ToTable("SelfAssignableRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("RoleName") - .HasColumnType("TEXT"); + b.Property("RoleName") + .HasColumnType("TEXT"); - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); + b.Property("RoleRequirement") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("ShopEntry"); - }); + b.ToTable("ShopEntry"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); + b.Property("ShopEntryId") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ShopEntryId"); + b.HasIndex("ShopEntryId"); - b.ToTable("ShopEntryItem"); - }); + b.ToTable("ShopEntryItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredRole"); - }); + b.ToTable("SlowmodeIgnoredRole"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredUser"); - }); + b.ToTable("SlowmodeIgnoredUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("RoleIds") - .HasColumnType("TEXT"); + b.Property("RoleIds") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "UserId") - .IsUnique(); + b.HasIndex("GuildId", "UserId") + .IsUnique(); - b.ToTable("StickyRoles"); - }); + b.ToTable("StickyRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("StreamOnlineMessages"); - }); + b.ToTable("StreamOnlineMessages"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleBlacklistedUser"); - }); + b.ToTable("StreamRoleBlacklistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AddRoleId") - .HasColumnType("INTEGER"); + b.Property("AddRoleId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Enabled") - .HasColumnType("INTEGER"); + b.Property("Enabled") + .HasColumnType("INTEGER"); - b.Property("FromRoleId") - .HasColumnType("INTEGER"); + b.Property("FromRoleId") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .HasColumnType("TEXT"); + b.Property("Keyword") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("StreamRoleSettings"); - }); + b.ToTable("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleWhitelistedUser"); - }); + b.ToTable("StreamRoleWhitelistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ArchiveId") - .HasColumnType("INTEGER"); + b.Property("ArchiveId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsDone") - .HasColumnType("INTEGER"); + b.Property("IsDone") + .HasColumnType("INTEGER"); - b.Property("Todo") - .HasColumnType("TEXT"); + b.Property("Todo") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ArchiveId"); + b.HasIndex("ArchiveId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Todos"); - }); + b.ToTable("Todos"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnbanTimer"); - }); + b.ToTable("UnbanTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnmuteAt") - .HasColumnType("TEXT"); + b.Property("UnmuteAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnmuteTimer"); - }); + b.ToTable("UnmuteTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnroleTimer"); - }); + b.ToTable("UnroleTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AwardedXp") - .HasColumnType("INTEGER"); + b.Property("AwardedXp") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); + b.Property("NotifyOnLevelUp") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AwardedXp"); + b.HasIndex("AwardedXp"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.HasIndex("Xp"); + b.HasIndex("Xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique(); + b.HasIndex("UserId", "GuildId") + .IsUnique(); - b.ToTable("UserXpStats"); - }); + b.ToTable("UserXpStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("VcRoleInfo"); - }); + b.ToTable("VcRoleInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AffinityId") - .HasColumnType("INTEGER"); + b.Property("AffinityId") + .HasColumnType("INTEGER"); - b.Property("ClaimerId") - .HasColumnType("INTEGER"); + b.Property("ClaimerId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("WaifuId") - .HasColumnType("INTEGER"); + b.Property("WaifuId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AffinityId"); + b.HasIndex("AffinityId"); - b.HasIndex("ClaimerId"); + b.HasIndex("ClaimerId"); - b.HasIndex("Price"); + b.HasIndex("Price"); - b.HasIndex("WaifuId") - .IsUnique(); + b.HasIndex("WaifuId") + .IsUnique(); - b.ToTable("WaifuInfo"); - }); + b.ToTable("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemEmoji") - .HasColumnType("TEXT"); + b.Property("ItemEmoji") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); + b.Property("WaifuInfoId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("WaifuInfoId"); + b.HasIndex("WaifuInfoId"); - b.ToTable("WaifuItem"); - }); + b.ToTable("WaifuItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("NewId") - .HasColumnType("INTEGER"); + b.Property("NewId") + .HasColumnType("INTEGER"); - b.Property("OldId") - .HasColumnType("INTEGER"); + b.Property("OldId") + .HasColumnType("INTEGER"); - b.Property("UpdateType") - .HasColumnType("INTEGER"); + b.Property("UpdateType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("NewId"); + b.HasIndex("NewId"); - b.HasIndex("OldId"); + b.HasIndex("OldId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("WaifuUpdates"); - }); + b.ToTable("WaifuUpdates"); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Forgiven") - .HasColumnType("INTEGER"); + b.Property("Forgiven") + .HasColumnType("INTEGER"); - b.Property("ForgivenBy") - .HasColumnType("TEXT"); + b.Property("ForgivenBy") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Moderator") - .HasColumnType("TEXT"); + b.Property("Moderator") + .HasColumnType("TEXT"); - b.Property("Reason") - .HasColumnType("TEXT"); + b.Property("Reason") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(1L); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DateAdded"); + b.HasIndex("DateAdded"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Warnings"); - }); + b.ToTable("Warnings"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Count") - .HasColumnType("INTEGER"); + b.Property("Count") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Punishment") - .HasColumnType("INTEGER"); + b.Property("Punishment") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("Time") - .HasColumnType("INTEGER"); + b.Property("Time") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("WarningPunishment"); - }); + b.ToTable("WarningPunishment"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("XpCurrencyReward"); - }); + b.ToTable("XpCurrencyReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("Remove") - .HasColumnType("INTEGER"); + b.Property("Remove") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); - b.ToTable("XpRoleReward"); - }); + b.ToTable("XpRoleReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); + b.Property("ServerExcluded") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("XpSettings"); - }); + b.ToTable("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsUsing") - .HasColumnType("INTEGER"); + b.Property("IsUsing") + .HasColumnType("INTEGER"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique(); - b.ToTable("XpShopOwnedItem"); - }); + b.ToTable("XpShopOwnedItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } -- 2.43.0 From 3a36799941cd741f3b98f0370423579001e7c09a Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 14:36:56 +1200 Subject: [PATCH 007/253] Updated data files --- src/EllieBot/data/aliases.yml | 2 ++ .../data/strings/commands/commands.en-US.yml | 30 ++++++++++++++----- .../strings/responses/responses.en-US.json | 3 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index b1b3cb4..064dfb2 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -1192,6 +1192,8 @@ xpreset: - xpreset bible: - bible +quran: + - quran edit: - edit delete: diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 080b606..a444726 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -64,7 +64,7 @@ greetmsg: desc: |- Sets a new join announcement message which will be shown in the current channel. Write `%user.mention%` if you want to mention the new member. - Full list of placeholders can be found here + Full list of placeholders can be found here Using this command with no message will show the current greet message. You can use embed json from instead of regular text, if you want the message to be embedded. ex: @@ -82,7 +82,7 @@ byemsg: desc: |- Sets a new leave announcement message which will be shown in the current channel. Type `%user.name%` to show the name of the user who left. - Full list of placeholders can be found here + Full list of placeholders can be found here Using this command with no message will show the current bye message. You can use embed json from instead of regular text, if you want the message to be embedded. ex: @@ -138,7 +138,7 @@ boostmsg: desc: |- Sets a new boost announcement message which will be shown in the current channel. Type `%user.mention%` if you want to mention the booster. - Full list of placeholders can be found here + Full list of placeholders can be found here Using this command with no message will show the current boost message. You can use embed json from instead of regular text, if you want the message to be embedded. ex: @@ -378,7 +378,7 @@ iamnot: - role: desc: "The role to remove." expradd: - desc: 'Add an expression with a trigger and a response. Bot will post a response whenever someone types the trigger word. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only and adds a new global expression. Guide [here]()' + desc: 'Add an expression with a trigger and a response. Bot will post a response whenever someone types the trigger word. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only and adds a new global expression. Guide [here]()' ex: - '"hello" Hi there %user.mention%' params: @@ -387,7 +387,7 @@ expradd: response: desc: "The text of the message that shows up when a user types the trigger word." expraddserver: - desc: 'Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `{0}dpo`. Guide [here]().' + desc: 'Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `{0}dpo`. Guide [here]().' ex: - '"hello" Hi there %user.mention%' params: @@ -2180,7 +2180,7 @@ delallquotes: - keyword: desc: "The keyword to search for in the text." greetdmmsg: - desc: Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded. + desc: Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded. ex: - Welcome to the server, %user.mention% params: @@ -2289,7 +2289,11 @@ emojiremove: - emotes: desc: "The list of emojis to be removed from the server." stickeradd: - desc: Adds the sticker from your message to this server. Send the sticker along with this command (in the same message). + desc: |- + Adds the sticker from your message to this server. + Send the sticker along with this command (in the same message). + Alternatively you can upload an image along with this command but you have to specify the name. + The image must be 300x300 in .png or .apng format and up to 512KB in size. ex: - '' - name "description" tag1 tag2 tagN @@ -4076,6 +4080,16 @@ bible: desc: "The name of the biblical book being referenced." chapterAndVerse: desc: "The reference to a specific passage in the Bible, such as 'Genesis 3:15'" +quran: + desc: |- + Shows the text of an ayah of the Quran, as well as the recitation by Alafasy. + Supply surah:ayah, or ayah number. For instance, 262 or 2:255 will both get you Ayat Al Kursi + ex: + - 2:255 + - 262 + params: + - ayah: + desc: "The number of the ayah in the Quran, for example 2:255." edit: desc: Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel. Supports embeds. ex: @@ -4200,7 +4214,7 @@ marmaladeunload: desc: "The name of a specific marmalade to be unloaded." marmaladeinfo: desc: |- - Shows information about the specified marmalade such as the author, name, description, list of sneks, number of commands etc. + Shows information about the specified marmalade such as the author, name, description, list of canaries, number of commands etc. Provide no name to see the basic information about all loaded marmalades. Read about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/) ex: diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index a6e6608..7e45dd8 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -1067,8 +1067,7 @@ "xpshop_already_owned": "You already own this item.", "xpshop_item_not_found": "An item with that key doesn't exist.", "xpshop_website": "You can see the list of all Xp Shop items here: ", - "sticker_invalid_size": "Stickers must be exactly 300x300 pixels.", - "sticker_error": "You must either send a sticker along with this command, or upload a 300x300 .png or .apng image.", + "sticker_error": "You must either send a sticker along with this command, or upload a 300x300 .png or .apng image. Up to 512KB in size.", "sticker_missing_name": "Please specify a name for the sticker.", "thread_deleted": "Thread Deleted", "thread_created": "Thread Created", -- 2.43.0 From 2d7f345c40cac79a93ff394406df865f22ed953a Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 18:10:58 +1200 Subject: [PATCH 008/253] Updated Common files --- src/EllieBot/_common/Creds.cs | 2 +- src/EllieBot/_common/DbService.cs | 2 +- src/EllieBot/_common/Interaction/EllieInteraction.cs | 2 +- src/EllieBot/_common/Interaction/EllieInteractionService.cs | 3 ++- .../_common/Interaction/Models/EllieButtonInteraction.cs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/EllieBot/_common/Creds.cs b/src/EllieBot/_common/Creds.cs index 02b62b2..295b1de 100644 --- a/src/EllieBot/_common/Creds.cs +++ b/src/EllieBot/_common/Creds.cs @@ -34,7 +34,7 @@ public sealed class Creds : IBotCredentials Go to https://dashy.elliebot.net/me and login with your discord account Go to the Keys page and click "Generate New Key" and copy it here You and anyone else with the permission to run `.prompt` command will be able to use natural language to run bot's commands. - For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command + For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command. """)] public string EllieAiToken { get; set; } diff --git a/src/EllieBot/_common/DbService.cs b/src/EllieBot/_common/DbService.cs index cdff91f..46d2016 100644 --- a/src/EllieBot/_common/DbService.cs +++ b/src/EllieBot/_common/DbService.cs @@ -11,5 +11,5 @@ public abstract class DbService public abstract Task SetupAsync(); public abstract DbContext CreateRawDbContext(string dbType, string connString); - public abstract DbContext GetDbContext(); + public abstract EllieContext GetDbContext(); } \ No newline at end of file diff --git a/src/EllieBot/_common/Interaction/EllieInteraction.cs b/src/EllieBot/_common/Interaction/EllieInteraction.cs index c35cebd..05b258f 100644 --- a/src/EllieBot/_common/Interaction/EllieInteraction.cs +++ b/src/EllieBot/_common/Interaction/EllieInteraction.cs @@ -29,7 +29,7 @@ public abstract class EllieInteractionBase _onlyAuthor = onlyAuthor; _singleUse = singleUse; _clearAfter = clearAfter; - + _interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously); Client = client; diff --git a/src/EllieBot/_common/Interaction/EllieInteractionService.cs b/src/EllieBot/_common/Interaction/EllieInteractionService.cs index 2cdfe30..813ba1f 100644 --- a/src/EllieBot/_common/Interaction/EllieInteractionService.cs +++ b/src/EllieBot/_common/Interaction/EllieInteractionService.cs @@ -29,7 +29,8 @@ public class EllieInteractionService : IEllieInteractionService, IEService Func onTrigger, in T state, bool singleUse = true, - bool clearAfter = true) + bool clearAfter = true + ) => Create(userId, button, ((Func>)((data) diff --git a/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs b/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs index 80f5c92..0a80839 100644 --- a/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs +++ b/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs @@ -10,7 +10,7 @@ public sealed class EllieButtonInteractionHandler : EllieInteractionBase bool onlyAuthor, bool singleUse = true, bool clearAfter = true) - : base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse) + : base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse, clearAfter) { Button = button; } -- 2.43.0 From 499c2a9a5f0205fe0f040077889876ae9d0621f9 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 19:30:36 +1200 Subject: [PATCH 009/253] Updated Administration module --- .../Modules/Administration/Honeypot/HoneyPotService.cs | 5 ++--- .../Modules/Administration/Honeypot/HoneypotCommands.cs | 5 ++--- .../Modules/Administration/Honeypot/IHoneyPotService.cs | 5 ++--- .../Administration/ServerLog/DummyLogCommandService.cs | 2 +- .../Administration/ServerLog/ServerLogCommandService.cs | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs index 8108aad..8ff20ac 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs @@ -5,7 +5,7 @@ using EllieBot.Db.Models; using System.Threading.Channels; namespace EllieBot.Modules.Administration.Honeypot; -/* + public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoCommand, IEService { private readonly DbService _db; @@ -92,5 +92,4 @@ public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoC await _punishments.Writer.WriteAsync(sgu); } } -} -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs index 9a1f5b3..897d019 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs @@ -1,7 +1,7 @@ using EllieBot.Modules.Administration.Honeypot; namespace EllieBot.Modules.Administration; -/* + public partial class Administration { [Group] @@ -26,5 +26,4 @@ public partial class Administration await Response().Confirm(strs.honeypot_off).SendAsync(); } } -} -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs index c64e7b9..1483590 100644 --- a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs +++ b/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs @@ -1,7 +1,6 @@ namespace EllieBot.Modules.Administration.Honeypot; -/* + public interface IHoneyPotService { public Task ToggleHoneypotChannel(ulong guildId, ulong channelId); -} -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs index aade00c..00576b7 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs @@ -3,7 +3,7 @@ namespace EllieBot.Modules.Administration; public sealed class DummyLogCommandService : ILogCommandService -#if GLOBAL_NADEKO +#if GLOBAL_ELLIE , IEService #endif { diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs index 232f90d..6ea5345 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs @@ -8,8 +8,8 @@ using EllieBot.Db.Models; namespace EllieBot.Modules.Administration; public sealed class LogCommandService : ILogCommandService, IReadyExecutor -#if !GLOBAL_NADEKO - , IEService // don't load this service on global nadeko +#if !GLOBAL_ELLIE + , IEService // don't load this service on global ellie #endif { public ConcurrentDictionary GuildLogSettings { get; } -- 2.43.0 From f91771a8dbdbba39ed296fa9c8abd206537f0f81 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 20:35:25 +1200 Subject: [PATCH 010/253] Updated Games module --- .../Games/ChatterBot/ChatterbotService.cs | 8 +++--- .../ChatterBot/_common/OfficialGptSession.cs | 25 +++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs index bc357d6..a8c06d8 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs @@ -88,14 +88,16 @@ public class ChatterBotService : IExecOnMessage public string PrepareMessage(IUserMessage msg) { - var nadekoId = _client.CurrentUser.Id; - var normalMention = $"<@{nadekoId}> "; - var nickMention = $"<@!{nadekoId}> "; + var ellieId = _client.CurrentUser.Id; + var normalMention = $"<@{ellieId}> "; + var nickMention = $"<@!{ellieId}> "; string message; if (msg.Content.StartsWith(normalMention, StringComparison.InvariantCulture)) message = msg.Content[normalMention.Length..].Trim(); else if (msg.Content.StartsWith(nickMention, StringComparison.InvariantCulture)) message = msg.Content[nickMention.Length..].Trim(); + else if (msg.ReferencedMessage?.Author.Id == ellieId) + message = msg.Content; else return null; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs index 7a40df0..e822b53 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs @@ -3,10 +3,12 @@ using Newtonsoft.Json; using OneOf.Types; using System.Net.Http.Json; using SharpToken; +using System.CodeDom; +using System.Text.RegularExpressions; namespace EllieBot.Modules.Games.Common.ChatterBot; -public class OfficialGptSession : IChatterBotSession +public partial class OfficialGptSession : IChatterBotSession { private string Uri => $"https://api.openai.com/v1/chat/completions"; @@ -16,7 +18,7 @@ public class OfficialGptSession : IChatterBotSession private readonly int _maxHistory; private readonly int _maxTokens; private readonly int _minTokens; - private readonly string _nadekoUsername; + private readonly string _ellieUsername; private readonly GptEncoding _encoding; private List messages = new(); private readonly IHttpClientFactory _httpFactory; @@ -29,7 +31,7 @@ public class OfficialGptSession : IChatterBotSession int maxTokens, int minTokens, string personality, - string nadekoUsername, + string ellieUsername, IHttpClientFactory factory) { _apiKey = apiKey; @@ -45,24 +47,31 @@ public class OfficialGptSession : IChatterBotSession _maxHistory = chatHistory; _maxTokens = maxTokens; _minTokens = minTokens; - _nadekoUsername = nadekoUsername; + _ellieUsername = UsernameCleaner().Replace(ellieUsername, ""); _encoding = GptEncoding.GetEncodingForModel(_model); messages.Add(new() { Role = "system", Content = personality, - Name = _nadekoUsername + Name = _ellieUsername }); } + + [GeneratedRegex("[^a-zA-Z0-9_-]")] + private static partial Regex UsernameCleaner(); + public async Task>> Think(string input, string username) { + username = UsernameCleaner().Replace(username, ""); + messages.Add(new() { Role = "user", Content = input, Name = username }); + while (messages.Count > _maxHistory + 2) { messages.RemoveAt(1); @@ -103,8 +112,8 @@ public class OfficialGptSession : IChatterBotSession try { var response = JsonConvert.DeserializeObject(dataString); - - Log.Information("Received response: {response}", dataString); + + Log.Information("Received response: {response} ", dataString); var res = response?.Choices?[0]; var message = res?.Message?.Content; @@ -117,7 +126,7 @@ public class OfficialGptSession : IChatterBotSession { Role = "assistant", Content = message, - Name = _nadekoUsername + Name = _ellieUsername }); return new ThinkResult() -- 2.43.0 From 0787490aeaffe37816054bfa3f3f5f3da5017d92 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 7 Jul 2024 22:28:56 +1200 Subject: [PATCH 011/253] Updated Searches module --- .../Modules/Searches/ReligiousCommands.cs | 102 ++++++++++++++++++ .../Search/Searx/SearxSearchService.cs | 2 +- src/EllieBot/Modules/Searches/Searches.cs | 28 ----- 3 files changed, 103 insertions(+), 29 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/ReligiousCommands.cs diff --git a/src/EllieBot/Modules/Searches/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/ReligiousCommands.cs new file mode 100644 index 0000000..a15bc74 --- /dev/null +++ b/src/EllieBot/Modules/Searches/ReligiousCommands.cs @@ -0,0 +1,102 @@ +using EllieBot.Modules.Searches.Common; +using System.Net.Http.Json; +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Searches; + +public partial class Searches +{ + public partial class ReligiousCommands : EllieModule + { + private readonly IHttpClientFactory _httpFactory; + + public ReligiousCommands(IHttpClientFactory httpFactory) + { + _httpFactory = httpFactory; + } + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task Bible(string book, string chapterAndVerse) + { + var obj = new BibleVerses(); + try + { + using var http = _httpFactory.CreateClient(); + obj = await http.GetFromJsonAsync($"https://bible-api.com/{book} {chapterAndVerse}"); + } + catch + { + } + + if (obj.Error is not null || obj.Verses is null || obj.Verses.Length == 0) + await Response().Error(obj.Error ?? "No verse found.").SendAsync(); + else + { + var v = obj.Verses[0]; + await Response() + .Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle($"{v.BookName} {v.Chapter}:{v.Verse}") + .WithDescription(v.Text)) + .SendAsync(); + } + } + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task Quran(string ayah) + { + using var http = _httpFactory.CreateClient(); + + var obj = await http.GetFromJsonAsync>($"https://api.alquran.cloud/v1/ayah/{Uri.EscapeDataString(ayah)}/editions/en.asad,ar.alafasy"); + if(obj is null or not { Code: 200 }) + { + await Response().Error("No verse found.").SendAsync(); + return; + } + + var english = obj.Data[0]; + var arabic = obj.Data[1]; + + await using var audio = await http.GetStreamAsync(arabic.Audio); + + await Response() + .Embed(_sender.CreateEmbed() + .WithOkColor() + .AddField("Arabic", arabic.Text) + .AddField("English", english.Text) + .WithFooter(arabic.Number.ToString())) + .File(audio, Uri.EscapeDataString(ayah) + ".mp3") + .SendAsync(); + } + } +} + +public sealed class QuranResponse +{ + [JsonPropertyName("code")] + public int Code { get; set; } + + [JsonPropertyName("status")] + public string Status { get; set; } + + [JsonPropertyName("data")] + public T[] Data { get; set; } +} + +public sealed class QuranAyah +{ + [JsonPropertyName("number")] + public int Number { get; set; } + + [JsonPropertyName("audio")] + public string Audio { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("text")] + public string Text { get; set; } + +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs index 0d2d257..5d8ecc6 100644 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs +++ b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs @@ -33,7 +33,7 @@ public sealed class SearxSearchService : SearchServiceBase, IEService Log.Information("Using {Instance} instance for web search...", instanceUrl); var startTime = Stopwatch.GetTimestamp(); - + using var http = _http.CreateClient(); await using var res = await http.GetStreamAsync($"{instanceUrl}" + $"?q={Uri.EscapeDataString(query)}" diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 7fa6067..b085ea6 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -528,34 +528,6 @@ public partial class Searches : EllieModule } } - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Bible(string book, string chapterAndVerse) - { - var obj = new BibleVerses(); - try - { - using var http = _httpFactory.CreateClient(); - obj = await http.GetFromJsonAsync($"https://bible-api.com/{book} {chapterAndVerse}"); - } - catch - { - } - - if (obj.Error is not null || obj.Verses is null || obj.Verses.Length == 0) - await Response().Error(obj.Error ?? "No verse found.").SendAsync(); - else - { - var v = obj.Verses[0]; - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{v.BookName} {v.Chapter}:{v.Verse}") - .WithDescription(v.Text)) - .SendAsync(); - } - } - [Cmd] public async Task Steam([Leftover] string query) { -- 2.43.0 From f2618793b35581bb5678a8769f17fee66d41a6a8 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 00:36:45 +1200 Subject: [PATCH 012/253] Updated Utility module --- .../Modules/Utility/Ai/AiAssistantService.cs | 2 +- .../Utility/Ai/CommandPromptResultModel.cs | 2 +- .../Modules/Utility/ConfigCommands.cs | 2 +- src/EllieBot/Modules/Utility/Utility.cs | 101 ++++++++++++------ 4 files changed, 71 insertions(+), 36 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs index 422aae6..d57e48e 100644 --- a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs +++ b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs @@ -251,7 +251,7 @@ public sealed class AiAssistantService return false; await _cbs.RunChatterBot(sg, msg, channel, sess, query); - return false; + return true; } var commandString = GetCommandString(model); diff --git a/src/EllieBot/Modules/Utility/Ai/CommandPromptResultModel.cs b/src/EllieBot/Modules/Utility/Ai/CommandPromptResultModel.cs index 559d5b8..46b5f94 100644 --- a/src/EllieBot/Modules/Utility/Ai/CommandPromptResultModel.cs +++ b/src/EllieBot/Modules/Utility/Ai/CommandPromptResultModel.cs @@ -9,7 +9,7 @@ public sealed class CommandPromptResultModel [JsonPropertyName("arguments")] public Dictionary Arguments { get; set; } = new(); - + [JsonPropertyName("remaining")] [JsonConverter(typeof(NumberToStringConverter))] public string Remaining { get; set; } = string.Empty; diff --git a/src/EllieBot/Modules/Utility/ConfigCommands.cs b/src/EllieBot/Modules/Utility/ConfigCommands.cs index 57b8f4c..2627d11 100644 --- a/src/EllieBot/Modules/Utility/ConfigCommands.cs +++ b/src/EllieBot/Modules/Utility/ConfigCommands.cs @@ -8,7 +8,7 @@ public partial class Utility private readonly IEnumerable _settingServices; public ConfigCommands(IEnumerable settingServices) - => _settingServices = settingServices.Where(x => x.Name != "medusa"); + => _settingServices = settingServices.Where(x => x.Name != "marmalade"); [Cmd] [OwnerOnly] diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 7382403..e79b39d 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -459,47 +459,82 @@ public partial class Utility : EllieModule public async Task StickerAdd(string name = null, string description = null, params string[] tags) { string format; - Stream stream; - - if (ctx.Message.Stickers.Count is 1 && ctx.Message.Stickers.First() is SocketSticker ss) - { - name ??= ss.Name; - description = ss.Description; - tags = tags is null or { Length: 0 } ? ss.Tags.ToArray() : tags; - format = FormatToExtension(ss.Format); - - using var http = _httpFactory.CreateClient(); - stream = await http.GetStreamAsync(ss.GetStickerUrl()); - } - else - { - await Response().Error(strs.sticker_error).SendAsync(); - return; - } + Stream stream = null; try { - if (tags.Length == 0) - tags = [name]; + if (ctx.Message.Stickers.Count is 1 && ctx.Message.Stickers.First() is SocketSticker ss) + { + name ??= ss.Name; + description = ss.Description; + tags = tags is null or { Length: 0 } ? ss.Tags.ToArray() : tags; + format = FormatToExtension(ss.Format); - await ctx.Guild.CreateStickerAsync( - name, - stream, - $"{name}.{format}", - tags, - string.IsNullOrWhiteSpace(description) ? "Missing description" : description - ); + using var http = _httpFactory.CreateClient(); + stream = await http.GetStreamAsync(ss.GetStickerUrl()); + } + else if (ctx.Message.Attachments.Count is 1 && name is not null) + { + if (tags.Length == 0) + tags = [name]; - await ctx.OkAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error occurred while adding a sticker: {Message}", ex.Message); - await Response().Error(strs.error_occured).SendAsync(); + if (ctx.Message.Attachments.Count != 1) + { + await Response().Error(strs.sticker_error).SendAsync(); + return; + } + + var attach = ctx.Message.Attachments.First(); + + + if (attach.Size > 512_000 || attach.Width != 300 || attach.Height != 300) + { + await Response().Error(strs.sticker_error).SendAsync(); + return; + } + + format = attach.Filename + .Split('.') + .Last() + .ToLowerInvariant(); + + if (string.IsNullOrWhiteSpace(format) || (format != "png" && format != "apng")) + { + await Response().Error(strs.sticker_error).SendAsync(); + return; + } + + using var http = _httpFactory.CreateClient(); + stream = await http.GetStreamAsync(attach.Url); + } + else + { + await Response().Error(strs.sticker_error).SendAsync(); + return; + } + + try + { + await ctx.Guild.CreateStickerAsync( + name, + stream, + $"{name}.{format}", + tags, + string.IsNullOrWhiteSpace(description) ? "Missing description" : description + ); + + await ctx.OkAsync(); + } + catch + (Exception ex) + { + Log.Warning(ex, "Error occurred while adding a sticker: {Message}", ex.Message); + await Response().Error(strs.error_occured).SendAsync(); + } } finally { - await stream.DisposeAsync(); + await (stream?.DisposeAsync() ?? ValueTask.CompletedTask); } } -- 2.43.0 From 2ebed3f4414506aa894bbd29906b82e1ec92ac80 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 00:52:59 +1200 Subject: [PATCH 013/253] Updated Marmalades module --- .../Modules/Marmalades/{MarmaladesItem.cs => MarmaladeItem.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/EllieBot/Modules/Marmalades/{MarmaladesItem.cs => MarmaladeItem.cs} (100%) diff --git a/src/EllieBot/Modules/Marmalades/MarmaladesItem.cs b/src/EllieBot/Modules/Marmalades/MarmaladeItem.cs similarity index 100% rename from src/EllieBot/Modules/Marmalades/MarmaladesItem.cs rename to src/EllieBot/Modules/Marmalades/MarmaladeItem.cs -- 2.43.0 From 291b2fb580b5af43babf698577a90060b96bae5d Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 01:08:43 +1200 Subject: [PATCH 014/253] Updated Help module --- src/EllieBot/Modules/Help/Help.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EllieBot/Modules/Help/Help.cs b/src/EllieBot/Modules/Help/Help.cs index 4f9e916..f8fe29b 100644 --- a/src/EllieBot/Modules/Help/Help.cs +++ b/src/EllieBot/Modules/Help/Help.cs @@ -9,8 +9,8 @@ namespace EllieBot.Modules.Help; public sealed partial class Help : EllieModule { - public const string PATREON_URL = "https://patreon.com/toastie_t0ast"; - public const string PAYPAL_URL = "https://paypal.me/EmotionChild"; + public const string PATREON_URL = "https://patreon.com/elliebot"; + public const string PAYPAL_URL = "https://paypal.me/toastiet0ast"; private readonly ICommandsUtilityService _cus; private readonly CommandService _cmds; @@ -529,7 +529,7 @@ public sealed partial class Help : EllieModule *Keep in mind that running the bot on your computer means that the bot will be offline when you turn off your computer* - You can find the selfhosting guides by using the `.guide` command and clicking on the second link that pops up. - - If you decide to selfhost the bot, still consider [supporting the project](https://patreon.com/join/toastie_t0ast) to keep the development going :) + - If you decide to selfhost the bot, still consider [supporting the project](https://patreon.com/join/elliebot) to keep the development going :) """, true); @@ -551,7 +551,7 @@ public sealed partial class Help : EllieModule eb .WithDescription(""" EllieBot relies on donations to keep the servers, services and APIs running. - Donating will give you access to some exclusive features. You can read about them on the [patreon page](https://patreon.com/join/toastie_t0ast) + Donating will give you access to some exclusive features. You can read about them on the [patreon page](https://patreon.com/join/elliebot) """) .AddField("Donation Instructions", $""" @@ -559,7 +559,7 @@ public sealed partial class Help : EllieModule **Step 1:** ❤️ Pledge on Patreon ❤️ - `1.` Go to and choose a tier. + `1.` Go to and choose a tier. `2.` Make sure your payment is processed and accepted. **Step 2** 🤝 Connect your Discord account 🤝 -- 2.43.0 From 2be2cdf71397d69c2b1ebd7b74a7740dec132772 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 01:23:56 +1200 Subject: [PATCH 015/253] Updated changelog and upped version to 5.1.3 I might have also updated creds_example.yml --- CHANGELOG.md | 17 +++++++++++++++++ src/EllieBot/EllieBot.csproj | 2 +- src/EllieBot/creds_example.yml | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7faabc..47bf5fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o +## [5.1.3] - 08.07.2024 + +### Added + +- Added `'quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy + +### Changed + +- Replying to the bot's message in the channel where chatterbot is enabled will also trigger the ai response, as if you pinged the bot. This only works for chatterbot, but not for ellie ai command prompts + +### Fixed + +- Fixed `'stickeradd` it now properly supports 300x300 image uploads. +- Bot should now trim the invalid characters from chatterbot usernames to avoid openai errors +- Fixed prompt triggering chatterbot responses twice +- Honeypot commands now actually works + ## [5.1.2] - 29.06.2024 ### Fixed diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 174d25d..86a9972 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.2 + 5.1.3 $(MSBuildProjectDirectory) diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index 8657b8b..c21a350 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -1,4 +1,4 @@ -# DO NOT CHANGE +# DO NOT CHANGE version: 7 # Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/ token: "" @@ -18,6 +18,7 @@ totalShards: 1 # Go to the Keys page and click "Generate New Key" and copy it here # You and anyone else with the permission to run `.prompt` command will be able to use natural language to run bot's commands. # For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command. +# ⚠ This does not currently work and is a work in progress. ellieAiToken: # Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it. # Then, go to APIs and Services -> Credentials and click Create credentials -> API key. -- 2.43.0 From 94129fb3e230f219e1c9d91f1d73212f1a4d2ba6 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 01:28:26 +1200 Subject: [PATCH 016/253] Fixed a word being wrong in the EllieMarmalade project --- src/Ellie.Marmalade/Attributes/svcAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ellie.Marmalade/Attributes/svcAttribute.cs b/src/Ellie.Marmalade/Attributes/svcAttribute.cs index a453303..df9cdde 100644 --- a/src/Ellie.Marmalade/Attributes/svcAttribute.cs +++ b/src/Ellie.Marmalade/Attributes/svcAttribute.cs @@ -1,7 +1,7 @@ namespace EllieBot.Marmalade; /// -/// Marks the class as a service which can be used within the same Medusa +/// Marks the class as a service which can be used within the same Marmalade /// [AttributeUsage(AttributeTargets.Class)] public class svcAttribute : Attribute -- 2.43.0 From e100526d8030a36f9f0094c37f707851181be157 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 01:30:14 +1200 Subject: [PATCH 017/253] Found more words that were wrong If I find more I am going to scream --- src/EllieBot/Bot.cs | 2 +- .../_common/Marmalade/Common/Adapters/FilterAdapter.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index b312624..9ab0f92 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -110,7 +110,7 @@ public sealed class Bot : IBot var svcs = new Container(); - // this is required in order for medusa unloading to work + // this is required in order for marmalade unloading to work // svcs.Components.Remove(); // svcs.Components.Add(); diff --git a/src/EllieBot/_common/Marmalade/Common/Adapters/FilterAdapter.cs b/src/EllieBot/_common/Marmalade/Common/Adapters/FilterAdapter.cs index a23ceec..69aec21 100644 --- a/src/EllieBot/_common/Marmalade/Common/Adapters/FilterAdapter.cs +++ b/src/EllieBot/_common/Marmalade/Common/Adapters/FilterAdapter.cs @@ -19,11 +19,11 @@ public class FilterAdapter : PreconditionAttribute CommandInfo command, IServiceProvider services) { - var medusaContext = ContextAdapterFactory.CreateNew(context, + var marmaladeContext = ContextAdapterFactory.CreateNew(context, _strings, services); - var result = await _filterAttribute.CheckAsync(medusaContext); + var result = await _filterAttribute.CheckAsync(marmaladeContext); if (!result) return PreconditionResult.FromError($"Precondition '{_filterAttribute.GetType().Name}' failed."); -- 2.43.0 From 187c56e8c730cbd82fea8cceafa4509173f463bb Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 01:34:34 +1200 Subject: [PATCH 018/253] I found more and I hate everything I am slowly losing my sanity --- .../Administration/UserPunish/UserPunishService.cs | 2 +- src/EllieBot/Modules/Searches/Crypto/CryptoService.cs | 2 +- src/EllieBot/Modules/Searches/SearchesService.cs | 4 ++-- src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index 5847bea..cdc9900 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -228,7 +228,7 @@ public class UserPunishService : IEService, IReadyExecutor case PunishmentAction.RemoveRoles: return botUser.GuildPermissions.ManageRoles; case PunishmentAction.ChatMute: - return botUser.GuildPermissions.ManageRoles; // adds nadeko-mute role + return botUser.GuildPermissions.ManageRoles; // adds ellie-mute role case PunishmentAction.VoiceMute: return botUser.GuildPermissions.MuteMembers; case PunishmentAction.AddRole: diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index a28f96e..146dac3 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -130,7 +130,7 @@ public class CryptoService : IEService await _getCryptoLock.WaitAsync(); try { - var data = await _cache.GetOrAddAsync(new("nadeko:crypto_data"), + var data = await _cache.GetOrAddAsync(new("ellie:crypto_data"), async () => { try diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 0a9431e..f5e3be4 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -126,7 +126,7 @@ public class SearchesService : IEService { query = query.Trim().ToLowerInvariant(); - return await _c.GetOrAddAsync(new($"nadeko_weather_{query}"), + return await _c.GetOrAddAsync(new($"ellie_weather_{query}"), async () => await GetWeatherDataFactory(query), TimeSpan.FromHours(3)); } @@ -156,7 +156,7 @@ public class SearchesService : IEService public Task<((string Address, DateTime Time, string TimeZoneName), TimeErrors?)> GetTimeDataAsync(string arg) => GetTimeDataFactory(arg); - //return _cache.GetOrAddCachedDataAsync($"nadeko_time_{arg}", + //return _cache.GetOrAddCachedDataAsync($"ellie_time_{arg}", // GetTimeDataFactory, // arg, // TimeSpan.FromMinutes(1)); diff --git a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs index d57e48e..612247b 100644 --- a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs +++ b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs @@ -196,14 +196,14 @@ public sealed class AiAssistantService if (guild is not SocketGuild sg) return false; - var nadekoId = _client.CurrentUser.Id; + var ellieId = _client.CurrentUser.Id; var channel = msg.Channel as ITextChannel; if (channel is null) return false; - var normalMention = $"<@{nadekoId}> "; - var nickMention = $"<@!{nadekoId}> "; + var normalMention = $"<@{ellieId}> "; + var nickMention = $"<@!{ellieId}> "; string query; if (msg.Content.StartsWith(normalMention, StringComparison.InvariantCulture)) query = msg.Content[normalMention.Length..].Trim(); @@ -293,7 +293,7 @@ public sealed class AiAssistantService GetCommandErrorResult.RateLimitHit => "You've spent your daily requests quota.", GetCommandErrorResult.NotAuthorized - => "In order to use this command you have to have a 5$ or higher subscription at ", + => "In order to use this command you have to have a 5$ or higher subscription at ", GetCommandErrorResult.Unknown => "The service is temporarily unavailable.", _ => throw new ArgumentOutOfRangeException() -- 2.43.0 From 06802f42a3e62fb6dbd657df847ba54f9e1d2705 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 8 Jul 2024 14:37:13 +1200 Subject: [PATCH 019/253] Added privacy-policy.md --- privacy-policy.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 privacy-policy.md diff --git a/privacy-policy.md b/privacy-policy.md new file mode 100644 index 0000000..25c43ce --- /dev/null +++ b/privacy-policy.md @@ -0,0 +1,11 @@ +# Privacy Policy + +## Profile Information +Ellie stores userids, avatars, usernames, discriminators and nicknames of users who were targeted by or have used commands which require Xp, Clubs or Waifu features (not limited to these, as other features may be added over time). + +## Other +Ellie doesn't do analytics, doesn't store messages, doesn't track users, doesn't store their emails etc. +Ellie only stores user settings and states as the result of executed commands or as the effect of administration tools (for example warnings or protection commands). + +## Sensitive Information +Ellie doesn't store sensitive information, and users are strongly discouraged from adding their passwords, keys, or other important information as quotes or expressions. \ No newline at end of file -- 2.43.0 From e521c82d9678cbb256f1a17678ceba0d55c13aed Mon Sep 17 00:00:00 2001 From: toastie_t0ast Date: Mon, 8 Jul 2024 05:50:17 -0700 Subject: [PATCH 020/253] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47bf5fc..c0e1df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da - Remind will now show a timestamp tag for durations - Only `Gpt35Turbo` and `Gpt4o` are valid inputs in games.yml now - `data/patron.yml` changed. It now has limits. The entire feature limit system has been reworked. Your previous settings will be reset -- A lot of updates to bot strings (thanks Ene) +- A lot of updates to bot strings - Improved cleanup command to delete a lot more data once cleanup is ran, not only guild configs (please don't use this command unless you have your database bakced up and you know 100% what you're doing) ### Fixed @@ -61,7 +61,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da - Fixed shopbuy %user% placeholders and updated help text - All 'feed overloads should now work" - `'xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads. -- Fixed remind not showing correct time (thx cata) +- Fixed remind not showing correct time ### Removed -- 2.43.0 From c3340a16ba55876e58d6c6dd8a9267e336036f9b Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:40:34 +1200 Subject: [PATCH 021/253] Updated data files --- src/EllieBot/data/aliases.yml | 8 ++++- .../data/strings/commands/commands.en-US.yml | 35 +++++++++++++++---- .../strings/responses/responses.en-US.json | 2 ++ 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 064dfb2..9140342 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -30,6 +30,8 @@ greettest: - greettest greetdmtest: - greetdmtest +boosttest: + - boosttest byetest: - byetest boost: @@ -1404,4 +1406,8 @@ cleanupguilddata: prompt: - prompt honeypot: - - honeypot \ No newline at end of file + - honeypot +coins: + - coins + - crypto + - cryptos \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index a444726..d137d44 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -112,6 +112,14 @@ greettest: params: - user: desc: "The user to impersonate when sending the greeting, defaulting to yourself if not specified." +boosttest: + desc: Sends the boost message in the current channel as if you just boosted the server. You can optionally specify a different user. + ex: + - '' + - '@SomeoneElse' + params: + - user: + desc: "The user to impersonate when sending the boost message, defaulting to yourself if not specified." greetdmtest: desc: Sends the greet direct message to you as if you just joined the server. You can optionally specify a different user. ex: @@ -2748,8 +2756,10 @@ waifutransfer: desc: "The user to whom ownership of the waifu is being transferred." waifugift: desc: -| - Gift an item to someone. - This will increase their waifu value by a percentage of the gift's value. + Gift an item to a waifu user. + The waifu's value will be increased by the percentage of the gift's value. + You can optionally prefix the gift with a multiplier to gift the item that many times. + For example, 3xRose will give the waifu 3 roses, 10xBread will give the waifu 10 breads. Do not use plural forms. Negative gifts will not show up in waifuinfo. Provide no parameters to see a list of items that you can gift. ex: @@ -2757,9 +2767,9 @@ waifugift: - Rose @Himesama params: - page: - desc: "The number of pages to display when listing available gifting options." - - itemName: - desc: "The name of an item to be gifted, which is used to determine the percentage increase in waifu value." + desc: "The number of the page to display." + - items: + desc: "The name of an item to be gifted. With an optional multiplier prefix." waifu: desc: "The user who is receiving the gift." waifulb: @@ -4256,8 +4266,10 @@ bankbalance: Shows how much currency is in your bank account. This differs from your cash amount, as the cash amount is publicly available, but only you have access to your bank balance. However, you have to withdraw it first in order to use it. + Bot Owner can also check another user's bank balance. ex: - '' + - '@User' params: - {} banktake: @@ -4545,4 +4557,15 @@ honeypot: ex: - '' params: - - {} \ No newline at end of file + - {} +coins: + desc: |- + Shows a list of 10 crypto currencies ordered by market cap. + Shows their price, change in the last24h, market cap and circulating and total supply. + Paginated with 10 per page. + ex: + - '' + - '2' + params: + - page: + desc: "Page number to show. Starts at 1." diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 7e45dd8..4c0893e 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -889,6 +889,7 @@ "club_kick_hierarchy": "Only club owner can kick club admins. Owner can't be kicked.", "club_renamed": "Club has been renamed to {0}", "club_name_taken": "A club with that name already exists.", + "rank": "Rank", "template_reloaded": "Xp template has been reloaded.", "expr_edited": "Expression Edited", "self_assign_are_exclusive": "You can only choose 1 role from each group.", @@ -1039,6 +1040,7 @@ "marmalade_already_loaded": "Marmalade {0} is already loaded", "marmalade_invalid_not_found": "Marmalade with that name wasn't found or the file was invalid", "bank_balance": "You have {0} in your bank account.", + "bank_balance_other": "User {0} has {1} in the bank.", "bank_deposited": "You deposited {0} to your bank account.", "bank_withdrew": "You withdrew {0} from your bank account.", "bank_withdraw_insuff": "You don't have sufficient {0} in your bank account.", -- 2.43.0 From 32db627aef3476570d51177cff16d7aacf6ac33f Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:43:33 +1200 Subject: [PATCH 022/253] Updated Administration module --- .../Administration/GreetBye/GreetCommands.cs | 14 ++++++++++++++ .../Administration/GreetBye/GreetService.cs | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs index 53dd058..104e4e7 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs @@ -225,5 +225,19 @@ public partial class Administration if (!enabled) await Response().Pending(strs.greetdmmsg_enable($"`{prefix}greetdm`")).SendAsync(); } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public async Task BoostTest([Leftover] IGuildUser? user = null) + { + user ??= (IGuildUser)ctx.User; + + await _service.BoostTest((ITextChannel)ctx.Channel, user); + var enabled = _service.GetBoostEnabled(ctx.Guild.Id); + if (!enabled) + await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index aec7e9e..1511913 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -242,7 +242,7 @@ public class GreetService : IEService, IReadyExecutor guild: channel.Guild, channel: channel, users: users.ToArray()); - + var text = SmartText.CreateFrom(conf.ChannelGreetMessageText); text = await _repSvc.ReplaceAsync(text, repCtx); try @@ -630,6 +630,13 @@ public class GreetService : IEService, IReadyExecutor return conf.SendChannelByeMessage; } + public bool GetBoostEnabled(ulong guildId) + { + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + return conf.SendBoostMessage; + } + #endregion #region Test Messages -- 2.43.0 From 90dd47e0132a20b2e653d0c2e581d123f76fb49c Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:44:07 +1200 Subject: [PATCH 023/253] Updated Gambling module I really need to rename this module. --- .../Modules/Gambling/Bank/BankCommands.cs | 21 ++ .../Gambling/Waifus/WaifuClaimCommands.cs | 64 ++--- .../Modules/Gambling/Waifus/WaifuService.cs | 234 ++++++++++-------- .../Waifus/_common/MultipleWaifuItems.cs | 6 + .../_common/MultipleWaifuItemsTypeReader.cs | 47 ++++ 5 files changed, 239 insertions(+), 133 deletions(-) create mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs create mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs diff --git a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs b/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs index 91388ef..ee66b6e 100644 --- a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs +++ b/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs @@ -74,6 +74,27 @@ public partial class Gambling } } + [Cmd] + [OwnerOnly] + public async Task BankBalance([Leftover] IUser user) + { + var bal = await _bank.GetBalanceAsync(user.Id); + + var eb = _sender.CreateEmbed() + .WithOkColor() + .WithDescription(GetText(strs.bank_balance_other(user.ToString(), N(bal)))); + + try + { + await Response().User(ctx.User).Embed(eb).SendAsync(); + await ctx.OkAsync(); + } + catch + { + await Response().Error(strs.cant_dm).SendAsync(); + } + } + private async Task BankTakeInternalAsync(long amount, ulong userId) { if (await _bank.TakeAsync(userId, amount)) diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index 5f7db11..19b1dc5 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -3,6 +3,7 @@ using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; +using TwitchLib.Api.Helix.Models.Teams; namespace EllieBot.Modules.Gambling; @@ -21,8 +22,8 @@ public partial class Gambling { var price = _service.GetResetPrice(ctx.User); var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.waifu_reset_confirm)) - .WithDescription(GetText(strs.waifu_reset_price(Format.Bold(N(price))))); + .WithTitle(GetText(strs.waifu_reset_confirm)) + .WithDescription(GetText(strs.waifu_reset_price(Format.Bold(N(price))))); if (!await PromptUserConfirmAsync(embed)) return; @@ -307,24 +308,26 @@ public partial class Gambling fansStr = "-"; var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.waifu) - + " " - + (wi.FullName ?? name ?? targetId.ToString()) - + " - \"the " - + _service.GetClaimTitle(wi.ClaimCount) - + "\"") - .AddField(GetText(strs.price), N(wi.Price), true) - .AddField(GetText(strs.claimed_by), wi.ClaimerName ?? nobody, true) - .AddField(GetText(strs.likes), wi.AffinityName ?? nobody, true) - .AddField(GetText(strs.changes_of_heart), $"{wi.AffinityCount} - \"the {affInfo}\"", true) - .AddField(GetText(strs.divorces), wi.DivorceCount.ToString(), true) - .AddField("\u200B", "\u200B", true) - .AddField(GetText(strs.fans(fansList.Count)), fansStr, true) - .AddField($"Waifus ({wi.ClaimCount})", - wi.ClaimCount == 0 ? nobody : claimsStr, - true) - .AddField(GetText(strs.gifts), itemsStr, true); + .WithOkColor() + .WithTitle(GetText(strs.waifu) + + " " + + (wi.FullName ?? name ?? targetId.ToString()) + + " - \"the " + + _service.GetClaimTitle(wi.ClaimCount) + + "\"") + .AddField(GetText(strs.price), N(wi.Price), true) + .AddField(GetText(strs.claimed_by), wi.ClaimerName ?? nobody, true) + .AddField(GetText(strs.likes), wi.AffinityName ?? nobody, true) + .AddField(GetText(strs.changes_of_heart), + $"{wi.AffinityCount} - \"the {affInfo}\"", + true) + .AddField(GetText(strs.divorces), wi.DivorceCount.ToString(), true) + .AddField("\u200B", "\u200B", true) + .AddField(GetText(strs.fans(fansList.Count)), fansStr, true) + .AddField($"Waifus ({wi.ClaimCount})", + wi.ClaimCount == 0 ? nobody : claimsStr, + true) + .AddField(GetText(strs.gifts), itemsStr, true); await Response().Embed(embed).SendAsync(); } @@ -348,7 +351,7 @@ public partial class Gambling .Page((items, _) => { var embed = _sender.CreateEmbed().WithTitle(GetText(strs.waifu_gift_shop)).WithOkColor(); - + items .ToList() .ForEach(x => embed.AddField( @@ -364,30 +367,27 @@ public partial class Gambling [Cmd] [RequireContext(ContextType.Guild)] [Priority(0)] - public async Task WaifuGift(string itemName, [Leftover] IUser waifu) + public async Task WaifuGift(MultipleWaifuItems items, [Leftover] IUser waifu) { if (waifu.Id == ctx.User.Id) return; - var allItems = _service.GetWaifuItems(); - var item = allItems.FirstOrDefault(x => x.Name.ToLowerInvariant() == itemName.ToLowerInvariant()); - if (item is null) - { - await Response().Error(strs.waifu_gift_not_exist).SendAsync(); - return; - } - - var sucess = await _service.GiftWaifuAsync(ctx.User, waifu, item); + var sucess = await _service.GiftWaifuAsync(ctx.User, waifu, items.Item, items.Count); if (sucess) { await Response() - .Confirm(strs.waifu_gift(Format.Bold(item + " " + item.ItemEmoji), + .Confirm(strs.waifu_gift(Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), Format.Bold(waifu.ToString()))) .SendAsync(); } else await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); } + + private static string GetCountString(MultipleWaifuItems items) + => items.Count > 1 + ? $"{items.Count}x " + : string.Empty; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs index dded8a9..ab5e021 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs @@ -7,6 +7,7 @@ using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; +using SixLabors.ImageSharp; namespace EllieBot.Modules.Gambling.Services; @@ -89,9 +90,14 @@ public class WaifuService : IEService, IReadyExecutor if (waifu is null) return settings.Waifu.MinPrice; - var divorces = uow.Set().Count(x - => x.Old != null && x.Old.UserId == user.Id && x.UpdateType == WaifuUpdateType.Claimed && x.New == null); - var affs = uow.Set().AsQueryable() + var divorces = uow.Set() + .Count(x + => x.Old != null + && x.Old.UserId == user.Id + && x.UpdateType == WaifuUpdateType.Claimed + && x.New == null); + var affs = uow.Set() + .AsQueryable() .Where(w => w.User.UserId == user.Id && w.UpdateType == WaifuUpdateType.AffinityChanged && w.New != null) @@ -110,12 +116,14 @@ public class WaifuService : IEService, IReadyExecutor if (!await _cs.RemoveAsync(user.Id, price, new("waifu", "reset"))) return false; - var affs = uow.Set().AsQueryable() + var affs = uow.Set() + .AsQueryable() .Where(w => w.User.UserId == user.Id && w.UpdateType == WaifuUpdateType.AffinityChanged && w.New != null); - var divorces = uow.Set().AsQueryable() + var divorces = uow.Set() + .AsQueryable() .Where(x => x.Old != null && x.Old.UserId == user.Id && x.UpdateType == WaifuUpdateType.Claimed @@ -158,20 +166,22 @@ public class WaifuService : IEService, IReadyExecutor result = WaifuClaimResult.NotEnoughFunds; else { - uow.Set().Add(w = new() - { - Waifu = waifu, - Claimer = claimer, - Affinity = null, - Price = amount - }); - uow.Set().Add(new() - { - User = waifu, - Old = null, - New = claimer, - UpdateType = WaifuUpdateType.Claimed - }); + uow.Set() + .Add(w = new() + { + Waifu = waifu, + Claimer = claimer, + Affinity = null, + Price = amount + }); + uow.Set() + .Add(new() + { + User = waifu, + Old = null, + New = claimer, + UpdateType = WaifuUpdateType.Claimed + }); result = WaifuClaimResult.Success; } } @@ -186,13 +196,14 @@ public class WaifuService : IEService, IReadyExecutor w.Price = amount + (amount / 4); result = WaifuClaimResult.Success; - uow.Set().Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = w.Claimer, - UpdateType = WaifuUpdateType.Claimed - }); + uow.Set() + .Add(new() + { + User = w.Waifu, + Old = oldClaimer, + New = w.Claimer, + UpdateType = WaifuUpdateType.Claimed + }); } } else if (amount >= w.Price * settings.Waifu.Multipliers.NormalClaim) // if no affinity @@ -206,13 +217,14 @@ public class WaifuService : IEService, IReadyExecutor w.Price = amount; result = WaifuClaimResult.Success; - uow.Set().Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = w.Claimer, - UpdateType = WaifuUpdateType.Claimed - }); + uow.Set() + .Add(new() + { + User = w.Waifu, + Old = oldClaimer, + New = w.Claimer, + UpdateType = WaifuUpdateType.Claimed + }); } } else @@ -241,29 +253,31 @@ public class WaifuService : IEService, IReadyExecutor remaining = await _cache.GetRatelimitAsync(GetAffinityKey(user.Id), 30.Minutes()); - + if (remaining is not null) { } else if (w is null) { var thisUser = uow.GetOrCreateUser(user); - uow.Set().Add(new() - { - Affinity = newAff, - Waifu = thisUser, - Price = 1, - Claimer = null - }); + uow.Set() + .Add(new() + { + Affinity = newAff, + Waifu = thisUser, + Price = 1, + Claimer = null + }); success = true; - uow.Set().Add(new() - { - User = thisUser, - Old = null, - New = newAff, - UpdateType = WaifuUpdateType.AffinityChanged - }); + uow.Set() + .Add(new() + { + User = thisUser, + Old = null, + New = newAff, + UpdateType = WaifuUpdateType.AffinityChanged + }); } else { @@ -272,13 +286,14 @@ public class WaifuService : IEService, IReadyExecutor w.Affinity = newAff; success = true; - uow.Set().Add(new() - { - User = w.Waifu, - Old = oldAff, - New = newAff, - UpdateType = WaifuUpdateType.AffinityChanged - }); + uow.Set() + .Add(new() + { + User = w.Waifu, + Old = oldAff, + New = newAff, + UpdateType = WaifuUpdateType.AffinityChanged + }); } await uow.SaveChangesAsync(); @@ -301,10 +316,10 @@ public class WaifuService : IEService, IReadyExecutor private static TypedKey GetDivorceKey(ulong userId) => new($"waifu:divorce_cd:{userId}"); - + private static TypedKey GetAffinityKey(ulong userId) => new($"waifu:affinity:{userId}"); - + public async Task<(WaifuInfo, DivorceResult, long, TimeSpan?)> DivorceWaifuAsync(IUser user, ulong targetId) { DivorceResult result; @@ -343,13 +358,14 @@ public class WaifuService : IEService, IReadyExecutor var oldClaimer = w.Claimer; w.Claimer = null; - uow.Set().Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = null, - UpdateType = WaifuUpdateType.Claimed - }); + uow.Set() + .Add(new() + { + User = w.Waifu, + Old = oldClaimer, + New = null, + UpdateType = WaifuUpdateType.Claimed + }); } await uow.SaveChangesAsync(); @@ -358,40 +374,54 @@ public class WaifuService : IEService, IReadyExecutor return (w, result, amount, remaining); } - public async Task GiftWaifuAsync(IUser from, IUser giftedWaifu, WaifuItemModel itemObj) + public async Task GiftWaifuAsync( + IUser from, + IUser giftedWaifu, + WaifuItemModel itemObj, + int count) { - if (!await _cs.RemoveAsync(from, itemObj.Price, new("waifu", "item"))) + ArgumentOutOfRangeException.ThrowIfLessThan(count, 1, nameof(count)); + + if (!await _cs.RemoveAsync(from, itemObj.Price * count, new("waifu", "item"))) return false; + var totalValue = itemObj.Price * count; + await using var uow = _db.GetDbContext(); - var w = uow.Set().ByWaifuUserId(giftedWaifu.Id, set => set.Include(x => x.Items).Include(x => x.Claimer)); + var w = uow.Set() + .ByWaifuUserId(giftedWaifu.Id, + set => set + .Include(x => x.Items) + .Include(x => x.Claimer)); if (w is null) { - uow.Set().Add(w = new() - { - Affinity = null, - Claimer = null, - Price = 1, - Waifu = uow.GetOrCreateUser(giftedWaifu) - }); + uow.Set() + .Add(w = new() + { + Affinity = null, + Claimer = null, + Price = 1, + Waifu = uow.GetOrCreateUser(giftedWaifu) + }); } if (!itemObj.Negative) { - w.Items.Add(new() - { - Name = itemObj.Name.ToLowerInvariant(), - ItemEmoji = itemObj.ItemEmoji - }); + w.Items.AddRange(Enumerable.Range(0, count) + .Select((_) => new WaifuItem() + { + Name = itemObj.Name.ToLowerInvariant(), + ItemEmoji = itemObj.ItemEmoji + })); if (w.Claimer?.UserId == from.Id) - w.Price += (long)(itemObj.Price * _gss.Data.Waifu.Multipliers.GiftEffect); + w.Price += (long)(totalValue * _gss.Data.Waifu.Multipliers.GiftEffect); else - w.Price += itemObj.Price / 2; + w.Price += totalValue / 2; } else { - w.Price -= (long)(itemObj.Price * _gss.Data.Waifu.Multipliers.NegativeGiftEffect); + w.Price -= (long)(totalValue * _gss.Data.Waifu.Multipliers.NegativeGiftEffect); if (w.Price < 1) w.Price = 1; } @@ -492,6 +522,7 @@ public class WaifuService : IEService, IReadyExecutor } private static readonly TypedKey _waifuDecayKey = $"waifu:last_decay"; + public async Task OnReadyAsync() { // only decay waifu values from shard 0 @@ -513,7 +544,7 @@ public class WaifuService : IEService, IReadyExecutor var nowB = now.ToBinary(); var result = await _cache.GetAsync(_waifuDecayKey); - + if (result.TryGetValue(out var val)) { var lastDecay = DateTime.FromBinary(val); @@ -533,7 +564,6 @@ public class WaifuService : IEService, IReadyExecutor { Price = (long)(old.Price * multi) }); - } catch (Exception ex) { @@ -550,33 +580,35 @@ public class WaifuService : IEService, IReadyExecutor { await using var ctx = _db.GetDbContext(); return await ctx.GetTable() - .Where(x => ctx.GetTable() - .Where(wi => wi.ClaimerId == waifuId) - .Select(wi => wi.WaifuId) - .Contains(x.Id)) - .Select(x => $"{x.Username}#{x.Discriminator}") - .ToListAsyncEF(); + .Where(x => ctx.GetTable() + .Where(wi => wi.ClaimerId == waifuId) + .Select(wi => wi.WaifuId) + .Contains(x.Id)) + .Select(x => $"{x.Username}#{x.Discriminator}") + .ToListAsyncEF(); } + public async Task> GetFansNames(int waifuId) { await using var ctx = _db.GetDbContext(); return await ctx.GetTable() - .Where(x => ctx.GetTable() - .Where(wi => wi.AffinityId == waifuId) - .Select(wi => wi.WaifuId) - .Contains(x.Id)) - .Select(x => $"{x.Username}#{x.Discriminator}") - .ToListAsyncEF(); + .Where(x => ctx.GetTable() + .Where(wi => wi.AffinityId == waifuId) + .Select(wi => wi.WaifuId) + .Contains(x.Id)) + .Select(x => $"{x.Username}#{x.Discriminator}") + .ToListAsyncEF(); } public async Task> GetItems(int waifuId) { await using var ctx = _db.GetDbContext(); return await ctx.GetTable() - .Where(x => x.WaifuInfoId == ctx.GetTable() - .Where(x => x.WaifuId == waifuId) - .Select(x => x.Id) - .FirstOrDefault()) - .ToListAsyncEF(); + .Where(x => x.WaifuInfoId + == ctx.GetTable() + .Where(x => x.WaifuId == waifuId) + .Select(x => x.Id) + .FirstOrDefault()) + .ToListAsyncEF(); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs new file mode 100644 index 0000000..63b5742 --- /dev/null +++ b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs @@ -0,0 +1,6 @@ +#nullable disable +using EllieBot.Modules.Gambling.Common; + +namespace EllieBot.Modules.Gambling; + +public record class MultipleWaifuItems(int Count, WaifuItemModel Item); \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs new file mode 100644 index 0000000..bac72c1 --- /dev/null +++ b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs @@ -0,0 +1,47 @@ +#nullable disable +using EllieBot.Common.TypeReaders; +using EllieBot.Modules.Gambling.Services; +using System.Text.RegularExpressions; + +namespace EllieBot.Modules.Gambling; + +public partial class MultipleWaifuItemsTypeReader : EllieTypeReader +{ + private readonly WaifuService _service; + + [GeneratedRegex(@"(?:(?\d+)[x*])?(?.+)")] + private static partial Regex ItemRegex(); + + public MultipleWaifuItemsTypeReader(WaifuService service) + { + _service = service; + } + public override ValueTask> ReadAsync(ICommandContext ctx, string input) + { + input = input.ToLowerInvariant(); + var match = ItemRegex().Match(input); + if (!match.Success) + { + return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Invalid input.")); + } + + var count = 1; + if (match.Groups["count"].Success) + { + if (!int.TryParse(match.Groups["count"].Value, out count) || count < 1) + { + return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Invalid count.")); + } + } + + var itemName = match.Groups["item"].Value?.ToLowerInvariant(); + var allItems = _service.GetWaifuItems(); + var item = allItems.FirstOrDefault(x => x.Name.ToLowerInvariant() == itemName); + if (item is null) + { + return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Waifu gift does not exist.")); + } + + return new(Discord.Commands.TypeReaderResult.FromSuccess(new MultipleWaifuItems(count, item))); + } +} -- 2.43.0 From ca64765c34c367785de8ef0b45b6b7460516660e Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:44:30 +1200 Subject: [PATCH 024/253] Updated Games module --- .../Games/ChatterBot/ChatterbotService.cs | 28 +++--- .../Games/ChatterBot/_common/Choice.cs | 9 ++ .../Games/ChatterBot/_common/Gpt3Response.cs | 61 ------------- .../Games/ChatterBot/_common/Message.cs | 9 ++ .../_common/OpenAiApi/OpenAiApiMessage.cs | 15 ++++ .../_common/OpenAiApi/OpenAiApiRequest.cs | 18 ++++ .../_common/OpenAiApi/OpenAiApiUsageData.cs | 15 ++++ .../OpenAiApi/OpenAiCompletionResponse.cs | 13 +++ ...icialGptSession.cs => OpenAiApiSession.cs} | 87 +++++++++---------- .../Games/ChatterBot/_common/ThinkResponse.cs | 11 +++ src/EllieBot/Modules/Games/GamesConfig.cs | 71 +++++++++------ .../Modules/Games/GamesConfigService.cs | 61 ++++++++----- 12 files changed, 230 insertions(+), 168 deletions(-) create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/Gpt3Response.cs create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs rename src/EllieBot/Modules/Games/ChatterBot/_common/{OfficialGptSession.cs => OpenAiApiSession.cs} (69%) create mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs index a8c06d8..2129d3b 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs @@ -1,6 +1,5 @@ #nullable disable using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; using EllieBot.Modules.Games.Common; using EllieBot.Modules.Games.Common.ChatterBot; using EllieBot.Modules.Patronage; @@ -58,18 +57,21 @@ public class ChatterBotService : IExecOnMessage Log.Information("Cleverbot will not work as the api key is missing"); return null; - case ChatBotImplementation.Gpt: + case ChatBotImplementation.OpenAi: + var data = _gcs.Data; if (!string.IsNullOrWhiteSpace(_creds.Gpt3ApiKey)) - return new OfficialGptSession(_creds.Gpt3ApiKey, - _gcs.Data.ChatGpt.ModelName, - _gcs.Data.ChatGpt.ChatHistory, - _gcs.Data.ChatGpt.MaxTokens, - _gcs.Data.ChatGpt.MinTokens, - _gcs.Data.ChatGpt.PersonalityPrompt, + return new OpenAiApiSession( + data.ChatGpt.ApiUrl, + _creds.Gpt3ApiKey, + data.ChatGpt.ModelName, + data.ChatGpt.ChatHistory, + data.ChatGpt.MaxTokens, + data.ChatGpt.MinTokens, + data.ChatGpt.PersonalityPrompt, _client.CurrentUser.Username, _httpFactory); - Log.Information("Gpt3 will not work as the api key is missing"); + Log.Information("Openai Api will likely not work as the api key is missing"); return null; default: return null; @@ -88,15 +90,15 @@ public class ChatterBotService : IExecOnMessage public string PrepareMessage(IUserMessage msg) { - var ellieId = _client.CurrentUser.Id; - var normalMention = $"<@{ellieId}> "; - var nickMention = $"<@!{ellieId}> "; + var nadekoId = _client.CurrentUser.Id; + var normalMention = $"<@{nadekoId}> "; + var nickMention = $"<@!{nadekoId}> "; string message; if (msg.Content.StartsWith(normalMention, StringComparison.InvariantCulture)) message = msg.Content[normalMention.Length..].Trim(); else if (msg.Content.StartsWith(nickMention, StringComparison.InvariantCulture)) message = msg.Content[nickMention.Length..].Trim(); - else if (msg.ReferencedMessage?.Author.Id == ellieId) + else if (msg.ReferencedMessage?.Author.Id == nadekoId) message = msg.Content; else return null; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs new file mode 100644 index 0000000..db71eee --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class Choice +{ + [JsonPropertyName("message")] + public Message Message { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Gpt3Response.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Gpt3Response.cs deleted file mode 100644 index e983338..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Gpt3Response.cs +++ /dev/null @@ -1,61 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OpenAiCompletionResponse -{ - [JsonPropertyName("choices")] - public Choice[] Choices { get; set; } - - [JsonPropertyName("usage")] - public OpenAiUsageData Usage { get; set; } -} - -public class OpenAiUsageData -{ - [JsonPropertyName("prompt_tokens")] - public int PromptTokens { get; set; } - - [JsonPropertyName("completion_tokens")] - public int CompletionTokens { get; set; } - - [JsonPropertyName("total_tokens")] - public int TotalTokens { get; set; } -} - -public class Choice -{ - [JsonPropertyName("message")] - public Message Message { get; init; } -} - -public class Message { - [JsonPropertyName("content")] - public string Content { get; init; } -} - -public class Gpt3ApiRequest -{ - [JsonPropertyName("model")] - public string Model { get; init; } - - [JsonPropertyName("messages")] - public List Messages { get; init; } - - [JsonPropertyName("temperature")] - public int Temperature { get; init; } - - [JsonPropertyName("max_tokens")] - public int MaxTokens { get; init; } -} - -public class GPTMessage -{ - [JsonPropertyName("role")] - public string Role {get; init;} - [JsonPropertyName("content")] - public string Content {get; init;} - [JsonPropertyName("name")] - public string Name {get; init;} -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs new file mode 100644 index 0000000..04532f5 --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class Message +{ + [JsonPropertyName("content")] + public string Content { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs new file mode 100644 index 0000000..0fdaf71 --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class OpenAiApiMessage +{ + [JsonPropertyName("role")] + public string Role { get; init; } + + [JsonPropertyName("content")] + public string Content { get; init; } + + [JsonPropertyName("name")] + public string Name { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs new file mode 100644 index 0000000..1ea5d69 --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class OpenAiApiRequest +{ + [JsonPropertyName("model")] + public string Model { get; init; } + + [JsonPropertyName("messages")] + public List Messages { get; init; } + + [JsonPropertyName("temperature")] + public int Temperature { get; init; } + + [JsonPropertyName("max_tokens")] + public int MaxTokens { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs new file mode 100644 index 0000000..1525dac --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class OpenAiApiUsageData +{ + [JsonPropertyName("prompt_tokens")] + public int PromptTokens { get; set; } + + [JsonPropertyName("completion_tokens")] + public int CompletionTokens { get; set; } + + [JsonPropertyName("total_tokens")] + public int TotalTokens { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs new file mode 100644 index 0000000..1b7bdcf --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs @@ -0,0 +1,13 @@ +#nullable disable +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public class OpenAiCompletionResponse +{ + [JsonPropertyName("choices")] + public Choice[] Choices { get; set; } + + [JsonPropertyName("usage")] + public OpenAiApiUsageData Usage { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs similarity index 69% rename from src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs rename to src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs index e822b53..4511988 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialGptSession.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs @@ -1,77 +1,78 @@ #nullable disable using Newtonsoft.Json; using OneOf.Types; -using System.Net.Http.Json; using SharpToken; -using System.CodeDom; +using System.Net.Http.Json; using System.Text.RegularExpressions; namespace EllieBot.Modules.Games.Common.ChatterBot; -public partial class OfficialGptSession : IChatterBotSession +public partial class OpenAiApiSession : IChatterBotSession { - private string Uri - => $"https://api.openai.com/v1/chat/completions"; - + private readonly string _baseUrl; private readonly string _apiKey; private readonly string _model; private readonly int _maxHistory; private readonly int _maxTokens; private readonly int _minTokens; - private readonly string _ellieUsername; + private readonly string _nadekoUsername; private readonly GptEncoding _encoding; - private List messages = new(); + private List messages = new(); private readonly IHttpClientFactory _httpFactory; - public OfficialGptSession( + public OpenAiApiSession( + string url, string apiKey, - ChatGptModel model, + string model, int chatHistory, int maxTokens, int minTokens, string personality, - string ellieUsername, + string nadekoUsername, IHttpClientFactory factory) { - _apiKey = apiKey; - _httpFactory = factory; - - _model = model switch + if (string.IsNullOrWhiteSpace(url) || !Uri.TryCreate(url, UriKind.Absolute, out _)) { - ChatGptModel.Gpt35Turbo => "gpt-3.5-turbo", - ChatGptModel.Gpt4o => "gpt-4o", - _ => throw new ArgumentException("Unknown, unsupported or obsolete model", nameof(model)) - }; + throw new ArgumentException("Invalid OpenAi api url provided", nameof(url)); + } + _baseUrl = url.TrimEnd('/'); + + _apiKey = apiKey; + _model = model; + _httpFactory = factory; _maxHistory = chatHistory; _maxTokens = maxTokens; _minTokens = minTokens; - _ellieUsername = UsernameCleaner().Replace(ellieUsername, ""); - _encoding = GptEncoding.GetEncodingForModel(_model); - messages.Add(new() + _nadekoUsername = UsernameCleaner().Replace(nadekoUsername, ""); + _encoding = GptEncoding.GetEncodingForModel("gpt-4o"); + if (!string.IsNullOrWhiteSpace(personality)) { - Role = "system", - Content = personality, - Name = _ellieUsername - }); + messages.Add(new() + { + Role = "system", + Content = personality, + Name = _nadekoUsername + }); + } } [GeneratedRegex("[^a-zA-Z0-9_-]")] private static partial Regex UsernameCleaner(); - + public async Task>> Think(string input, string username) { username = UsernameCleaner().Replace(username, ""); - + messages.Add(new() { Role = "user", Content = input, Name = username }); - + while (messages.Count > _maxHistory + 2) { messages.RemoveAt(1); @@ -92,28 +93,29 @@ public partial class OfficialGptSession : IChatterBotSession } else { - return new Error("Token count exceeded, please increase the number of tokens in the bot config and restart."); + return new Error( + "Token count exceeded, please increase the number of tokens in the bot config and restart."); } } using var http = _httpFactory.CreateClient(); http.DefaultRequestHeaders.Authorization = new("Bearer", _apiKey); - - var data = await http.PostAsJsonAsync(Uri, - new Gpt3ApiRequest() + + var data = await http.PostAsJsonAsync($"{_baseUrl}/v1/chat/completions", + new OpenAiApiRequest() { Model = _model, Messages = messages, MaxTokens = _maxTokens - tokensUsed, Temperature = 1, }); - + var dataString = await data.Content.ReadAsStringAsync(); try { var response = JsonConvert.DeserializeObject(dataString); - - Log.Information("Received response: {response} ", dataString); + + // Log.Information("Received response: {Response} ", dataString); var res = response?.Choices?[0]; var message = res?.Message?.Content; @@ -121,14 +123,14 @@ public partial class OfficialGptSession : IChatterBotSession { return new Error("ChatGpt: Received no response."); } - + messages.Add(new() { Role = "assistant", Content = message, - Name = _ellieUsername + Name = _nadekoUsername }); - + return new ThinkResult() { Text = message, @@ -142,11 +144,4 @@ public partial class OfficialGptSession : IChatterBotSession return new Error("Unexpected response received"); } } -} - -public sealed class ThinkResult -{ - public string Text { get; set; } - public int TokensIn { get; set; } - public int TokensOut { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs new file mode 100644 index 0000000..a5b0b5f --- /dev/null +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs @@ -0,0 +1,11 @@ +#nullable disable +using System.CodeDom; + +namespace EllieBot.Modules.Games.Common.ChatterBot; + +public sealed class ThinkResult +{ + public string Text { get; set; } + public int TokensIn { get; set; } + public int TokensOut { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GamesConfig.cs b/src/EllieBot/Modules/Games/GamesConfig.cs index e56cc70..9308329 100644 --- a/src/EllieBot/Modules/Games/GamesConfig.cs +++ b/src/EllieBot/Modules/Games/GamesConfig.cs @@ -8,7 +8,7 @@ namespace EllieBot.Modules.Games.Common; public sealed partial class GamesConfig : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 4; + public int Version { get; set; } = 5; [Comment("Hangman related settings (.hangman command)")] public HangmanConfig Hangman { get; set; } = new() @@ -103,10 +103,13 @@ public sealed partial class GamesConfig : ICloneable } ]; - [Comment(@"Which chatbot API should bot use. -'cleverbot' - bot will use Cleverbot API. -'gpt' - bot will use GPT API")] - public ChatBotImplementation ChatBot { get; set; } = ChatBotImplementation.Gpt; + [Comment( + """ + Which chatbot API should bot use. + 'cleverbot' - bot will use Cleverbot API. + 'openai' - bot will use OpenAi API + """)] + public ChatBotImplementation ChatBot { get; set; } = ChatBotImplementation.OpenAi; public ChatGptConfig ChatGpt { get; set; } = new(); } @@ -114,19 +117,38 @@ public sealed partial class GamesConfig : ICloneable [Cloneable] public sealed partial class ChatGptConfig { - [Comment(@"Which GPT Model should bot use. - gpt35turbo - cheapest - gpt4o - more expensive, higher quality -")] - public ChatGptModel ModelName { get; set; } = ChatGptModel.Gpt35Turbo; + [Comment(""" + Url to any openai api compatible url. + Make sure to modify the modelName appropriately + DO NOT add /v1/chat/completions suffix to the url + """)] + public string ApiUrl { get; set; } = "https://api.openai.com"; - [Comment(@"How should the chat bot behave, what's its personality? (Usage of this counts towards the max tokens)")] - public string PersonalityPrompt { get; set; } = "You are a chat bot willing to have a conversation with anyone about anything."; + [Comment(""" + Which GPT Model should bot use. + gpt-3.5-turbo - cheapest + gpt-4o - more expensive, higher quality - [Comment(@"The maximum number of messages in a conversation that can be remembered. (This will increase the number of tokens used)")] + If you are using another openai compatible api, you may use any of the models supported by that api + """)] + public string ModelName { get; set; } = "gpt-3.5-turbo"; + + [Comment(""" + How should the chatbot behave, what's its personality? + This will be sent as a system message. + Usage of this counts towards the max tokens. + """)] + public string PersonalityPrompt { get; set; } = + "You are a chat bot willing to have a conversation with anyone about anything."; + + [Comment( + """ + The maximum number of messages in a conversation that can be remembered. + This will increase the number of tokens used. + """)] public int ChatHistory { get; set; } = 5; - [Comment(@"The maximum number of tokens to use per GPT API call")] + [Comment(@"The maximum number of tokens to use per OpenAi API call")] public int MaxTokens { get; set; } = 100; [Comment(@"The minimum number of tokens to use per GPT API call, such that chat history is removed to make room.")] @@ -147,9 +169,9 @@ public sealed partial class TriviaConfig public long CurrencyReward { get; set; } [Comment(""" - Users won't be able to start trivia games which have - a smaller win requirement than the one specified by this setting. - """)] + Users won't be able to start trivia games which have + a smaller win requirement than the one specified by this setting. + """)] public int MinimumWinReq { get; set; } = 1; } @@ -163,18 +185,11 @@ public sealed partial class RaceAnimal public enum ChatBotImplementation { Cleverbot, + OpenAi = 1, + + [Obsolete] Gpt = 1, + [Obsolete] Gpt3 = 1, -} - -public enum ChatGptModel -{ - [Obsolete] - Gpt4, - [Obsolete] - Gpt432k, - - Gpt35Turbo, - Gpt4o, } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GamesConfigService.cs b/src/EllieBot/Modules/Games/GamesConfigService.cs index 06b75c3..f6ff635 100644 --- a/src/EllieBot/Modules/Games/GamesConfigService.cs +++ b/src/EllieBot/Modules/Games/GamesConfigService.cs @@ -32,29 +32,21 @@ public sealed class GamesConfigService : ConfigServiceBase gs => gs.ChatBot, ConfigParsers.InsensitiveEnum, ConfigPrinters.ToString); + + AddParsedProp("gpt.apiUrl", + gs => gs.ChatGpt.ApiUrl, + ConfigParsers.String, + ConfigPrinters.ToString); + AddParsedProp("gpt.modelName", gs => gs.ChatGpt.ModelName, - ConfigParsers.InsensitiveEnum, + ConfigParsers.String, ConfigPrinters.ToString); + AddParsedProp("gpt.personality", gs => gs.ChatGpt.PersonalityPrompt, ConfigParsers.String, ConfigPrinters.ToString); - AddParsedProp("gpt.chathistory", - gs => gs.ChatGpt.ChatHistory, - int.TryParse, - ConfigPrinters.ToString, - val => val > 0); - AddParsedProp("gpt.max_tokens", - gs => gs.ChatGpt.MaxTokens, - int.TryParse, - ConfigPrinters.ToString, - val => val > 0); - AddParsedProp("gpt.min_tokens", - gs => gs.ChatGpt.MinTokens, - int.TryParse, - ConfigPrinters.ToString, - val => val > 0); Migrate(); } @@ -78,7 +70,7 @@ public sealed class GamesConfigService : ConfigServiceBase ModifyConfig(c => { c.Version = 3; - c.ChatGpt.ModelName = ChatGptModel.Gpt35Turbo; + c.ChatGpt.ModelName = "gpt35turbo"; }); } @@ -89,11 +81,40 @@ public sealed class GamesConfigService : ConfigServiceBase c.Version = 4; #pragma warning disable CS0612 // Type or member is obsolete c.ChatGpt.ModelName = - c.ChatGpt.ModelName == ChatGptModel.Gpt4 || c.ChatGpt.ModelName == ChatGptModel.Gpt432k - ? ChatGptModel.Gpt4o - : c.ChatGpt.ModelName; + c.ChatGpt.ModelName.Equals("gpt4", StringComparison.OrdinalIgnoreCase) + || c.ChatGpt.ModelName.Equals("gpt432k", StringComparison.OrdinalIgnoreCase) + ? "gpt-4o" + : "gpt-3.5-turbo"; #pragma warning restore CS0612 // Type or member is obsolete }); } + + if (data.Version < 5) + { + ModifyConfig(c => + { + c.Version = 5; + c.ChatBot = c.ChatBot == ChatBotImplementation.OpenAi + ? ChatBotImplementation.OpenAi + : c.ChatBot; + + if (c.ChatGpt.ModelName.Equals("gpt4o", StringComparison.OrdinalIgnoreCase)) + { + c.ChatGpt.ModelName = "gpt-4o"; + } + else if (c.ChatGpt.ModelName.Equals("gpt35turbo", StringComparison.OrdinalIgnoreCase)) + { + c.ChatGpt.ModelName = "gpt-3.5-turbo"; + } + else + { + Log.Warning( + "Unknown OpenAI api model name: {ModelName}. " + + "It will be reset to 'gpt-3.5-turbo' only this time", + c.ChatGpt.ModelName); + c.ChatGpt.ModelName = "gpt-3.5-turbo"; + } + }); + } } } \ No newline at end of file -- 2.43.0 From 6b6f822ec8db131b52d72ae2ffbc2d1682cd9a9e Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:44:58 +1200 Subject: [PATCH 025/253] Updated Searches module --- .../Modules/Searches/Crypto/CryptoCommands.cs | 139 ++++++++++++------ .../Modules/Searches/Crypto/CryptoService.cs | 53 +++++++ 2 files changed, 146 insertions(+), 46 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs index 37353b1..13112e1 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs @@ -16,12 +16,12 @@ public partial class Searches _stocksService = stocksService; _stockDrawingService = stockDrawingService; } - + [Cmd] - public async Task Stock([Leftover]string query) + public async Task Stock([Leftover] string query) { using var typing = ctx.Channel.EnterTypingState(); - + var stock = await _stocksService.GetStockDataAsync(query); if (stock is null) @@ -36,9 +36,9 @@ public partial class Searches var symbol = symbols.First(); var promptEmbed = _sender.CreateEmbed() - .WithDescription(symbol.Description) - .WithTitle(GetText(strs.did_you_mean(symbol.Symbol))); - + .WithDescription(symbol.Description) + .WithTitle(GetText(strs.did_you_mean(symbol.Symbol))); + if (!await PromptUserConfirmAsync(promptEmbed)) return; @@ -54,7 +54,7 @@ public partial class Searches var candles = await _stocksService.GetCandleDataAsync(query); var stockImageTask = _stockDrawingService.GenerateCombinedChartAsync(candles); - + var localCulture = (CultureInfo)Culture.Clone(); localCulture.NumberFormat.CurrencySymbol = "$"; @@ -64,34 +64,34 @@ public partial class Searches var change = (stock.Price - stock.Close).ToString("N2", Culture); var changePercent = (1 - (stock.Close / stock.Price)).ToString("P1", Culture); - + var sign50 = stock.Change50d >= 0 ? "\\🔼" : "\\🔻"; var change50 = (stock.Change50d).ToString("P1", Culture); - + var sign200 = stock.Change200d >= 0 ? "\\🔼" : "\\🔻"; - + var change200 = (stock.Change200d).ToString("P1", Culture); - + var price = stock.Price.ToString("C2", localCulture); var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(stock.Symbol) - .WithUrl($"https://www.tradingview.com/chart/?symbol={stock.Symbol}") - .WithTitle(stock.Name) - .AddField(GetText(strs.price), $"{sign} **{price}**", true) - .AddField(GetText(strs.market_cap), stock.MarketCap, true) - .AddField(GetText(strs.volume_24h), stock.DailyVolume.ToString("C0", localCulture), true) - .AddField("Change", $"{change} ({changePercent})", true) - // .AddField("Change 50d", $"{sign50}{change50}", true) - // .AddField("Change 200d", $"{sign200}{change200}", true) - .WithFooter(stock.Exchange); - + .WithOkColor() + .WithAuthor(stock.Symbol) + .WithUrl($"https://www.tradingview.com/chart/?symbol={stock.Symbol}") + .WithTitle(stock.Name) + .AddField(GetText(strs.price), $"{sign} **{price}**", true) + .AddField(GetText(strs.market_cap), stock.MarketCap, true) + .AddField(GetText(strs.volume_24h), stock.DailyVolume.ToString("C0", localCulture), true) + .AddField("Change", $"{change} ({changePercent})", true) + // .AddField("Change 50d", $"{sign50}{change50}", true) + // .AddField("Change 200d", $"{sign200}{change200}", true) + .WithFooter(stock.Exchange); + var message = await Response().Embed(eb).SendAsync(); await using var imageData = await stockImageTask; if (imageData is null) @@ -105,15 +105,12 @@ public partial class Searches await message.ModifyAsync(mp => { mp.Attachments = - new(new[] - { - attachment - }); + new(new[] { attachment }); mp.Embed = eb.WithImageUrl($"attachment://{fileName}").Build(); }); } - + [Cmd] public async Task Crypto(string name) @@ -128,9 +125,9 @@ public partial class Searches if (nearest is not null) { var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.crypto_not_found)) - .WithDescription( - GetText(strs.did_you_mean(Format.Bold($"{nearest.Name} ({nearest.Symbol})")))); + .WithTitle(GetText(strs.crypto_not_found)) + .WithDescription( + GetText(strs.did_you_mean(Format.Bold($"{nearest.Name} ({nearest.Symbol})")))); if (await PromptUserConfirmAsync(embed)) crypto = nearest; @@ -146,7 +143,7 @@ public partial class Searches var localCulture = (CultureInfo)Culture.Clone(); localCulture.NumberFormat.CurrencySymbol = "$"; - + var sevenDay = (usd.PercentChange7d / 100).ToString("P2", localCulture); var lastDay = (usd.PercentChange24h / 100).ToString("P2", localCulture); var price = usd.Price < 0.01 @@ -159,28 +156,29 @@ public partial class Searches await using var sparkline = await _service.GetSparklineAsync(crypto.Id, usd.PercentChange7d >= 0); var fileName = $"{crypto.Slug}_7d.png"; - + var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor($"#{crypto.CmcRank}") - .WithTitle($"{crypto.Name} ({crypto.Symbol})") - .WithUrl($"https://coinmarketcap.com/currencies/{crypto.Slug}/") - .WithThumbnailUrl($"https://s3.coinmarketcap.com/static/img/coins/128x128/{crypto.Id}.png") - .AddField(GetText(strs.market_cap), marketCap, true) - .AddField(GetText(strs.price), price, true) - .AddField(GetText(strs.volume_24h), volume, true) - .AddField(GetText(strs.change_7d_24h), $"{sevenDay} / {lastDay}", true) - .AddField(GetText(strs.market_cap_dominance), dominance, true) - .WithImageUrl($"attachment://{fileName}"); + .WithOkColor() + .WithAuthor($"#{crypto.CmcRank}") + .WithTitle($"{crypto.Name} ({crypto.Symbol})") + .WithUrl($"https://coinmarketcap.com/currencies/{crypto.Slug}/") + .WithThumbnailUrl( + $"https://s3.coinmarketcap.com/static/img/coins/128x128/{crypto.Id}.png") + .AddField(GetText(strs.market_cap), marketCap, true) + .AddField(GetText(strs.price), price, true) + .AddField(GetText(strs.volume_24h), volume, true) + .AddField(GetText(strs.change_7d_24h), $"{sevenDay} / {lastDay}", true) + .AddField(GetText(strs.market_cap_dominance), dominance, true) + .WithImageUrl($"attachment://{fileName}"); if (crypto.CirculatingSupply is double cs) { var csStr = cs.ToString("N0", localCulture); - + if (crypto.MaxSupply is double ms) { var perc = (cs / ms).ToString("P1", localCulture); - + toSend.AddField(GetText(strs.circulating_supply), $"{csStr} ({perc})", true); } else @@ -192,5 +190,54 @@ public partial class Searches await ctx.Channel.SendFileAsync(sparkline, fileName, embed: toSend.Build()); } + + [Cmd] + public async Task Coins(int page = 1) + { + if (--page < 0) + return; + + if (page > 25) + page = 25; + + await Response() + .Paginated() + .PageItems(async (page) => + { + var coins = await _service.GetTopCoins(page); + return coins; + }) + .PageSize(10) + .Page((items, _) => + { + var embed = _sender.CreateEmbed() + .WithOkColor(); + + if (items.Count > 0) + { + foreach (var coin in items) + { + embed.AddField($"#{coin.MarketCapRank} {coin.Symbol} - {coin.Name}", + $""" + `Price:` {GetArrowEmoji(coin.PercentChange24h)} {coin.CurrentPrice.ToShortString()}$ ({GetSign(coin.PercentChange24h)}{Math.Round(coin.PercentChange24h, 2)}%) + `MarketCap:` {coin.MarketCap.ToShortString()}$ + `Supply:` {(coin.CirculatingSupply?.ToShortString() ?? "?")} / {(coin.TotalSupply?.ToShortString() ?? "?")} + """, + inline: false); + } + } + + return embed; + }) + .CurrentPage(page) + .AddFooter(false) + .SendAsync(); + } + + private static string GetArrowEmoji(decimal value) + => value > 0 ? "▲" : "▼"; + + private static string GetSign(decimal value) + => value >= 0 ? "+" : "-"; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index 146dac3..59463fa 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -4,8 +4,10 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; +using System.Collections.ObjectModel; using System.Globalization; using System.Net.Http.Json; +using System.Text.Json.Serialization; using System.Xml; using Color = SixLabors.ImageSharp.Color; using StringExtensions = EllieBot.Extensions.StringExtensions; @@ -212,4 +214,55 @@ public class CryptoService : IEService var points = GetSparklinePointsFromSvgText(str); return points; } + + private static TypedKey> GetTopCoinsKey() + => new($"crypto:top_coins"); + + public async Task?> GetTopCoins(int page) + { + if (page >= 25) + page = 24; + + using var http = _httpFactory.CreateClient(); + + http.AddFakeHeaders(); + + var result = await _cache.GetOrAddAsync>(GetTopCoinsKey(), + async () => await http.GetFromJsonAsync>( + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250") + ?? [], + expiry: TimeSpan.FromHours(1)); + + return result!.Skip(page * 10).Take(10).ToList(); + } +} + +public sealed class GeckoCoinsResult +{ + [JsonPropertyName("id")] + public required string Id { get; init; } + + [JsonPropertyName("name")] + public required string Name { get; init; } + + [JsonPropertyName("symbol")] + public required string Symbol { get; init; } + + [JsonPropertyName("current_price")] + public required decimal CurrentPrice { get; init; } + + [JsonPropertyName("price_change_percentage_24h")] + public required decimal PercentChange24h { get; init; } + + [JsonPropertyName("market_cap")] + public required decimal MarketCap { get; init; } + + [JsonPropertyName("circulating_supply")] + public required decimal? CirculatingSupply { get; init; } + + [JsonPropertyName("total_supply")] + public required decimal? TotalSupply { get; init; } + + [JsonPropertyName("market_cap_rank")] + public required int MarketCapRank { get; init; } } \ No newline at end of file -- 2.43.0 From b2b8e4c3d3ec6f8215532cb341fca47f1042a3ea Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:45:13 +1200 Subject: [PATCH 026/253] Updated Utility module --- src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs index 612247b..6f6c03c 100644 --- a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs +++ b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs @@ -245,7 +245,7 @@ public sealed class AiAssistantService { if (guild is not SocketGuild sg) return false; - + var sess = _cbs.GetOrCreateSession(guild.Id); if (sess is null) return false; @@ -302,7 +302,7 @@ public sealed class AiAssistantService await _sender.Response(channel) .Error(errorMsg) .SendAsync(); - + return true; } -- 2.43.0 From 624171c35f62f0bc9bb31ed3c402f75c8e09e541 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:45:33 +1200 Subject: [PATCH 027/253] Updated Xp module --- src/EllieBot/Modules/Xp/Club/Club.cs | 19 +++--- src/EllieBot/Modules/Xp/Club/ClubService.cs | 68 ++++++++++++-------- src/EllieBot/Modules/Xp/Club/IClubService.cs | 3 +- 3 files changed, 53 insertions(+), 37 deletions(-) diff --git a/src/EllieBot/Modules/Xp/Club/Club.cs b/src/EllieBot/Modules/Xp/Club/Club.cs index d584eba..9a84dc9 100644 --- a/src/EllieBot/Modules/Xp/Club/Club.cs +++ b/src/EllieBot/Modules/Xp/Club/Club.cs @@ -113,16 +113,18 @@ public partial class Xp { var lvl = new LevelStats(club.Xp); var allUsers = club.Members.OrderByDescending(x => - { - var l = new LevelStats(x.TotalXp).Level; - if (club.OwnerId == x.Id) - return int.MaxValue; - if (x.IsClubAdmin) - return (int.MaxValue / 2) + l; - return l; - }) + { + var l = new LevelStats(x.TotalXp).Level; + if (club.OwnerId == x.Id) + return int.MaxValue; + if (x.IsClubAdmin) + return (int.MaxValue / 2) + l; + return l; + }) .ToList(); + var rank = await _service.GetClubRankAsync(club.Id); + await Response() .Paginated() .Items(allUsers) @@ -135,6 +137,7 @@ public partial class Xp .WithDescription(GetText(strs.level_x(lvl.Level + $" ({club.Xp} xp)"))) .AddField(GetText(strs.desc), string.IsNullOrWhiteSpace(club.Description) ? "-" : club.Description) + .AddField(GetText(strs.rank), $"#{rank}", true) .AddField(GetText(strs.owner), club.Owner.ToString(), true) // .AddField(GetText(strs.level_req), club.MinimumLevelReq.ToString(), true) .AddField(GetText(strs.members), diff --git a/src/EllieBot/Modules/Xp/Club/ClubService.cs b/src/EllieBot/Modules/Xp/Club/ClubService.cs index be89659..d35a05d 100644 --- a/src/EllieBot/Modules/Xp/Club/ClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/ClubService.cs @@ -23,22 +23,22 @@ public class ClubService : IEService, IClubService { if (!CheckClubName(clubName)) return ClubCreateResult.NameTooLong; - + //must be lvl 5 and must not be in a club already await using var uow = _db.GetDbContext(); var du = uow.GetOrCreateUser(user); var xp = new LevelStats(du.TotalXp); - - if (xp.Level < 5) + + if (xp.Level < 5) return ClubCreateResult.InsufficientLevel; - + if (du.ClubId is not null) return ClubCreateResult.AlreadyInAClub; if (await uow.Set().AnyAsyncEF(x => x.Name == clubName)) return ClubCreateResult.NameTaken; - + du.IsClubAdmin = true; du.Club = new() { @@ -53,7 +53,7 @@ public class ClubService : IEService, IClubService return ClubCreateResult.Success; } - + public OneOf TransferClub(IUser from, IUser newOwner) { using var uow = _db.GetDbContext(); @@ -62,7 +62,7 @@ public class ClubService : IEService, IClubService if (club is null || club.Owner.UserId != from.Id) return ClubTransferError.NotOwner; - + if (!club.Members.Contains(newOwnerUser)) return ClubTransferError.TargetNotMember; @@ -72,22 +72,22 @@ public class ClubService : IEService, IClubService uow.SaveChanges(); return club; } - + public async Task ToggleAdminAsync(IUser owner, IUser toAdmin) { if (owner.Id == toAdmin.Id) return ToggleAdminResult.CantTargetThyself; - + await using var uow = _db.GetDbContext(); var club = uow.Set().GetByOwner(owner.Id); var adminUser = uow.GetOrCreateUser(toAdmin); if (club is null) return ToggleAdminResult.NotOwner; - - if(!club.Members.Contains(adminUser)) + + if (!club.Members.Contains(adminUser)) return ToggleAdminResult.TargetNotMember; - + var newState = adminUser.IsClubAdmin = !adminUser.IsClubAdmin; await uow.SaveChangesAsync(); return newState ? ToggleAdminResult.AddedAdmin : ToggleAdminResult.RemovedAdmin; @@ -99,17 +99,17 @@ public class ClubService : IEService, IClubService var member = uow.Set().GetByMember(user.Id); return member; } - + public async Task SetClubIconAsync(ulong ownerUserId, string url) { if (url is not null) { using var http = _httpFactory.CreateClient(); using var temp = await http.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); - - if (!temp.IsImage()) + + if (!temp.IsImage()) return SetClubIconResult.InvalidFileType; - + if (temp.GetContentLength() > 5.Megabytes()) return SetClubIconResult.TooLarge; } @@ -134,6 +134,18 @@ public class ClubService : IEService, IClubService return club is not null; } + public async Task GetClubRankAsync(int clubId) + { + await using var uow = _db.GetDbContext(); + + var rank = await uow.Clubs + .ToLinqToDBTable() + .Where(x => x.Xp > (uow.Clubs.First(c => c.Id == clubId).Xp)) + .CountAsyncLinqToDB(); + + return rank + 1; + } + public ClubApplyResult ApplyToClub(IUser user, ClubInfo club) { using var uow = _db.GetDbContext(); @@ -144,10 +156,10 @@ public class ClubService : IEService, IClubService // or doesn't min minumum level requirement, can't apply if (du.ClubId is not null) return ClubApplyResult.AlreadyInAClub; - + if (club.Bans.Any(x => x.UserId == du.Id)) return ClubApplyResult.Banned; - + if (club.Applicants.Any(x => x.UserId == du.Id)) return ClubApplyResult.AlreadyApplied; @@ -162,7 +174,7 @@ public class ClubService : IEService, IClubService return ClubApplyResult.Success; } - + public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) { discordUser = null; @@ -188,7 +200,7 @@ public class ClubService : IEService, IClubService uow.SaveChanges(); return ClubAcceptResult.Accepted; } - + public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) { discordUser = null; @@ -201,9 +213,9 @@ public class ClubService : IEService, IClubService club.Applicants.FirstOrDefault(x => x.User.ToString().ToUpperInvariant() == userName.ToUpperInvariant()); if (applicant is null) return ClubDenyResult.NoSuchApplicant; - + club.Applicants.Remove(applicant); - + discordUser = applicant.User; uow.SaveChanges(); return ClubDenyResult.Rejected; @@ -220,7 +232,7 @@ public class ClubService : IEService, IClubService using var uow = _db.GetDbContext(); var du = uow.GetOrCreateUser(user, x => x.Include(u => u.Club)); if (du.Club is null) - return ClubLeaveResult.NotInAClub; + return ClubLeaveResult.NotInAClub; if (du.Club.OwnerId == du.Id) return ClubLeaveResult.OwnerCantLeave; @@ -306,7 +318,7 @@ public class ClubService : IEService, IClubService return ClubUnbanResult.Success; } - + public ClubKickResult Kick(ulong kickerId, string userName, out ClubInfo club) { using var uow = _db.GetDbContext(); @@ -342,14 +354,14 @@ public class ClubService : IEService, IClubService { if (!CheckClubName(clubName)) return ClubRenameResult.NameTooLong; - + await using var uow = _db.GetDbContext(); - + var club = uow.Set().GetByOwnerOrAdmin(userId); - + if (club is null) return ClubRenameResult.NotOwnerOrAdmin; - + if (await uow.Set().AnyAsyncEF(x => x.Name == clubName)) return ClubRenameResult.NameTaken; diff --git a/src/EllieBot/Modules/Xp/Club/IClubService.cs b/src/EllieBot/Modules/Xp/Club/IClubService.cs index 7e9bbf0..8a45e8d 100644 --- a/src/EllieBot/Modules/Xp/Club/IClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/IClubService.cs @@ -6,7 +6,7 @@ namespace EllieBot.Modules.Xp.Services; public interface IClubService { Task CreateClubAsync(IUser user, string clubName); - OneOf TransferClub(IUser from, IUser newOwner); + OneOf TransferClub(IUser from, IUser newOwner); Task ToggleAdminAsync(IUser owner, IUser toAdmin); ClubInfo? GetClubByMember(IUser user); Task SetClubIconAsync(ulong ownerUserId, string? url); @@ -23,6 +23,7 @@ public interface IClubService ClubKickResult Kick(ulong kickerId, string userName, out ClubInfo club); List GetClubLeaderboardPage(int page); Task RenameClubAsync(ulong userId, string clubName); + Task GetClubRankAsync(int clubId); } public enum ClubApplyResult -- 2.43.0 From 81ebad702b8d4c19e01dbc708750cb581334c735 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:45:55 +1200 Subject: [PATCH 028/253] Updated Common files --- .../Extensions/StringExtensions.cs | 15 ++++++------ .../_common/_Extensions/NumberExtensions.cs | 23 +++++++++++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs b/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs index f2fd050..c96f74a 100644 --- a/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs +++ b/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs @@ -82,14 +82,14 @@ public static class StringExtensions // Step 3 for (var i = 1; i <= n; i++) //Step 4 - for (var j = 1; j <= m; j++) - { - // Step 5 - var cost = t[j - 1] == s[i - 1] ? 0 : 1; + for (var j = 1; j <= m; j++) + { + // Step 5 + var cost = t[j - 1] == s[i - 1] ? 0 : 1; - // Step 6 - d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1), d[i - 1, j - 1] + cost); - } + // Step 6 + d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1), d[i - 1, j - 1] + cost); + } // Step 7 return d[n, m]; @@ -147,4 +147,5 @@ public static class StringExtensions var newString = str.UnescapeUnicodeCodePoint(); return newString; }); + } \ No newline at end of file diff --git a/src/EllieBot/_common/_Extensions/NumberExtensions.cs b/src/EllieBot/_common/_Extensions/NumberExtensions.cs index 3e0f703..3e28588 100644 --- a/src/EllieBot/_common/_Extensions/NumberExtensions.cs +++ b/src/EllieBot/_common/_Extensions/NumberExtensions.cs @@ -1,7 +1,30 @@ +using System.Globalization; + namespace EllieBot.Extensions; public static class NumberExtensions { public static DateTimeOffset ToUnixTimestamp(this double number) => new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero).AddSeconds(number); + + public static string ToShortString(this decimal value) + { + if (value <= 1_000) + return Math.Round(value, 2).ToString(CultureInfo.InvariantCulture); + if (value <= 1_000_000) + return Math.Round(value, 1).ToString(CultureInfo.InvariantCulture); + var tokens = " MBtq"; + var i = 2; + while (true) + { + var num = (decimal)Math.Pow(1000, i); + if (num > value) + { + var num2 = (decimal)Math.Pow(1000, i - 1); + return $"{Math.Round((value / num2), 1)}{tokens[i - 1]}".Trim(); + } + + i++; + } + } } \ No newline at end of file -- 2.43.0 From f318ec274181b43fecda120c7825914ccf623ef9 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:46:29 +1200 Subject: [PATCH 029/253] Updated editorconfig file and added build files --- build.ps1 | 46 ++++++++++++++++++++++++++++++++++++++ build.sh | 18 +++++++++++++++ src/EllieBot/.editorconfig | 6 ++--- 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 build.ps1 create mode 100644 build.sh diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..3b99cec --- /dev/null +++ b/build.ps1 @@ -0,0 +1,46 @@ +echo "" +echo "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" +echo "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" +echo "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " +echo "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " +echo "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " +echo "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " +echo "" +echo "Copyright © 2024 Toastie_t0ast & EllieBotDevs" +echo "" + +echo "" +echo "Publishing EllieBot" +echo "" + +echo "" +dotnet publish -c Release -r linux-x64 --self-contained -o elliebot-linux-x64 src/EllieBot/EllieBot.csproj +echo "" +dotnet publish -c Release -r linux-arm64 --self-contained -o elliebot-linux-arm64 src/EllieBot/EllieBot.csproj +echo "" +dotnet publish -c Release -r win-x64 --self-contained -o elliebot-windows-x64 src/EllieBot/EllieBot.csproj +echo "" +dotnet publish -c Release -r win-arm64 --self-contained -o elliebot-windows-arm64 src/EllieBot/EllieBot.csproj +echo "" +dotnet publish -c Release -r osx-x64 --self-contained -o elliebot-osx-x64 src/EllieBot/EllieBot.csproj +echo "" +dotnet publish -c Release -r osx-arm64 --self-contained -o elliebot-osx-arm64 src/EllieBot/EllieBot.csproj + +echo "" +echo "Preparing the Windows installer build." +echo "" + +dotnet clean +dotnet restore -f --no-cache -v n +dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=5.1.3 src/EllieBot + +echo "" +echo "" +echo "Finished the initial build script" +echo "" +echo "To build the Windows installer please install Inno Setup from" +echo "https://jrsoftware.org/isdl.php" +echo "And compile the exe_builder.iss" +echo "" +echo "If you are running on Windows please run the wsl command" +echo "then run build.sh" \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..5944016 --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +echo "" +echo "Compressing build files" +echo "" + +tar cvf 5.1.3-linux-x64-build.tar elliebot-linux-x64/* +tar cvf 5.1.3-linux-arm64-build.tar elliebot-linux-arm64/* +tar cvf 5.1.3-osx-x64-build.tar elliebot-osx-x64/* +tar cvf 5.1.3-osx-arm64-build.tar elliebot-osx-arm64/* +zip -r 5.1.3-windows-x64-build.zip elliebot-windows-x64/* +zip -r 5.1.3-windows-arm64-build.zip elliebot-windows-arm64/* + +echo "" +echo "Moving the installer file you would have generated" +echo "if you followed the instructions in the bottom of the build.ps1 file" +echo "to the directory this script in run in." +echo "" + +#mv ellie-installers/5.1.3/ellie-setup-5.1.3.exe ellie-setup-5.1.3.exe \ No newline at end of file diff --git a/src/EllieBot/.editorconfig b/src/EllieBot/.editorconfig index 041e023..bc6d4d4 100644 --- a/src/EllieBot/.editorconfig +++ b/src/EllieBot/.editorconfig @@ -181,9 +181,9 @@ dotnet_naming_rule.private_readonly_field.symbols = private_readonly_field dotnet_naming_rule.private_readonly_field.style = begins_with_underscore dotnet_naming_rule.private_readonly_field.severity = warning -dotnet_naming_rule.private_field.symbols = private_field -dotnet_naming_rule.private_field.style = camel_case -dotnet_naming_rule.private_field.severity = warning +# dotnet_naming_rule.private_field.symbols = private_field +# dotnet_naming_rule.private_field.style = camel_case +# dotnet_naming_rule.private_field.severity = warning dotnet_naming_rule.const_fields.symbols = const_fields dotnet_naming_rule.const_fields.style = all_upper -- 2.43.0 From e49dfda0db6603074935dd13f335d1d10d7fb870 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 15:54:57 +1200 Subject: [PATCH 030/253] Updated changelog, upped version to 5.1.4 --- CHANGELOG.md | 23 +++++++++++++++++++++++ src/EllieBot/EllieBot.csproj | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47bf5fc..72eda49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o +## [5.1.4] - Unreleased + +### Added + +- Added `'coins` command which lists top 10 cryptos ordered by marketcap +- Added Clubs rank in the leaderboard to `'clubinfo` +- Bot owners can now check other people's bank balance (Not server owners, only bot owner, the person who is hosting the bot) +- You can now send multiple waifu gifts at once to waifus. For example `'waifugift 3xRose @user` will give that user 3 roses + - The format is `x`, no spaces +- Added `'boosttest` command + +### Changed + +- Updated command strings to clarify `'say` and `'send` usages + +### Fixed + +- Fixed `'waifugift` help string + +### Removed + +- Removed selfhost button from `'donate` command, no idea why it was there in the first place + ## [5.1.3] - 08.07.2024 ### Added diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 86a9972..de5f076 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.3 + 5.1.4 $(MSBuildProjectDirectory) -- 2.43.0 From 7e660639906e5e00e7b5e72f2cb83749472b69a7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 16:08:18 +1200 Subject: [PATCH 031/253] Updated build scripts for this release. --- build.ps1 | 66 +++++++++++++++++++++++++++---------------------------- build.sh | 14 ++++++------ 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/build.ps1 b/build.ps1 index 3b99cec..45e4d6b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,46 +1,46 @@ -echo "" -echo "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" -echo "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" -echo "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " -echo "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " -echo "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " -echo "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " -echo "" -echo "Copyright © 2024 Toastie_t0ast & EllieBotDevs" -echo "" +Write-Output "" +Write-Output "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" +Write-Output "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" +Write-Output "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " +Write-Output "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " +Write-Output "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " +Write-Output "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " +Write-Output "" +Write-Output "Copyright © 2024 Toastie_t0ast & EllieBotDevs" +Write-Output "" -echo "" -echo "Publishing EllieBot" -echo "" +Write-Output "" +Write-Output "Publishing EllieBot" +Write-Output "" -echo "" +Write-Output "" dotnet publish -c Release -r linux-x64 --self-contained -o elliebot-linux-x64 src/EllieBot/EllieBot.csproj -echo "" +Write-Output "" dotnet publish -c Release -r linux-arm64 --self-contained -o elliebot-linux-arm64 src/EllieBot/EllieBot.csproj -echo "" +Write-Output "" dotnet publish -c Release -r win-x64 --self-contained -o elliebot-windows-x64 src/EllieBot/EllieBot.csproj -echo "" +Write-Output "" dotnet publish -c Release -r win-arm64 --self-contained -o elliebot-windows-arm64 src/EllieBot/EllieBot.csproj -echo "" +Write-Output "" dotnet publish -c Release -r osx-x64 --self-contained -o elliebot-osx-x64 src/EllieBot/EllieBot.csproj -echo "" +Write-Output "" dotnet publish -c Release -r osx-arm64 --self-contained -o elliebot-osx-arm64 src/EllieBot/EllieBot.csproj -echo "" -echo "Preparing the Windows installer build." -echo "" +Write-Output "" +Write-Output "Preparing the Windows installer build." +Write-Output "" dotnet clean dotnet restore -f --no-cache -v n -dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=5.1.3 src/EllieBot +dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=5.1.4 src/EllieBot -echo "" -echo "" -echo "Finished the initial build script" -echo "" -echo "To build the Windows installer please install Inno Setup from" -echo "https://jrsoftware.org/isdl.php" -echo "And compile the exe_builder.iss" -echo "" -echo "If you are running on Windows please run the wsl command" -echo "then run build.sh" \ No newline at end of file +Write-Output "" +Write-Output "" +Write-Output "Finished the initial build script" +Write-Output "" +Write-Output "To build the Windows installer please install Inno Setup from" +Write-Output "https://jrsoftware.org/isdl.php" +Write-Output "And compile the exe_builder.iss" +Write-Output "" +Write-Output "If you are running on Windows please run the wsl command" +Write-Output "then run build.sh" \ No newline at end of file diff --git a/build.sh b/build.sh index 5944016..e58b709 100644 --- a/build.sh +++ b/build.sh @@ -2,12 +2,12 @@ echo "" echo "Compressing build files" echo "" -tar cvf 5.1.3-linux-x64-build.tar elliebot-linux-x64/* -tar cvf 5.1.3-linux-arm64-build.tar elliebot-linux-arm64/* -tar cvf 5.1.3-osx-x64-build.tar elliebot-osx-x64/* -tar cvf 5.1.3-osx-arm64-build.tar elliebot-osx-arm64/* -zip -r 5.1.3-windows-x64-build.zip elliebot-windows-x64/* -zip -r 5.1.3-windows-arm64-build.zip elliebot-windows-arm64/* +tar cvf 5.1.4-linux-x64-build.tar elliebot-linux-x64/* +tar cvf 5.1.4-linux-arm64-build.tar elliebot-linux-arm64/* +tar cvf 5.1.4-osx-x64-build.tar elliebot-osx-x64/* +tar cvf 5.1.4-osx-arm64-build.tar elliebot-osx-arm64/* +zip -r 5.1.4-windows-x64-build.zip elliebot-windows-x64/* +zip -r 5.1.4-windows-arm64-build.zip elliebot-windows-arm64/* echo "" echo "Moving the installer file you would have generated" @@ -15,4 +15,4 @@ echo "if you followed the instructions in the bottom of the build.ps1 file" echo "to the directory this script in run in." echo "" -#mv ellie-installers/5.1.3/ellie-setup-5.1.3.exe ellie-setup-5.1.3.exe \ No newline at end of file +mv ellie-installers/5.1.4/ellie-setup-5.1.4.exe ellie-setup-5.1.4.exe \ No newline at end of file -- 2.43.0 From 151146378b7f8d10dbbd8cfb597cc0f649db8fc2 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 16:26:21 +1200 Subject: [PATCH 032/253] Updated CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72eda49..8679a5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o +Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## [5.1.4] - Unreleased +## [5.1.4] - 15.07.2024 ### Added -- 2.43.0 From 668d9e4734cc3b1b3b6fa5ba1760903bdabb85e7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 15 Jul 2024 16:37:57 +1200 Subject: [PATCH 033/253] Found stuff that is wrong. --- .../Modules/Games/ChatterBot/ChatterbotService.cs | 8 ++++---- .../Games/ChatterBot/_common/OpenAiApiSession.cs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs index 2129d3b..66decdc 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs @@ -90,15 +90,15 @@ public class ChatterBotService : IExecOnMessage public string PrepareMessage(IUserMessage msg) { - var nadekoId = _client.CurrentUser.Id; - var normalMention = $"<@{nadekoId}> "; - var nickMention = $"<@!{nadekoId}> "; + var ellieId = _client.CurrentUser.Id; + var normalMention = $"<@{ellieId}> "; + var nickMention = $"<@!{ellieId}> "; string message; if (msg.Content.StartsWith(normalMention, StringComparison.InvariantCulture)) message = msg.Content[normalMention.Length..].Trim(); else if (msg.Content.StartsWith(nickMention, StringComparison.InvariantCulture)) message = msg.Content[nickMention.Length..].Trim(); - else if (msg.ReferencedMessage?.Author.Id == nadekoId) + else if (msg.ReferencedMessage?.Author.Id == ellieId) message = msg.Content; else return null; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs index 4511988..42afd22 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs @@ -15,7 +15,7 @@ public partial class OpenAiApiSession : IChatterBotSession private readonly int _maxHistory; private readonly int _maxTokens; private readonly int _minTokens; - private readonly string _nadekoUsername; + private readonly string _ellieUsername; private readonly GptEncoding _encoding; private List messages = new(); private readonly IHttpClientFactory _httpFactory; @@ -29,7 +29,7 @@ public partial class OpenAiApiSession : IChatterBotSession int maxTokens, int minTokens, string personality, - string nadekoUsername, + string ellieUsername, IHttpClientFactory factory) { if (string.IsNullOrWhiteSpace(url) || !Uri.TryCreate(url, UriKind.Absolute, out _)) @@ -45,7 +45,7 @@ public partial class OpenAiApiSession : IChatterBotSession _maxHistory = chatHistory; _maxTokens = maxTokens; _minTokens = minTokens; - _nadekoUsername = UsernameCleaner().Replace(nadekoUsername, ""); + _ellieUsername = UsernameCleaner().Replace(ellieUsername, ""); _encoding = GptEncoding.GetEncodingForModel("gpt-4o"); if (!string.IsNullOrWhiteSpace(personality)) { @@ -53,7 +53,7 @@ public partial class OpenAiApiSession : IChatterBotSession { Role = "system", Content = personality, - Name = _nadekoUsername + Name = _ellieUsername }); } } @@ -128,7 +128,7 @@ public partial class OpenAiApiSession : IChatterBotSession { Role = "assistant", Content = message, - Name = _nadekoUsername + Name = _ellieUsername }); return new ThinkResult() -- 2.43.0 From 8367179406d0c20e9841e268eec210c0504c312d Mon Sep 17 00:00:00 2001 From: toastie_t0ast Date: Sun, 14 Jul 2024 23:39:16 -0700 Subject: [PATCH 034/253] Delete build.ps1 --- build.ps1 | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 45e4d6b..0000000 --- a/build.ps1 +++ /dev/null @@ -1,46 +0,0 @@ -Write-Output "" -Write-Output "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" -Write-Output "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" -Write-Output "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " -Write-Output "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " -Write-Output "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " -Write-Output "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " -Write-Output "" -Write-Output "Copyright © 2024 Toastie_t0ast & EllieBotDevs" -Write-Output "" - -Write-Output "" -Write-Output "Publishing EllieBot" -Write-Output "" - -Write-Output "" -dotnet publish -c Release -r linux-x64 --self-contained -o elliebot-linux-x64 src/EllieBot/EllieBot.csproj -Write-Output "" -dotnet publish -c Release -r linux-arm64 --self-contained -o elliebot-linux-arm64 src/EllieBot/EllieBot.csproj -Write-Output "" -dotnet publish -c Release -r win-x64 --self-contained -o elliebot-windows-x64 src/EllieBot/EllieBot.csproj -Write-Output "" -dotnet publish -c Release -r win-arm64 --self-contained -o elliebot-windows-arm64 src/EllieBot/EllieBot.csproj -Write-Output "" -dotnet publish -c Release -r osx-x64 --self-contained -o elliebot-osx-x64 src/EllieBot/EllieBot.csproj -Write-Output "" -dotnet publish -c Release -r osx-arm64 --self-contained -o elliebot-osx-arm64 src/EllieBot/EllieBot.csproj - -Write-Output "" -Write-Output "Preparing the Windows installer build." -Write-Output "" - -dotnet clean -dotnet restore -f --no-cache -v n -dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=5.1.4 src/EllieBot - -Write-Output "" -Write-Output "" -Write-Output "Finished the initial build script" -Write-Output "" -Write-Output "To build the Windows installer please install Inno Setup from" -Write-Output "https://jrsoftware.org/isdl.php" -Write-Output "And compile the exe_builder.iss" -Write-Output "" -Write-Output "If you are running on Windows please run the wsl command" -Write-Output "then run build.sh" \ No newline at end of file -- 2.43.0 From 5c44755c64a1381d97ee42584ec2b1d32c68f9c9 Mon Sep 17 00:00:00 2001 From: toastie_t0ast Date: Sun, 14 Jul 2024 23:39:26 -0700 Subject: [PATCH 035/253] Delete build.sh --- build.sh | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 build.sh diff --git a/build.sh b/build.sh deleted file mode 100644 index e58b709..0000000 --- a/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -echo "" -echo "Compressing build files" -echo "" - -tar cvf 5.1.4-linux-x64-build.tar elliebot-linux-x64/* -tar cvf 5.1.4-linux-arm64-build.tar elliebot-linux-arm64/* -tar cvf 5.1.4-osx-x64-build.tar elliebot-osx-x64/* -tar cvf 5.1.4-osx-arm64-build.tar elliebot-osx-arm64/* -zip -r 5.1.4-windows-x64-build.zip elliebot-windows-x64/* -zip -r 5.1.4-windows-arm64-build.zip elliebot-windows-arm64/* - -echo "" -echo "Moving the installer file you would have generated" -echo "if you followed the instructions in the bottom of the build.ps1 file" -echo "to the directory this script in run in." -echo "" - -mv ellie-installers/5.1.4/ellie-setup-5.1.4.exe ellie-setup-5.1.4.exe \ No newline at end of file -- 2.43.0 From db83e6abc2b3c6f4196458067d45ebfda0270bf7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 16 Jul 2024 22:30:23 +1200 Subject: [PATCH 036/253] 'coins will no longer show double minus sign for negative changes --- src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs index 13112e1..1bb8910 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs @@ -238,6 +238,6 @@ public partial class Searches => value > 0 ? "▲" : "▼"; private static string GetSign(decimal value) - => value >= 0 ? "+" : "-"; + => value >= 0 ? "+" : ""; } } \ No newline at end of file -- 2.43.0 From f18eb1bf4280b421eb60e28e65fbed91a8649b8c Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 16 Jul 2024 22:35:14 +1200 Subject: [PATCH 037/253] 'exexport will now send you the file in DMs, to avoid incident. 'exexport will now have a timestamped name along with the server id --- src/EllieBot/Modules/Expressions/EllieExpressions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index 888901d..fab6775 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -397,7 +397,7 @@ public partial class EllieExpressions : EllieModule var serialized = _service.ExportExpressions(ctx.Guild?.Id); await using var stream = await serialized.ToStream(); - await ctx.Channel.SendFileAsync(stream, "exprs-export.yml"); + await ctx.User.SendFileAsync(stream, $"exprs-export_{DateTime.UtcNow:yyyy-MM-dd-HH-mm-ss}_{(ctx.Guild?.Id.ToString() ?? "global")}.yml"); } [Cmd] -- 2.43.0 From 636ddac4d410a236719ae65aa1c3f0f869562289 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 17 Jul 2024 00:33:43 +1200 Subject: [PATCH 038/253] afk added This still needs some work but it is here --- .gitignore | 3 + .../Modules/Expressions/EllieExpressions.cs | 5 +- src/EllieBot/Modules/Utility/Utility.cs | 132 ++++++++++++++++-- src/EllieBot/data/aliases.yml | 4 +- .../data/strings/commands/commands.en-US.yml | 10 ++ .../strings/responses/responses.en-US.json | 3 +- 6 files changed, 141 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 3b99327..8330cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,9 @@ src/EllieBot/credentials.json src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db +build.ps1 +build.sh +test.ps1 # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index fab6775..b79091d 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -401,11 +401,10 @@ public partial class EllieExpressions : EllieModule } [Cmd] -#if GLOBAL_ELLIE - [OwnerOnly] -#endif public async Task ExprsImport([Leftover] string input = null) { + // todo cooldown on public bot for 1 day, limit 100 + if (!AdminInGuildOrOwnerInDm()) { await Response().Error(strs.expr_insuff_perms).SendAsync(); diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index e79b39d..6ec28b5 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -1,4 +1,4 @@ -#nullable disable +using LinqToDB.Reflection; using EllieBot.Modules.Utility.Services; using Newtonsoft.Json; using System.Diagnostics; @@ -7,6 +7,8 @@ using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; +using EllieBot.Common.ModuleBehaviors; +using EllieBot.Modules.Games.Hangman; using EllieBot.Modules.Searches.Common; namespace EllieBot.Modules.Utility; @@ -41,6 +43,7 @@ public partial class Utility : EllieModule private readonly IHttpClientFactory _httpFactory; private readonly VerboseErrorsService _veService; private readonly IServiceProvider _services; + private readonly AfkService _afkService; public Utility( DiscordSocketClient client, @@ -50,7 +53,8 @@ public partial class Utility : EllieModule DownloadTracker tracker, IHttpClientFactory httpFactory, VerboseErrorsService veService, - IServiceProvider services) + IServiceProvider services, + AfkService afkService) { _client = client; _coord = coord; @@ -60,6 +64,7 @@ public partial class Utility : EllieModule _httpFactory = httpFactory; _veService = veService; _services = services; + _afkService = afkService; } [Cmd] @@ -99,7 +104,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] - public async Task WhosPlaying([Leftover] string game) + public async Task WhosPlaying([Leftover] string? game) { game = game?.Trim().ToUpperInvariant(); if (string.IsNullOrWhiteSpace(game)) @@ -140,7 +145,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] [Priority(0)] - public async Task InRole(int page, [Leftover] IRole role = null) + public async Task InRole(int page, [Leftover] IRole? role = null) { if (--page < 0) return; @@ -178,7 +183,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] [Priority(1)] - public Task InRole([Leftover] IRole role = null) + public Task InRole([Leftover] IRole? role = null) => InRole(1, role); [Cmd] @@ -218,7 +223,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] - public async Task UserId([Leftover] IGuildUser target = null) + public async Task UserId([Leftover] IGuildUser? target = null) { var usr = target ?? ctx.User; await Response() @@ -248,7 +253,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] - public async Task Roles(IGuildUser target, int page = 1) + public async Task Roles(IGuildUser? target, int page = 1) { var guild = ctx.Guild; @@ -301,7 +306,7 @@ public partial class Utility : EllieModule [Cmd] [RequireContext(ContextType.Guild)] - public async Task ChannelTopic([Leftover] ITextChannel channel = null) + public async Task ChannelTopic([Leftover] ITextChannel? channel = null) { if (channel is null) channel = (ITextChannel)ctx.Channel; @@ -382,7 +387,7 @@ public partial class Utility : EllieModule [BotPerm(GuildPerm.ManageEmojisAndStickers)] [UserPerm(GuildPerm.ManageEmojisAndStickers)] [Priority(0)] - public async Task EmojiAdd(string name, string url = null) + public async Task EmojiAdd(string name, string? url = null) { name = name.Trim(':'); @@ -456,10 +461,10 @@ public partial class Utility : EllieModule [RequireContext(ContextType.Guild)] [BotPerm(GuildPerm.ManageEmojisAndStickers)] [UserPerm(GuildPerm.ManageEmojisAndStickers)] - public async Task StickerAdd(string name = null, string description = null, params string[] tags) + public async Task StickerAdd(string? name = null, string? description = null, params string[] tags) { string format; - Stream stream = null; + Stream? stream = null; try { @@ -696,6 +701,19 @@ public partial class Utility : EllieModule await Response().Confirm(strs.verbose_errors_disabled).SendAsync(); } + [Cmd] + public async Task Afk([Leftover] string text) + { + var succ = await _afkService.SetAfkAsync(ctx.User.Id, text); + + if (succ) + { + await Response() + .Confirm(strs.afk_set) + .SendAsync(); + } + } + [Cmd] [NoPublicBot] [OwnerOnly] @@ -759,4 +777,96 @@ public partial class Utility : EllieModule await Response().Error(ex.Message).SendAsync(); } } +} + +public sealed class AfkService : IEService, IReadyExecutor +{ + private readonly IBotCache _cache; + private readonly DiscordSocketClient _client; + private readonly MessageSenderService _mss; + + public AfkService(IBotCache cache, DiscordSocketClient client, MessageSenderService mss) + { + _cache = cache; + _client = client; + _mss = mss; + } + + private static TypedKey GetKey(ulong userId) + => new($"afk:msg:{userId}"); + + public async Task SetAfkAsync(ulong userId, string text) + { + var added = await _cache.AddAsync(GetKey(userId), text, TimeSpan.FromHours(8), overwrite: true); + return added; + } + + public Task OnReadyAsync() + { + _client.MessageReceived += TryTriggerAfkMessage; + + return Task.CompletedTask; + } + + private Task TryTriggerAfkMessage(SocketMessage arg) + { + if (arg.Author.IsBot) + return Task.CompletedTask; + + if (arg.MentionedUsers.Count is 0 or > 2) + return Task.CompletedTask; + + if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc) + return Task.CompletedTask; + + + _ = Task.Run(async () => + { + var botUser = await tc.Guild.GetCurrentUserAsync(); + + var perms = botUser.GetPermissions(tc); + + if (!perms.SendMessages) + return; + + ulong mentionedUserId = 0; + foreach (var uid in uMsg.MentionedUserIds) + { + if (uid == arg.Author.Id) + continue; + + if (arg.Content.StartsWith($"<@{uid}>") || arg.Content.StartsWith($"<@!{uid}>")) + { + mentionedUserId = uid; + break; + } + } + + if (mentionedUserId == 0) + return; + + try + { + var result = await _cache.GetAsync(GetKey(mentionedUserId)); + if (result.TryPickT0(out var msg, out _)) + { + var st = SmartText.CreateFrom(msg); + + var toDelete = await _mss.Response(arg.Channel) + .Message(uMsg) + .Text(st) + .Sanitize(false) + .SendAsync(); + + toDelete.DeleteAfter(30); + } + } + catch (HttpException ex) + { + Log.Warning("Error in afk service: {Message}", ex.Message); + } + }); + + return Task.CompletedTask; + } } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 9140342..e8c0b4c 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -1410,4 +1410,6 @@ honeypot: coins: - coins - crypto - - cryptos \ No newline at end of file + - cryptos +afk: + - afk \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index d137d44..42a69c5 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4569,3 +4569,13 @@ coins: params: - page: desc: "Page number to show. Starts at 1." +afk: + desc: |- + Toggles AFK status for yourself with the specified message. + Anyone @ mentioning you in any server will receive the afk message. + This will only work if the other user's message starts with the mention. + ex: + - '' + params: + - msg: + desc: "The message to send when someone pings you." diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 4c0893e..37231cf 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -1104,5 +1104,6 @@ "queue_search_results": "Type the number of the search result to queue up that track.", "overloads": "Overloads", "honeypot_on": "Honeypot enabled on this channel.", - "honeypot_off": "Honeypot disabled." + "honeypot_off": "Honeypot disabled.", + "afk_set": "AFK message set. Type a message in any channel to clear." } -- 2.43.0 From afa00c8d4f83274b0cae4d175722d809c1c6f267 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 18 Jul 2024 21:54:45 +1200 Subject: [PATCH 039/253] Added 'afk ? command which sets an afk message which will trigger whenever someone pings a user. --- CHANGELOG.md | 7 + src/EllieBot/Modules/Utility/AfkService.cs | 148 ++++++++++++++++++ src/EllieBot/Modules/Utility/Utility.cs | 95 +---------- .../data/strings/commands/commands.en-US.yml | 3 +- 4 files changed, 158 insertions(+), 95 deletions(-) create mode 100644 src/EllieBot/Modules/Utility/AfkService.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index d2be481..c5722a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +### Added + +- Added: Added a `'afk ?` command which sets an afk message which will trigger whenever someone pings you + - Message will when you type a message in any channel that the bot sees, or after 8 hours, whichever comes first + - The specified message will be prefixed with "The user is afk: " + - The afk message will disappear 30 seconds after being triggered + ## [5.1.4] - 15.07.2024 ### Added diff --git a/src/EllieBot/Modules/Utility/AfkService.cs b/src/EllieBot/Modules/Utility/AfkService.cs new file mode 100644 index 0000000..d41169b --- /dev/null +++ b/src/EllieBot/Modules/Utility/AfkService.cs @@ -0,0 +1,148 @@ +using EllieBot.Common.ModuleBehaviors; + +namespace EllieBot.Modules.Utility; + +public sealed class AfkService : IEService, IReadyExecutor +{ + private readonly IBotCache _cache; + private readonly DiscordSocketClient _client; + private readonly MessageSenderService _mss; + + private static readonly TimeSpan _maxAfkDuration = 8.Hours(); + public AfkService(IBotCache cache, DiscordSocketClient client, MessageSenderService mss) + { + _cache = cache; + _client = client; + _mss = mss; + } + + private static TypedKey GetKey(ulong userId) + => new($"afk:msg:{userId}"); + + public async Task SetAfkAsync(ulong userId, string text) + { + var added = await _cache.AddAsync(GetKey(userId), text, _maxAfkDuration, overwrite: true); + + async Task StopAfk(SocketMessage socketMessage) + { + try + { + if (socketMessage.Author?.Id == userId) + { + await _cache.RemoveAsync(GetKey(userId)); + _client.MessageReceived -= StopAfk; + + // write the message saying afk status cleared + + if (socketMessage.Channel is ITextChannel tc) + { + _ = Task.Run(async () => + { + var msg = await _mss.Response(tc).Confirm("AFK message cleared!").SendAsync(); + + msg.DeleteAfter(5); + }); + } + + } + + } + catch (Exception ex) + { + Log.Warning("Unexpected error occurred while trying to stop afk: {Message}", ex.Message); + } + } + + _client.MessageReceived += StopAfk; + + + _ = Task.Run(async () => + { + await Task.Delay(_maxAfkDuration); + _client.MessageReceived -= StopAfk; + }); + + return added; + } + + public Task OnReadyAsync() + { + _client.MessageReceived += TryTriggerAfkMessage; + + return Task.CompletedTask; + } + + private Task TryTriggerAfkMessage(SocketMessage arg) + { + if (arg.Author.IsBot) + return Task.CompletedTask; + + if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc) + return Task.CompletedTask; + + if ((arg.MentionedUsers.Count is 0 or > 3) && uMsg.ReferencedMessage is null) + return Task.CompletedTask; + + _ = Task.Run(async () => + { + var botUser = await tc.Guild.GetCurrentUserAsync(); + + var perms = botUser.GetPermissions(tc); + + if (!perms.SendMessages) + return; + + ulong mentionedUserId = 0; + + if (arg.MentionedUsers.Count <= 3) + { + foreach (var uid in uMsg.MentionedUserIds) + { + if (uid == arg.Author.Id) + continue; + + if (arg.Content.StartsWith($"<@{uid}>") || arg.Content.StartsWith($"<@!{uid}>")) + { + mentionedUserId = uid; + break; + } + } + } + + if (mentionedUserId == 0) + { + if (uMsg.ReferencedMessage?.Author?.Id is not ulong repliedUserId) + { + return; + } + + mentionedUserId = repliedUserId; + } + + try + { + var result = await _cache.GetAsync(GetKey(mentionedUserId)); + if (result.TryPickT0(out var msg, out _)) + { + var st = SmartText.CreateFrom(msg); + + st = "The user is AFK: " + st; + + var toDelete = await _mss.Response(arg.Channel) + .Message(uMsg) + .Text(st) + .Sanitize(false) + .SendAsync(); + + toDelete.DeleteAfter(30); + } + } + catch (HttpException ex) + { + Log.Warning("Error in afk service: {Message}", ex.Message); + } + }); + + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 6ec28b5..7afa03e 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -7,7 +7,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; -using EllieBot.Common.ModuleBehaviors; using EllieBot.Modules.Games.Hangman; using EllieBot.Modules.Searches.Common; @@ -702,7 +701,7 @@ public partial class Utility : EllieModule } [Cmd] - public async Task Afk([Leftover] string text) + public async Task Afk([Leftover] string text = "No reason specified.") { var succ = await _afkService.SetAfkAsync(ctx.User.Id, text); @@ -777,96 +776,4 @@ public partial class Utility : EllieModule await Response().Error(ex.Message).SendAsync(); } } -} - -public sealed class AfkService : IEService, IReadyExecutor -{ - private readonly IBotCache _cache; - private readonly DiscordSocketClient _client; - private readonly MessageSenderService _mss; - - public AfkService(IBotCache cache, DiscordSocketClient client, MessageSenderService mss) - { - _cache = cache; - _client = client; - _mss = mss; - } - - private static TypedKey GetKey(ulong userId) - => new($"afk:msg:{userId}"); - - public async Task SetAfkAsync(ulong userId, string text) - { - var added = await _cache.AddAsync(GetKey(userId), text, TimeSpan.FromHours(8), overwrite: true); - return added; - } - - public Task OnReadyAsync() - { - _client.MessageReceived += TryTriggerAfkMessage; - - return Task.CompletedTask; - } - - private Task TryTriggerAfkMessage(SocketMessage arg) - { - if (arg.Author.IsBot) - return Task.CompletedTask; - - if (arg.MentionedUsers.Count is 0 or > 2) - return Task.CompletedTask; - - if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc) - return Task.CompletedTask; - - - _ = Task.Run(async () => - { - var botUser = await tc.Guild.GetCurrentUserAsync(); - - var perms = botUser.GetPermissions(tc); - - if (!perms.SendMessages) - return; - - ulong mentionedUserId = 0; - foreach (var uid in uMsg.MentionedUserIds) - { - if (uid == arg.Author.Id) - continue; - - if (arg.Content.StartsWith($"<@{uid}>") || arg.Content.StartsWith($"<@!{uid}>")) - { - mentionedUserId = uid; - break; - } - } - - if (mentionedUserId == 0) - return; - - try - { - var result = await _cache.GetAsync(GetKey(mentionedUserId)); - if (result.TryPickT0(out var msg, out _)) - { - var st = SmartText.CreateFrom(msg); - - var toDelete = await _mss.Response(arg.Channel) - .Message(uMsg) - .Text(st) - .Sanitize(false) - .SendAsync(); - - toDelete.DeleteAfter(30); - } - } - catch (HttpException ex) - { - Log.Warning("Error in afk service: {Message}", ex.Message); - } - }); - - return Task.CompletedTask; - } } \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 42a69c5..2ce37fb 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4571,7 +4571,8 @@ coins: desc: "Page number to show. Starts at 1." afk: desc: |- - Toggles AFK status for yourself with the specified message. + Toggles AFK status for yourself with the specified message. + If you don't provide a message it default to a generic one. Anyone @ mentioning you in any server will receive the afk message. This will only work if the other user's message starts with the mention. ex: -- 2.43.0 From 47c6f9ab03489b31457e05975e7eea50b9a7d734 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 19 Jul 2024 15:23:10 +1200 Subject: [PATCH 040/253] Possible fix for 'prune getting stuck after unsuccessful limit hit --- .../Modules/Administration/Prune/PruneService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/EllieBot/Modules/Administration/Prune/PruneService.cs b/src/EllieBot/Modules/Administration/Prune/PruneService.cs index 753b56b..cad3d01 100644 --- a/src/EllieBot/Modules/Administration/Prune/PruneService.cs +++ b/src/EllieBot/Modules/Administration/Prune/PruneService.cs @@ -26,21 +26,21 @@ public class PruneService : IEService ) { ArgumentNullException.ThrowIfNull(channel, nameof(channel)); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); var originalAmount = amount; - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); using var cancelSource = new CancellationTokenSource(); if (!_pruningGuilds.TryAdd(channel.GuildId, cancelSource)) return PruneResult.AlreadyRunning; - - if (!await _ps.LimitHitAsync(LimitedFeatureName.Prune, channel.Guild.OwnerId)) - { - return PruneResult.FeatureLimit; - } try { + if (!await _ps.LimitHitAsync(LimitedFeatureName.Prune, channel.Guild.OwnerId)) + { + return PruneResult.FeatureLimit; + } + var now = DateTime.UtcNow; IMessage[] msgs; IMessage lastMessage = null; -- 2.43.0 From 7d6a7f159bf0d96e548b9d135b02c78f9a51a04f Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 19 Jul 2024 15:26:45 +1200 Subject: [PATCH 041/253] Show a message when 'prune fails due to already running error --- .../Administration/Prune/PruneCommands.cs | 39 +++++++++++-------- .../strings/responses/responses.en-US.json | 1 + 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs b/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs index 2317bf0..5ebafab 100644 --- a/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs +++ b/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs @@ -65,23 +65,6 @@ public partial class Administration await progressMsg.DeleteAsync(); } - private async Task SendResult(PruneResult result) - { - switch (result) - { - case PruneResult.Success: - break; - case PruneResult.AlreadyRunning: - break; - case PruneResult.FeatureLimit: - await Response().Pending(strs.feature_limit_reached_owner).SendAsync(); - break; - - default: - throw new ArgumentOutOfRangeException(nameof(result), result, null); - } - } - // prune x [Cmd] [RequireContext(ContextType.Guild)] @@ -218,5 +201,27 @@ public partial class Administration await Response().Confirm(strs.prune_cancelled).SendAsync(); } + + + private async Task SendResult(PruneResult result) + { + switch (result) + { + case PruneResult.Success: + break; + case PruneResult.AlreadyRunning: + var msg = await Response().Pending(strs.prune_already_running).SendAsync(); + msg.DeleteAfter(5); + break; + case PruneResult.FeatureLimit: + var msg2 = await Response().Pending(strs.feature_limit_reached_owner).SendAsync(); + msg2.DeleteAfter(10); + break; + default: + Log.Error("Unhandled result received in prune: {Result}", result); + await Response().Error(strs.error_occured).SendAsync(); + break; + } + } } } \ No newline at end of file diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 37231cf..c7d5b7a 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -38,6 +38,7 @@ "prune_cancelled": "Pruning was cancelled.", "prune_not_found": "No active prune was found on this server.", "prune_progress": "Pruning... {0}/{1} messages deleted.", + "prune_already_running": "A prune is already running on this server.", "timeoutdm": "You have been timed out in {0} server.\nReason: {1}", "timedout_user": "User Timed Out", "remove_roles_pl": "have had their roles removed", -- 2.43.0 From 2e8e4daa25b81da7773ec788c0d9f41487c695a1 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 19 Jul 2024 15:29:31 +1200 Subject: [PATCH 042/253] 'cleverbot should be available on the public bot now --- .../Db/Extensions/GuildConfigExtensions.cs | 10 ----- .../Games/ChatterBot/ChatterBotCommands.cs | 19 ++------ .../Games/ChatterBot/ChatterbotService.cs | 44 ++++++++++++++++++- .../data/strings/commands/commands.en-US.yml | 6 +-- 4 files changed, 48 insertions(+), 31 deletions(-) diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index 7d16127..842fe4e 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -182,16 +182,6 @@ public static class GuildConfigExtensions .SelectMany(gc => gc.FollowedStreams) .ToList(); - public static void SetCleverbotEnabled(this DbSet configs, ulong id, bool cleverbotEnabled) - { - var conf = configs.FirstOrDefault(gc => gc.GuildId == id); - - if (conf is null) - return; - - conf.CleverbotEnabled = cleverbotEnabled; - } - public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId) { var gc = ctx.GuildConfigsForId(guildId, diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs index 371c958..7f7f2cb 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs @@ -18,31 +18,18 @@ public partial class Games [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageMessages)] - [NoPublicBot] public async Task CleverBot() { var channel = (ITextChannel)ctx.Channel; - if (_service.ChatterBotGuilds.TryRemove(channel.Guild.Id, out _)) - { - await using (var uow = _db.GetDbContext()) - { - uow.Set().SetCleverbotEnabled(ctx.Guild.Id, false); - await uow.SaveChangesAsync(); - } + var newState = await _service.ToggleChatterBotAsync(ctx.Guild.Id); + if (!newState) + { await Response().Confirm(strs.chatbot_disabled).SendAsync(); return; } - _service.ChatterBotGuilds.TryAdd(channel.Guild.Id, new(() => _service.CreateSession(), true)); - - await using (var uow = _db.GetDbContext()) - { - uow.Set().SetCleverbotEnabled(ctx.Guild.Id, true); - await uow.SaveChangesAsync(); - } - await Response().Confirm(strs.chatbot_enabled).SendAsync(); } } diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs index 66decdc..e088319 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs @@ -1,5 +1,8 @@ #nullable disable +using LinqToDB; +using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db.Models; using EllieBot.Modules.Games.Common; using EllieBot.Modules.Games.Common.ChatterBot; using EllieBot.Modules.Patronage; @@ -9,7 +12,7 @@ namespace EllieBot.Modules.Games.Services; public class ChatterBotService : IExecOnMessage { - public ConcurrentDictionary> ChatterBotGuilds { get; } + private ConcurrentDictionary> ChatterBotGuilds { get; } public int Priority => 1; @@ -20,6 +23,7 @@ public class ChatterBotService : IExecOnMessage private readonly IHttpClientFactory _httpFactory; private readonly GamesConfigService _gcs; private readonly IMessageSenderService _sender; + private readonly DbService _db; public readonly IPatronageService _ps; public ChatterBotService( @@ -30,12 +34,14 @@ public class ChatterBotService : IExecOnMessage IHttpClientFactory factory, IBotCredentials creds, GamesConfigService gcs, - IMessageSenderService sender) + IMessageSenderService sender, + DbService db) { _client = client; _perms = perms; _creds = creds; _sender = sender; + _db = db; _httpFactory = factory; _perms = perms; _gcs = gcs; @@ -196,4 +202,38 @@ public class ChatterBotService : IExecOnMessage return false; } + + public async Task ToggleChatterBotAsync(ulong guildId) + { + if (ChatterBotGuilds.TryRemove(guildId, out _)) + { + await using var uow = _db.GetDbContext(); + await uow.Set() + .ToLinqToDBTable() + .Where(x => x.GuildId == guildId) + .UpdateAsync((gc) => new GuildConfig() + { + CleverbotEnabled = false + }); + await uow.SaveChangesAsync(); + return false; + } + + ChatterBotGuilds.TryAdd(guildId, new(() => CreateSession(), true)); + + await using (var uow = _db.GetDbContext()) + { + await uow.Set() + .ToLinqToDBTable() + .Where(x => x.GuildId == guildId) + .UpdateAsync((gc) => new GuildConfig() + { + CleverbotEnabled = true + }); + + await uow.SaveChangesAsync(); + } + + return true; + } } \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 2ce37fb..7ad0299 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -1361,10 +1361,10 @@ flip: desc: "The number of times the coin is flipped." betflip: desc: |- - Bet to guess will the result be heads or tails. - Guessing awards you 1.95x the currency you've bet (rounded up). + Bet on the coin flip. + The result can be heads or tails. + Guessing correctly rewards you with 1.95x of the currency you've bet (rounded up). Multiplier can be changed by the bot owner. - ex: - 5 heads - 3 t -- 2.43.0 From 8316b03c8c5ff73f5aec9900bb170dee03ca534b Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 19 Jul 2024 15:31:09 +1200 Subject: [PATCH 043/253] Fixed some miscellaneous warnings in the build process And also updated games.yml and creds_example.yml --- CHANGELOG.md | 2 ++ .../Games/ChatterBot/_common/Choice.cs | 3 ++- .../Games/ChatterBot/_common/Message.cs | 3 ++- .../_common/OpenAiApi/OpenAiApiMessage.cs | 3 ++- .../_common/OpenAiApi/OpenAiApiRequest.cs | 3 ++- .../Modules/Searches/ReligiousCommands.cs | 3 ++- src/EllieBot/creds_example.yml | 2 +- src/EllieBot/data/games.yml | 22 +++++++++++++------ 8 files changed, 28 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5722a6..e842b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +## Unreleased + ### Added - Added: Added a `'afk ?` command which sets an afk message which will trigger whenever someone pings you diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs index db71eee..0d3cbe8 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs index 04532f5..bd85a77 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs index 0fdaf71..efadfc0 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs index 1ea5d69..cf06ac1 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Searches/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/ReligiousCommands.cs index a15bc74..97bd82a 100644 --- a/src/EllieBot/Modules/Searches/ReligiousCommands.cs +++ b/src/EllieBot/Modules/Searches/ReligiousCommands.cs @@ -1,4 +1,5 @@ -using EllieBot.Modules.Searches.Common; +#nullable disable +using EllieBot.Modules.Searches.Common; using System.Net.Http.Json; using System.Text.Json.Serialization; diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index c21a350..17e45e9 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 7 +version: 9 # Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/ token: "" # List of Ids of the users who have bot owner permissions diff --git a/src/EllieBot/data/games.yml b/src/EllieBot/data/games.yml index b46f69e..b5fa9c1 100644 --- a/src/EllieBot/data/games.yml +++ b/src/EllieBot/data/games.yml @@ -57,18 +57,26 @@ raceAnimals: # Which chatbot API should bot use. # 'cleverbot' - bot will use Cleverbot API. # 'gpt' - bot will use GPT API -chatBot: Gpt +chatBot: OpenAi chatGpt: + # Url to any openai api compatible url. + # Make sure to modify the modelName appropriately + # DO NOT add /v1/chat/completions suffix to the url + apiUrl: https://api.openai.com # Which GPT Model should bot use. - # gpt35turbo - cheapest - # gpt4o - more expensive, higher quality + # gpt-3.5-turbo - cheapest + # gpt-4o - more expensive, higher quality # - modelName: Gpt35Turbo - # How should the chat bot behave, what's its personality? (Usage of this counts towards the max tokens) + # If you are using another openai compatible api, you may use any of the models supported by that api + modelName: gpt-3.5-turbo + # How should the chatbot behave, what's its personality? + # This will be sent as a system message. + # Usage of this counts towards the max tokens. personalityPrompt: You are a chat bot willing to have a conversation with anyone about anything. - # The maximum number of messages in a conversation that can be remembered. (This will increase the number of tokens used) + # The maximum number of messages in a conversation that can be remembered. + # This will increase the number of tokens used. chatHistory: 5 - # The maximum number of tokens to use per GPT API call + # The maximum number of tokens to use per OpenAi API call maxTokens: 100 # The minimum number of tokens to use per GPT API call, such that chat history is removed to make room. minTokens: 30 -- 2.43.0 From 13be30e82319acbd6b841185c4e14185c2dbf8a4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 20 Jul 2024 16:44:29 +1200 Subject: [PATCH 044/253] You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands --- src/EllieBot/_common/CleverBotResponseStr.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/_common/CleverBotResponseStr.cs b/src/EllieBot/_common/CleverBotResponseStr.cs index 6675a41..2f06a67 100644 --- a/src/EllieBot/_common/CleverBotResponseStr.cs +++ b/src/EllieBot/_common/CleverBotResponseStr.cs @@ -6,5 +6,5 @@ namespace EllieBot.Modules.Permissions; [StructLayout(LayoutKind.Sequential, Size = 1)] public readonly struct CleverBotResponseStr { - public const string CLEVERBOT_RESPONSE = "cleverbot:response"; + public const string CLEVERBOT_RESPONSE = "CLEVERBOT:RESPONSE"; } \ No newline at end of file -- 2.43.0 From a51df649e288ee567b65df5fadddd4067dbf5fee Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 21 Jul 2024 15:38:47 +1200 Subject: [PATCH 045/253] Updated some bet descriptions to include 'all' 'half' usage instructions --- .../data/strings/commands/commands.en-US.yml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 7ad0299..99db777 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -843,7 +843,12 @@ setservericon: - img: desc: "The URL of the image file to be displayed as the bot's banner." send: - desc: 'Sends a message to a channel or user. Channel or user can be ' + desc: |- + Sends a message to a channel or user. + You can write "channel" (literally word 'channel') first followed by the channel id or channel mention, or + You can write "user" (literally word 'user') first followed by the user id or user mention. + After either one of those, specify the message to be sent. + This command can only be used by the Bot Owner. ex: - channel 123123123132312 Stop spamming commands plz - user 1231231232132 I can see in the console what you're doing. @@ -1365,6 +1370,7 @@ betflip: The result can be heads or tails. Guessing correctly rewards you with 1.95x of the currency you've bet (rounded up). Multiplier can be changed by the bot owner. + You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 heads - 3 t @@ -1630,7 +1636,7 @@ rps: desc: |- Play a game of Rocket-Paperclip-Scissors with Ellie. You can bet on it. Multiplier is the same as on betflip. - You can type 'all', 'half' or 'X%' to bet that part of your current balance. + You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - r 100 - scissors @@ -2755,7 +2761,7 @@ waifutransfer: newOwner: desc: "The user to whom ownership of the waifu is being transferred." waifugift: - desc: -| + desc: |- Gift an item to a waifu user. The waifu's value will be increased by the percentage of the gift's value. You can optionally prefix the gift with a multiplier to gift the item that many times. @@ -3765,7 +3771,11 @@ expredit: message: desc: "The text that will replace the original response in the expression's output." say: - desc: Bot will send the message you typed in the specified channel. If you omit the channel name, it will send the message in the current channel. Supports embeds. + desc: |- + Make the bot say something, or in other words, make the bot send the message. + You can optionally specify the channel where the bot will send the message. + If you omit the channel name, it will send the message in the current channel. + Supports embeds. ex: - hi - '#chat hi' @@ -4269,7 +4279,7 @@ bankbalance: Bot Owner can also check another user's bank balance. ex: - '' - - '@User' + - '@User' params: - {} banktake: @@ -4334,6 +4344,7 @@ betdraw: You can specify `r` or `b` for red or black, and `h` or `l` for high or low. You can specify only h/l or only r/b or both. Returns are high but **7 always loses**. + You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 50 r - 200 b l @@ -4579,4 +4590,4 @@ afk: - '' params: - msg: - desc: "The message to send when someone pings you." + desc: "The message to send when someone pings you." \ No newline at end of file -- 2.43.0 From e4cc5f4e808bff7c3b0c7f8437d7a5307215f64f Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 21 Jul 2024 15:43:34 +1200 Subject: [PATCH 046/253] Updated bot strings to clarify all half and x% usage --- .../data/strings/commands/commands.en-US.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 99db777..f7a93b1 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -1370,7 +1370,7 @@ betflip: The result can be heads or tails. Guessing correctly rewards you with 1.95x of the currency you've bet (rounded up). Multiplier can be changed by the bot owner. - You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 heads - 3 t @@ -1519,7 +1519,7 @@ betroll: desc: |- Bets the specified amount of currency and rolls a dice. Rolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10. - You can type 'all', 'half' or 'X%' to bet that part of your current balance. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 params: @@ -1530,7 +1530,7 @@ luckyladder: Bets the specified amount of currency on the lucky ladder. You can stop on one of many different multipliers. The won amount is rounded down to the nearest whole number. - You can type 'all', 'half' or 'X%' to bet that part of your current balance. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 10 params: @@ -1635,8 +1635,8 @@ choose: rps: desc: |- Play a game of Rocket-Paperclip-Scissors with Ellie. - You can bet on it. Multiplier is the same as on betflip. - You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. + You can bet on it. Winning awards you 1.95x of the bet. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - r 100 - scissors @@ -2718,7 +2718,7 @@ betstats: slot: desc: |- Play Ellie slots by placing your bet. - You can type 'all', 'half' or 'X%' to bet that part of your current balance. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 params: @@ -4344,7 +4344,7 @@ betdraw: You can specify `r` or `b` for red or black, and `h` or `l` for high or low. You can specify only h/l or only r/b or both. Returns are high but **7 always loses**. - You can type 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. + You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 50 r - 200 b l -- 2.43.0 From 9094b4e1444a8155981079e8bd4fc8c84ad960ce Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 27 Jul 2024 19:13:39 +1200 Subject: [PATCH 047/253] Added admin-only .warndelete command --- .../UserPunish/UserPunishCommands.cs | 26 +++ .../UserPunish/UserPunishService.cs | 200 ++++++++++-------- src/EllieBot/data/aliases.yml | 4 + .../data/strings/commands/commands.en-US.yml | 58 ++--- .../strings/responses/responses.en-US.json | 2 + 5 files changed, 176 insertions(+), 114 deletions(-) diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs index 27a3f12..3c43b1f 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs @@ -273,6 +273,31 @@ public partial class Administration .SendAsync(); } + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.Administrator)] + public Task WarnDelete(IGuildUser user, int index) + => WarnDelete(user.Id, index); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPermission.Administrator)] + public async Task WarnDelete(ulong userId, int index) + { + if (--index < 0) + return; + + var warn = await _service.WarnDelete(userId, index); + + if (warn is null) + { + await Response().Error(strs.warning_not_found).SendAsync(); + return; + } + + await Response().Confirm(strs.warning_deleted(Format.Bold(index.ToString()))).SendAsync(); + } + [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.BanMembers)] @@ -286,6 +311,7 @@ public partial class Administration { if (index < 0) return; + var success = await _service.WarnClearAsync(ctx.Guild.Id, userId, index, ctx.User.ToString()); var userStr = Format.Bold((ctx.Guild as SocketGuild)?.GetUser(userId)?.ToString() ?? userId.ToString()); if (index == 0) diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index cdc9900..9ab0b73 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -89,9 +89,10 @@ public class UserPunishService : IEService, IReadyExecutor { ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; - previousCount = uow.Set().ForId(guildId, userId) - .Where(w => !w.Forgiven && w.UserId == userId) - .Sum(x => x.Weight); + previousCount = uow.Set() + .ForId(guildId, userId) + .Where(w => !w.Forgiven && w.UserId == userId) + .Sum(x => x.Weight); uow.Set().Add(warn); @@ -103,7 +104,7 @@ public class UserPunishService : IEService, IReadyExecutor var totalCount = previousCount + weight; var p = ps.Where(x => x.Count > previousCount && x.Count <= totalCount) - .MaxBy(x => x.Count); + .MaxBy(x => x.Count); if (p is not null) { @@ -244,33 +245,33 @@ public class UserPunishService : IEService, IReadyExecutor { await using var uow = _db.GetDbContext(); var cleared = await uow.Set() - .Where(x => uow.Set() - .Any(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Clear) - && x.Forgiven == false - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.Set() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = "expiry" - }); + .Where(x => uow.Set() + .Any(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Clear) + && x.Forgiven == false + && x.DateAdded + < DateTime.UtcNow.AddHours(-uow.Set() + .Where(y => x.GuildId == y.GuildId) + .Select(y => y.WarnExpireHours) + .First())) + .UpdateAsync(_ => new() + { + Forgiven = true, + ForgivenBy = "expiry" + }); var deleted = await uow.Set() - .Where(x => uow.Set() - .Any(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Delete) - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.Set() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .DeleteAsync(); + .Where(x => uow.Set() + .Any(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Delete) + && x.DateAdded + < DateTime.UtcNow.AddHours(-uow.Set() + .Where(y => x.GuildId == y.GuildId) + .Select(y => y.WarnExpireHours) + .First())) + .DeleteAsync(); if (cleared > 0 || deleted > 0) { @@ -293,21 +294,21 @@ public class UserPunishService : IEService, IReadyExecutor if (config.WarnExpireAction == WarnExpireAction.Clear) { await uow.Set() - .Where(x => x.GuildId == guildId - && x.Forgiven == false - && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = "expiry" - }); + .Where(x => x.GuildId == guildId + && x.Forgiven == false + && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) + .UpdateAsync(_ => new() + { + Forgiven = true, + ForgivenBy = "expiry" + }); } else if (config.WarnExpireAction == WarnExpireAction.Delete) { await uow.Set() - .Where(x => x.GuildId == guildId - && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) - .DeleteAsync(); + .Where(x => x.GuildId == guildId + && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) + .DeleteAsync(); } await uow.SaveChangesAsync(); @@ -425,8 +426,8 @@ public class UserPunishService : IEService, IReadyExecutor { using var uow = _db.GetDbContext(); return uow.GuildConfigsForId(guildId, gc => gc.Include(x => x.WarnPunishments)) - .WarnPunishments.OrderBy(x => x.Count) - .ToArray(); + .WarnPunishments.OrderBy(x => x.Count) + .ToArray(); } public (IReadOnlyCollection<(string Original, ulong? Id, string Reason)> Bans, int Missing) MassKill( @@ -436,20 +437,20 @@ public class UserPunishService : IEService, IReadyExecutor var gusers = guild.Users; //get user objects and reasons var bans = people.Split("\n") - .Select(x => - { - var split = x.Trim().Split(" "); + .Select(x => + { + var split = x.Trim().Split(" "); - var reason = string.Join(" ", split.Skip(1)); + var reason = string.Join(" ", split.Skip(1)); - if (ulong.TryParse(split[0], out var id)) - return (Original: split[0], Id: id, Reason: reason); + if (ulong.TryParse(split[0], out var id)) + return (Original: split[0], Id: id, Reason: reason); - return (Original: split[0], - gusers.FirstOrDefault(u => u.ToString().ToLowerInvariant() == x)?.Id, - Reason: reason); - }) - .ToArray(); + return (Original: split[0], + gusers.FirstOrDefault(u => u.ToString().ToLowerInvariant() == x)?.Id, + Reason: reason); + }) + .ToArray(); //if user is null, means that person couldn't be found var missing = bans.Count(x => !x.Id.HasValue); @@ -483,11 +484,12 @@ public class UserPunishService : IEService, IReadyExecutor } else if (template is null) { - uow.Set().Add(new() - { - GuildId = guildId, - Text = text - }); + uow.Set() + .Add(new() + { + GuildId = guildId, + Text = text + }); } else template.Text = text; @@ -499,31 +501,31 @@ public class UserPunishService : IEService, IReadyExecutor { await using var ctx = _db.GetDbContext(); await ctx.Set() - .ToLinqToDBTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - Text = null, - DateAdded = DateTime.UtcNow, - PruneDays = pruneDays - }, - old => new() - { - PruneDays = pruneDays - }, - () => new() - { - GuildId = guildId - }); + .ToLinqToDBTable() + .InsertOrUpdateAsync(() => new() + { + GuildId = guildId, + Text = null, + DateAdded = DateTime.UtcNow, + PruneDays = pruneDays + }, + old => new() + { + PruneDays = pruneDays + }, + () => new() + { + GuildId = guildId + }); } public async Task GetBanPruneAsync(ulong guildId) { await using var ctx = _db.GetDbContext(); return await ctx.Set() - .Where(x => x.GuildId == guildId) - .Select(x => x.PruneDays) - .FirstOrDefaultAsyncLinqToDB(); + .Where(x => x.GuildId == guildId) + .Select(x => x.PruneDays) + .FirstOrDefaultAsyncLinqToDB(); } public Task GetBanUserDmEmbed( @@ -554,18 +556,18 @@ public class UserPunishService : IEService, IReadyExecutor banReason = string.IsNullOrWhiteSpace(banReason) ? "-" : banReason; var repCtx = new ReplacementContext(client, guild) - .WithOverride("%ban.mod%", () => moderator.ToString()) - .WithOverride("%ban.mod.fullname%", () => moderator.ToString()) - .WithOverride("%ban.mod.name%", () => moderator.Username) - .WithOverride("%ban.mod.discrim%", () => moderator.Discriminator) - .WithOverride("%ban.user%", () => target.ToString()) - .WithOverride("%ban.user.fullname%", () => target.ToString()) - .WithOverride("%ban.user.name%", () => target.Username) - .WithOverride("%ban.user.discrim%", () => target.Discriminator) - .WithOverride("%reason%", () => banReason) - .WithOverride("%ban.reason%", () => banReason) - .WithOverride("%ban.duration%", - () => duration?.ToString(@"d\.hh\:mm") ?? "perma"); + .WithOverride("%ban.mod%", () => moderator.ToString()) + .WithOverride("%ban.mod.fullname%", () => moderator.ToString()) + .WithOverride("%ban.mod.name%", () => moderator.Username) + .WithOverride("%ban.mod.discrim%", () => moderator.Discriminator) + .WithOverride("%ban.user%", () => target.ToString()) + .WithOverride("%ban.user.fullname%", () => target.ToString()) + .WithOverride("%ban.user.name%", () => target.Username) + .WithOverride("%ban.user.discrim%", () => target.Discriminator) + .WithOverride("%reason%", () => banReason) + .WithOverride("%ban.reason%", () => banReason) + .WithOverride("%ban.duration%", + () => duration?.ToString(@"d\.hh\:mm") ?? "perma"); // if template isn't set, use the old message style @@ -594,4 +596,24 @@ public class UserPunishService : IEService, IReadyExecutor var output = SmartText.CreateFrom(template); return await _repSvc.ReplaceAsync(output, repCtx); } + + public async Task WarnDelete(ulong userId, int index) + { + await using var uow = _db.GetDbContext(); + + var warn = await uow.GetTable() + .Where(x => x.UserId == userId) + .OrderByDescending(x => x.DateAdded) + .Skip(index) + .FirstOrDefaultAsyncLinqToDB(); + + if (warn is not null) + { + await uow.GetTable() + .Where(x => x.Id == warn.Id) + .DeleteAsync(); + } + + return warn; + } } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index e8c0b4c..8e9ff14 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -947,6 +947,10 @@ warnexpire: warnclear: - warnclear - warnc +warndelete: + - warndelete + - warnrm + - warnd warnpunishlist: - warnpunishlist - warnpl diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index f7a93b1..f5d5a6d 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -576,7 +576,7 @@ deleterole: - Awesome Role params: - role: - desc: "The role being deleted, as identified by its unique identifier." + desc: "The role being deleted, as identified by its id." rolecolor: desc: Set a role's color using its hex value. Provide no color in order to see the hex value of the color of the specified role. The role you specify has to be lower in the role hierarchy than your highest role. ex: @@ -605,11 +605,11 @@ ban: - time: desc: "The duration of the temporary ban." userId: - desc: "The unique identifier of the user being banned." + desc: "The id of the user being banned." msg: desc: "The reason for the ban is provided in this message." - userId: - desc: "The unique identifier of the user being banned." + desc: "The id of the user being banned." msg: desc: "The reason for the ban is provided in this message." - user: @@ -627,7 +627,7 @@ softban: msg: desc: "The reason for the ban is described in this string." - userId: - desc: "The unique identifier for the user being banned and then unbanned." + desc: "The id of the user being banned and then unbanned." msg: desc: "The reason for the ban is described in this string." kick: @@ -1203,7 +1203,7 @@ userblacklist: - action: desc: "The type of operation to perform on the user, either adding or removing them from the blacklist." id: - desc: "The unique identifier of the user to be added, removed, or listed." + desc: "The id of the user to be added, removed, or listed." - action: desc: "The type of operation to perform on the user, either adding or removing them from the blacklist." usr: @@ -1223,7 +1223,7 @@ channelblacklist: - action: desc: "The type of operation to perform on the channel, either adding it to the blacklist or removing it from it." id: - desc: "The unique identifier of the channel being added, removed, or listed." + desc: "The id of the channel being added, removed, or listed." serverblacklist: desc: |- Either [add]s or [rem]oves a server, or servers specified by an ID from a blacklist. @@ -1239,7 +1239,7 @@ serverblacklist: - action: desc: "The type of operation to perform on the server(s). It can be either adding or removing them from the blacklist." id: - desc: "The unique identifier of the server being added, removed, or listed." + desc: "The id of the server being added, removed, or listed." - action: desc: "The type of operation to perform on the server(s). It can be either adding or removing them from the blacklist." guild: @@ -1296,7 +1296,7 @@ quoteshow: - 123 params: - quoteId: - desc: "The unique identifier for the quote being queried." + desc: "The id of the quote being queried." quotesearch: desc: 'Shows a random quote given a search query. Partially matches in several ways: 1) Only content of any quote, 2) only by author, 3) keyword and content, 3) or keyword and author' ex: @@ -1317,14 +1317,14 @@ quoteid: - 123456 params: - quoteId: - desc: "The unique identifier for the quote to be displayed." + desc: "The id of the quote to be displayed." quotedelete: desc: Deletes a quote with the specified ID. You have to either have the Manage Messages permission or be the creator of the quote to delete it. ex: - 123456 params: - quoteId: - desc: "The unique identifier for the quote being deleted." + desc: "The id of the quote being deleted." quotedeleteauthor: desc: Deletes all quotes by the specified author. If the author is not you, then ManageMessage server permission is required. ex: @@ -1822,7 +1822,7 @@ load: - 5 params: - id: - desc: "The unique identifier of the playlist to be loaded." + desc: "The id of the playlist to be loaded." playlists: desc: Lists all playlists. Paginated, 20 per page. ex: @@ -1836,7 +1836,7 @@ playlistshow: - 1 params: - id: - desc: "The unique identifier for the playlist to retrieve songs from." + desc: "The id of the playlist to retrieve songs from." page: desc: "The current page number for the pagination." deleteplaylist: @@ -2232,7 +2232,7 @@ currencytransaction: - 3yvd params: - id: - desc: "The unique identifier for the transaction being queried." + desc: "The id of the transaction being queried." listperms: desc: Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions. ex: @@ -2721,6 +2721,7 @@ slot: You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 + - 'all' params: - amount: desc: "The amount of currency to bet." @@ -3177,6 +3178,13 @@ warnclear: desc: "The ID of the user whose warnings are being cleared." index: desc: "The index of the warning to be cleared, or 0 to clear all warnings." +warndelete: + desc: Deletes a warning from a user by its index. + ex: + - 3 + params: + - index: + desc: "The index of the warning to be deleted." warnpunishlist: desc: Lists punishments for warnings. ex: @@ -3767,7 +3775,7 @@ expredit: - 123 I'm a magical girl params: - id: - desc: "The unique identifier for the expression being edited." + desc: "The id of the expression being edited." message: desc: "The text that will replace the original response in the expression's output." say: @@ -4080,7 +4088,7 @@ xpshopbuy: - type: desc: "The type of item to purchase, such as a skill or a cosmetic." key: - desc: "The unique identifier for the item being purchased." + desc: "The id of the item being purchased." xpshopuse: desc: Use a previously purchased item from the xp shop by specifying the type and the key of the item. ex: @@ -4090,7 +4098,7 @@ xpshopuse: - type: desc: "The type of item to be used, such as an experience point or a skill upgrade." key: - desc: "The unique identifier for the item in the XP shop that you want to use." + desc: "The id of the item in the XP shop that you want to use." bible: desc: Shows bible verse. You need to supply book name and chapter:verse ex: @@ -4118,13 +4126,13 @@ edit: - '#other-channel 771562360594628608 {{"description":"hello"}}' params: - messageId: - desc: "The unique identifier of the message being edited." + desc: "The id of the message being edited." text: desc: "The new text content of the edited message." - channel: desc: "The target channel where the edited message will be sent or updated in." messageId: - desc: "The unique identifier of the message being edited." + desc: "The id of the message being edited." text: desc: "The new text content of the edited message." delete: @@ -4135,13 +4143,13 @@ delete: - 771562360594628608 5m params: - messageId: - desc: "The unique identifier of a specific message within a channel, used to target the deletion operation." + desc: "The id of a specific message within a channel, used to target the deletion operation." time: desc: "The duration after which the message should be automatically deleted." - channel: desc: "The channel where the message is located or should be searched for." messageId: - desc: "The unique identifier of a specific message within a channel, used to target the deletion operation." + desc: "The id of a specific message within a channel, used to target the deletion operation." time: desc: "The duration after which the message should be automatically deleted." roleid: @@ -4294,7 +4302,7 @@ banktake: - amount: desc: "The total value of funds being withdrawn." userId: - desc: "The unique identifier for the user whose account is being accessed." + desc: "The id of the user whose account is being accessed." bankaward: desc: Award the specified amount of currency to a user's bank ex: @@ -4485,7 +4493,7 @@ todoedit: - abc This is an updated entry params: - todoId: - desc: "The unique identifier for the todo item being edited." + desc: "The id of the todo item being edited." newMessage: desc: "The text of a new task description or update to an existing one." todocomplete: @@ -4494,14 +4502,14 @@ todocomplete: - 4a params: - todoId: - desc: "The unique identifier for the todo item being marked as completed." + desc: "The id of the todo item being marked as completed." tododelete: desc: Deletes a todo with the specified ID. ex: - abc params: - todoId: - desc: "The unique identifier for the todo item being deleted." + desc: "The id of the todo item being deleted." todoclear: desc: Deletes all unarchived todos. ex: @@ -4535,7 +4543,7 @@ todoshow: - 4a params: - todoId: - desc: "The unique identifier for the todo item being displayed." + desc: "The id of the todo item being displayed." todoarchivedelete: desc: Deletes the archived todo list with the specified ID. ex: diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index c7d5b7a..523fb07 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -702,6 +702,7 @@ "warn_count": "{0} current, {1} total", "warnlog_for": "Warnlog for {0}", "warnpl_none": "No punishments set.", + "warning_not_found": "Warning not found.", "warn_expire_set_delete": "Warnings will be deleted after {0} days.", "warn_expire_set_clear": "Warnings will be cleared after {0} days.", "warn_expire_reset": "Warnings will no longer expire.", @@ -712,6 +713,7 @@ "warn_punish_rem": "Having {0} warnings will no longer trigger a punishment.", "warn_punish_set": "I will apply {0} punishment to users with {1} warnings.", "warn_punish_set_timed": "I will apply {0} punishment for {2} to users with {1} warnings.", + "warning_deleted": "Warning {0} has been deleted.", "time_new": "Time", "timezone": "Timezone", "timezone_db_api_key": "You need to activate your TimezoneDB API key. You can do so by clicking on the link you've received in the email with your API key.", -- 2.43.0 From ddbf8fd3de524a7a0827168ed0b404247afa8886 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 27 Jul 2024 19:16:25 +1200 Subject: [PATCH 048/253] Updated imagesharp package --- src/EllieBot/EllieBot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index de5f076..dfb91a8 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -70,7 +70,7 @@ - + -- 2.43.0 From 13fa7bd17b1911cb0bae54df888c975404016b89 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 00:51:04 +1200 Subject: [PATCH 049/253] Added .keep command which will add the current guild to the list of keptguilds. This is needed for the future database purge. --- .../DangerousCommands/CleanupCommands.cs | 10 +++ .../DangerousCommands/CleanupService.cs | 62 ++++++++++++++----- .../_common/ICleanupService.cs | 1 + src/EllieBot/data/aliases.yml | 4 +- .../data/strings/commands/commands.en-US.yml | 9 ++- 5 files changed, 67 insertions(+), 19 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 8fee8a3..e4e8e76 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -27,5 +27,15 @@ public partial class Administration .Confirm($"{result.GuildCount} guilds' data remain in the database.") .SendAsync(); } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.Administrator)] + public async Task Keep() + { + var result = await _svc.KeepGuild(Context.Guild.Id); + + await Response().Text("This guild's bot data will be saved.").SendAsync(); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index b2dbf46..92feac4 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -1,6 +1,7 @@ using LinqToDB; using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; +using LinqToDB.Mapping; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; @@ -66,67 +67,88 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete guild xp await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete expressions await ctx.GetTable() - .Where(x => x.GuildId != null && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) + .Where(x => x.GuildId != null + && !tempTable.Select(x => x.GuildId) + .Contains(x.GuildId.Value)) .DeleteAsync(); - + // delete quotes await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete planted currencies await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete image only channels await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete reaction roles await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + // delete ignored users await ctx.GetTable() - .Where(x => x.GuildId != null && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) + .Where(x => x.GuildId != null + && !tempTable.Select(x => x.GuildId) + .Contains(x.GuildId.Value)) .DeleteAsync(); - + // delete perm overrides await ctx.GetTable() - .Where(x => x.GuildId != null && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) + .Where(x => x.GuildId != null + && !tempTable.Select(x => x.GuildId) + .Contains(x.GuildId.Value)) .DeleteAsync(); - + // delete repeaters await ctx.GetTable() .Where(x => !tempTable.Select(x => x.GuildId) .Contains(x.GuildId)) .DeleteAsync(); - + return new() { GuildCount = guildIds.Keys.Count, }; } - + + public async Task KeepGuild(ulong guildId) + { + await using var db = _db.GetDbContext(); + await using var ctx = db.CreateLinqToDBContext(); + + var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); + + if (await table.AnyAsyncLinqToDB(x => x.GuildId == guildId)) + return false; + + await table.InsertAsync(() => new() + { + GuildId = guildId + }); + + return true; + } + private ValueTask OnKeepReport(KeepReport report) { guildIds[report.ShardId] = report.GuildIds; @@ -152,4 +174,10 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return default; } +} + +public class KeptGuilds +{ + [PrimaryKey] + public ulong GuildId { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index a396082..5d4a720 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -3,4 +3,5 @@ public interface ICleanupService { Task DeleteMissingGuildDataAsync(); + Task KeepGuild(ulong guildId); } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 8e9ff14..a6b5e16 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -1416,4 +1416,6 @@ coins: - crypto - cryptos afk: - - afk \ No newline at end of file + - afk +keep: + - keep \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index f5d5a6d..2ba8bc7 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4598,4 +4598,11 @@ afk: - '' params: - msg: - desc: "The message to send when someone pings you." \ No newline at end of file + desc: "The message to send when someone pings you." +keep: + desc: |- + The current serve, won't be deleted from Ellie's database during the purge. + ex: + - '' + params: + - {} \ No newline at end of file -- 2.43.0 From 86b015115a43a03006c96479b7c4718daf62900e Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:26:18 +1200 Subject: [PATCH 050/253] Brough .wiki command to 2018 standards --- src/EllieBot/Modules/Searches/Searches.cs | 108 ++++++++++-------- .../Modules/Searches/SearchesService.cs | 73 ++++++++++++ 2 files changed, 135 insertions(+), 46 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index b085ea6..6de2b01 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -136,11 +136,11 @@ public partial class Searches : EllieModule } var eb = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.time_new)) - .WithDescription(Format.Code(data.Time.ToString(Culture))) - .AddField(GetText(strs.location), string.Join('\n', data.Address.Split(", ")), true) - .AddField(GetText(strs.timezone), data.TimeZoneName, true); + .WithOkColor() + .WithTitle(GetText(strs.time_new)) + .WithDescription(Format.Code(data.Time.ToString(Culture))) + .AddField(GetText(strs.location), string.Join('\n', data.Address.Split(", ")), true) + .AddField(GetText(strs.timezone), data.TimeZoneName, true); await Response().Embed(eb).SendAsync(); } @@ -162,14 +162,16 @@ public partial class Searches : EllieModule await Response() .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(movie.Title) - .WithUrl($"https://www.imdb.com/title/{movie.ImdbId}/") - .WithDescription(movie.Plot.TrimTo(1000)) - .AddField("Rating", movie.ImdbRating, true) - .AddField("Genre", movie.Genre, true) - .AddField("Year", movie.Year, true) - .WithImageUrl(Uri.IsWellFormedUriString(movie.Poster, UriKind.Absolute) ? movie.Poster : null)) + .WithOkColor() + .WithTitle(movie.Title) + .WithUrl($"https://www.imdb.com/title/{movie.ImdbId}/") + .WithDescription(movie.Plot.TrimTo(1000)) + .AddField("Rating", movie.ImdbRating, true) + .AddField("Genre", movie.Genre, true) + .AddField("Year", movie.Year, true) + .WithImageUrl(Uri.IsWellFormedUriString(movie.Poster, UriKind.Absolute) + ? movie.Poster + : null)) .SendAsync(); } @@ -244,9 +246,9 @@ public partial class Searches : EllieModule await Response() .Embed(_sender.CreateEmbed() - .WithOkColor() - .AddField(GetText(strs.original_url), $"<{query}>") - .AddField(GetText(strs.short_url), $"<{shortLink}>")) + .WithOkColor() + .AddField(GetText(strs.original_url), $"<{query}>") + .AddField(GetText(strs.short_url), $"<{shortLink}>")) .SendAsync(); } @@ -266,13 +268,13 @@ public partial class Searches : EllieModule } var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(card.Name) - .WithDescription(card.Description) - .WithImageUrl(card.ImageUrl) - .AddField(GetText(strs.store_url), card.StoreUrl, true) - .AddField(GetText(strs.cost), card.ManaCost, true) - .AddField(GetText(strs.types), card.Types, true); + .WithOkColor() + .WithTitle(card.Name) + .WithDescription(card.Description) + .WithImageUrl(card.ImageUrl) + .AddField(GetText(strs.store_url), card.StoreUrl, true) + .AddField(GetText(strs.cost), card.ManaCost, true) + .AddField(GetText(strs.types), card.Types, true); await Response().Embed(embed).SendAsync(); } @@ -331,10 +333,10 @@ public partial class Searches : EllieModule { var item = items[0]; return _sender.CreateEmbed() - .WithOkColor() - .WithUrl(item.Permalink) - .WithTitle(item.Word) - .WithDescription(item.Definition); + .WithOkColor() + .WithUrl(item.Permalink) + .WithTitle(item.Word) + .WithDescription(item.Definition); }) .SendAsync(); return; @@ -402,11 +404,11 @@ public partial class Searches : EllieModule { var model = items.First(); var embed = _sender.CreateEmbed() - .WithDescription(ctx.User.Mention) - .AddField(GetText(strs.word), model.Word, true) - .AddField(GetText(strs._class), model.WordType, true) - .AddField(GetText(strs.definition), model.Definition) - .WithOkColor(); + .WithDescription(ctx.User.Mention) + .AddField(GetText(strs.word), model.Word, true) + .AddField(GetText(strs._class), model.WordType, true) + .AddField(GetText(strs.definition), model.Definition) + .WithOkColor(); if (!string.IsNullOrWhiteSpace(model.Example)) embed.AddField(GetText(strs.example), model.Example); @@ -432,22 +434,36 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Wiki([Leftover] string query = null) + public async Task Wiki([Leftover] string query) { query = query?.Trim(); if (!await ValidateQuery(query)) return; - using var http = _httpFactory.CreateClient(); - var result = await http.GetStringAsync( - "https://en.wikipedia.org//w/api.php?action=query&format=json&prop=info&redirects=1&formatversion=2&inprop=url&titles=" - + Uri.EscapeDataString(query)); - var data = JsonConvert.DeserializeObject(result); - if (data.Query.Pages[0].Missing || string.IsNullOrWhiteSpace(data.Query.Pages[0].FullUrl)) - await Response().Error(strs.wiki_page_not_found).SendAsync(); - else - await Response().Text(data.Query.Pages[0].FullUrl).SendAsync(); + var maybeRes = await _service.GetWikipediaPageAsync(query); + if (!maybeRes.TryPickT0(out var res, out var error)) + { + await HandleErrorAsync(error); + return; + } + + var data = res.Data; + await Response().Text(data.Url).SendAsync(); + } + + public Task HandleErrorAsync(ErrorType error) + { + var errorKey = error switch + { + ErrorType.ApiKeyMissing => strs.api_key_missing, + ErrorType.InvalidInput => strs.invalid_input, + ErrorType.NotFound => strs.not_found, + ErrorType.Unknown => strs.error_occured, + _ => strs.error_occured, + }; + + return Response().Error(errorKey).SendAsync(); } [Cmd] @@ -481,10 +497,10 @@ public partial class Searches : EllieModule await Response() .Embed( _sender.CreateEmbed() - .WithOkColor() - .AddField("Username", usr.ToString()) - .AddField("Avatar Url", avatarUrl) - .WithThumbnailUrl(avatarUrl.ToString())) + .WithOkColor() + .AddField("Username", usr.ToString()) + .AddField("Avatar Url", avatarUrl) + .WithThumbnailUrl(avatarUrl.ToString())) .SendAsync(); } diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index f5e3be4..742f71c 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -2,6 +2,7 @@ using EllieBot.Modules.Searches.Common; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using OneOf.Types; using SixLabors.Fonts; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; @@ -454,4 +455,76 @@ public class SearchesService : IEService return gamesMap[key]; } + + public async Task> GetWikipediaPageAsync(string query) + { + query = query.Trim(); + if (string.IsNullOrEmpty(query)) + { + return ErrorType.InvalidInput; + } + + try + { + var result = await _c.GetOrAddAsync($"wikipedia_{query}", + async _ => + { + using var http = _httpFactory.CreateClient(); + http.DefaultRequestHeaders.Clear(); + + return await http.GetStringAsync( + "https://en.wikipedia.org/w/api.php?action=query" + + "&format=json" + + "&prop=info" + + "&redirects=1" + + "&formatversion=2" + + "&inprop=url" + + "&titles=" + + Uri.EscapeDataString(query)); + }, + TimeSpan.FromHours(1)) + .ConfigureAwait(false); + + var data = JsonConvert.DeserializeObject(result); + + if (data.Query.Pages is null || !data.Query.Pages.Any() || data.Query.Pages.First().Missing) + { + return ErrorType.NotFound; + } + + Log.Information("Sending wikipedia url for: {Query}", query); + + return new WikipediaReply + { + Data = new() + { + Url = data.Query.Pages[0].FullUrl, + } + }; + } + catch (Exception ex) + { + Log.Error(ex, "Error retrieving wikipedia data for: '{Query}'", query); + + return ErrorType.Unknown; + } + } +} + +public enum ErrorType +{ + InvalidInput, + NotFound, + Unknown, + ApiKeyMissing +} + +public class WikipediaReply +{ + public class Info + { + public required string Url { get; init; } + } + + public required Info Data { get; init; } } \ No newline at end of file -- 2.43.0 From 20e5bbac8996926692efe22221c23668ec400f59 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:32:34 +1200 Subject: [PATCH 051/253] Removed .rip command --- src/EllieBot/Modules/Searches/Searches.cs | 10 --- .../Modules/Searches/SearchesService.cs | 63 ++----------------- src/EllieBot/Services/Impl/ImageCache.cs | 6 -- src/EllieBot/_common/ImageUrls.cs | 10 +-- .../_common/Services/Impl/FontProvider.cs | 6 -- .../_common/Services/Impl/IImageCache.cs | 2 - src/EllieBot/data/aliases.yml | 2 - .../data/strings/commands/commands.en-US.yml | 7 --- 8 files changed, 7 insertions(+), 99 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 6de2b01..b9e189b 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -39,16 +39,6 @@ public partial class Searches : EllieModule _tzSvc = tzSvc; } - [Cmd] - public async Task Rip([Leftover] IGuildUser usr) - { - var av = usr.RealAvatarUrl(); - await using var picStream = await _service.GetRipPictureAsync(usr.Nickname ?? usr.Username, av); - await ctx.Channel.SendFileAsync(picStream, - "rip.png", - $"Rip {Format.Bold(usr.ToString())} \n\t- " + Format.Italics(ctx.User.ToString())); - } - [Cmd] public async Task Weather([Leftover] string query) { diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 742f71c..4cdd5e8 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -73,56 +73,6 @@ public class SearchesService : IEService } } - public async Task GetRipPictureAsync(string text, Uri imgUrl) - => (await GetRipPictureFactory(text, imgUrl)).ToStream(); - - private void DrawAvatar(Image bg, Image avatarImage) - => bg.Mutate(x => x.Grayscale().DrawImage(avatarImage, new(83, 139), new GraphicsOptions())); - - public async Task GetRipPictureFactory(string text, Uri avatarUrl) - { - using var bg = Image.Load(await _imgs.GetRipBgAsync()); - var result = await _c.GetImageDataAsync(avatarUrl); - if (!result.TryPickT0(out var data, out _)) - { - using var http = _httpFactory.CreateClient(); - data = await http.GetByteArrayAsync(avatarUrl); - using (var avatarImg = Image.Load(data)) - { - avatarImg.Mutate(x => x.Resize(85, 85).ApplyRoundedCorners(42)); - await using var avStream = await avatarImg.ToStreamAsync(); - data = avStream.ToArray(); - DrawAvatar(bg, avatarImg); - } - - await _c.SetImageDataAsync(avatarUrl, data); - } - else - { - using var avatarImg = Image.Load(data); - DrawAvatar(bg, avatarImg); - } - - bg.Mutate(x => x.DrawText( - new TextOptions(_fonts.RipFont) - { - HorizontalAlignment = HorizontalAlignment.Center, - FallbackFontFamilies = _fonts.FallBackFonts, - Origin = new(bg.Width / 2, 225), - }, - text, - Color.Black)); - - //flowa - using (var flowers = Image.Load(await _imgs.GetRipOverlayAsync())) - { - bg.Mutate(x => x.DrawImage(flowers, new(0, 0), new GraphicsOptions())); - } - - await using var stream = bg.ToStream(); - return stream.ToArray(); - } - public async Task GetWeatherDataAsync(string query) { query = query.Trim().ToLowerInvariant(); @@ -396,12 +346,11 @@ public class SearchesService : IEService private async Task GetMovieDataFactory(string name) { using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync(string.Format("https://omdbapi.nadeko.bot/" - + "?t={0}" - + "&y=" - + "&plot=full" - + "&r=json", - name.Trim().Replace(' ', '+'))); + var res = await http.GetStringAsync("https://omdbapi.nadeko.bot/" + + $"?t={name.Trim().Replace(' ', '+')}" + + "&y=" + + "&plot=full" + + "&r=json"); var movie = JsonConvert.DeserializeObject(res); if (movie?.Title is null) return null; @@ -467,7 +416,7 @@ public class SearchesService : IEService try { var result = await _c.GetOrAddAsync($"wikipedia_{query}", - async _ => + async () => { using var http = _httpFactory.CreateClient(); http.DefaultRequestHeaders.Clear(); diff --git a/src/EllieBot/Services/Impl/ImageCache.cs b/src/EllieBot/Services/Impl/ImageCache.cs index 12ec051..4fc4e72 100644 --- a/src/EllieBot/Services/Impl/ImageCache.cs +++ b/src/EllieBot/Services/Impl/ImageCache.cs @@ -74,10 +74,4 @@ public sealed class ImageCache : IImageCache, IEService public Task GetSlotBgAsync() => GetImageDataAsync(_ic.Data.Slots.Bg); - - public Task GetRipBgAsync() - => GetImageDataAsync(_ic.Data.Rip.Bg); - - public Task GetRipOverlayAsync() - => GetImageDataAsync(_ic.Data.Rip.Overlay); } \ No newline at end of file diff --git a/src/EllieBot/_common/ImageUrls.cs b/src/EllieBot/_common/ImageUrls.cs index 449043f..5dc9557 100644 --- a/src/EllieBot/_common/ImageUrls.cs +++ b/src/EllieBot/_common/ImageUrls.cs @@ -8,7 +8,7 @@ namespace EllieBot.Common; public partial class ImageUrls : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 3; + public int Version { get; set; } = 4; public CoinData Coins { get; set; } public Uri[] Currency { get; set; } @@ -16,16 +16,8 @@ public partial class ImageUrls : ICloneable public RategirlData Rategirl { get; set; } public XpData Xp { get; set; } - //new - public RipData Rip { get; set; } public SlotData Slots { get; set; } - public class RipData - { - public Uri Bg { get; set; } - public Uri Overlay { get; set; } - } - public class SlotData { public Uri[] Emojis { get; set; } diff --git a/src/EllieBot/_common/Services/Impl/FontProvider.cs b/src/EllieBot/_common/Services/Impl/FontProvider.cs index 543f23c..2bead90 100644 --- a/src/EllieBot/_common/Services/Impl/FontProvider.cs +++ b/src/EllieBot/_common/Services/Impl/FontProvider.cs @@ -12,11 +12,6 @@ public class FontProvider : IEService public FontFamily NotoSans { get; } //public FontFamily Emojis { get; } - /// - /// Font used for .rip command - /// - public Font RipFont { get; } - public List FallBackFonts { get; } private readonly FontCollection _fonts; @@ -54,7 +49,6 @@ public class FontProvider : IEService FallBackFonts.AddRange(_fonts.AddCollection(font)); } - RipFont = NotoSans.CreateFont(20, FontStyle.Bold); DottyFont = FallBackFonts.First(x => x.Name == "dotty"); } } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/Impl/IImageCache.cs b/src/EllieBot/_common/Services/Impl/IImageCache.cs index 8c8ff32..890eeea 100644 --- a/src/EllieBot/_common/Services/Impl/IImageCache.cs +++ b/src/EllieBot/_common/Services/Impl/IImageCache.cs @@ -11,7 +11,5 @@ public interface IImageCache Task GetDiceAsync(int num); Task GetSlotEmojiAsync(int number); Task GetSlotBgAsync(); - Task GetRipBgAsync(); - Task GetRipOverlayAsync(); Task GetImageDataAsync(Uri url); } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index a6b5e16..d8c13df 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -1150,8 +1150,6 @@ discordpermoverridereset: - dpor rafflecur: - rafflecur -rip: - - rip timelyset: - timelyset timely: diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 2ba8bc7..ce0f56f 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -3885,13 +3885,6 @@ rafflecur: desc: "The minimum or maximum amount of currency that can be used for betting." mixed: desc: "The parameter determines whether the raffle operates in \"fixed\" or \"proportional\" mode." -rip: - desc: Shows the inevitable fate of someone. - ex: - - '@Someone' - params: - - usr: - desc: "The user whose fate is being revealed." autodisconnect: desc: Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`. ex: -- 2.43.0 From 586f5ba4b01e5552b35616798b24ea1d8c442d0f Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:38:07 +1200 Subject: [PATCH 052/253] slightly updated .time --- src/EllieBot/Modules/Searches/Searches.cs | 22 ++----------------- .../Modules/Searches/SearchesService.cs | 12 +++++----- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index b9e189b..dfd1a8a 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -98,24 +98,7 @@ public partial class Searches : EllieModule var (data, err) = await _service.GetTimeDataAsync(query); if (err is not null) { - LocStr errorKey; - switch (err) - { - case TimeErrors.ApiKeyMissing: - errorKey = strs.api_key_missing; - break; - case TimeErrors.InvalidInput: - errorKey = strs.invalid_input; - break; - case TimeErrors.NotFound: - errorKey = strs.not_found; - break; - default: - errorKey = strs.error_occured; - break; - } - - await Response().Error(errorKey).SendAsync(); + await HandleErrorAsync(err.Value); return; } @@ -479,8 +462,7 @@ public partial class Searches : EllieModule [RequireContext(ContextType.Guild)] public async Task Avatar([Leftover] IGuildUser usr = null) { - if (usr is null) - usr = (IGuildUser)ctx.User; + usr ??= (IGuildUser)ctx.User; var avatarUrl = usr.RealAvatarUrl(2048); diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 4cdd5e8..f7406cf 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -104,26 +104,26 @@ public class SearchesService : IEService } } - public Task<((string Address, DateTime Time, string TimeZoneName), TimeErrors?)> GetTimeDataAsync(string arg) + public Task<((string Address, DateTime Time, string TimeZoneName), ErrorType?)> GetTimeDataAsync(string arg) => GetTimeDataFactory(arg); //return _cache.GetOrAddCachedDataAsync($"ellie_time_{arg}", // GetTimeDataFactory, // arg, // TimeSpan.FromMinutes(1)); - private async Task<((string Address, DateTime Time, string TimeZoneName), TimeErrors?)> GetTimeDataFactory( + private async Task<((string Address, DateTime Time, string TimeZoneName), ErrorType?)> GetTimeDataFactory( string query) { query = query.Trim(); if (string.IsNullOrEmpty(query)) - return (default, TimeErrors.InvalidInput); + return (default, ErrorType.InvalidInput); var locIqKey = _creds.GetCreds().LocationIqApiKey; var tzDbKey = _creds.GetCreds().TimezoneDbApiKey; if (string.IsNullOrWhiteSpace(locIqKey) || string.IsNullOrWhiteSpace(tzDbKey)) - return (default, TimeErrors.ApiKeyMissing); + return (default, ErrorType.ApiKeyMissing); try { @@ -147,7 +147,7 @@ public class SearchesService : IEService if (responses is null || responses.Length == 0) { Log.Warning("Geocode lookup failed for: {Query}", query); - return (default, TimeErrors.NotFound); + return (default, ErrorType.NotFound); } var geoData = responses[0]; @@ -171,7 +171,7 @@ public class SearchesService : IEService catch (Exception ex) { Log.Error(ex, "Weather error: {Message}", ex.Message); - return (default, TimeErrors.NotFound); + return (default, ErrorType.NotFound); } } -- 2.43.0 From 3a597a49ea5830a8094b2daf1a57b12e4a24b32c Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:49:57 +1200 Subject: [PATCH 053/253] v3 .catfact --- src/EllieBot/Modules/Searches/Searches.cs | 10 +++++--- .../Modules/Searches/SearchesService.cs | 25 +++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index dfd1a8a..21eb45d 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -399,10 +399,14 @@ public partial class Searches : EllieModule [Cmd] public async Task Catfact() { - using var http = _httpFactory.CreateClient(); - var response = await http.GetStringAsync("https://catfact.ninja/fact"); + var maybeFact = await _service.GetCatFactAsync(); + + if (!maybeFact.TryPickT0(out var fact, out var error)) + { + await HandleErrorAsync(error); + return; + } - var fact = JObject.Parse(response)["fact"].ToString(); await Response().Confirm("🐈" + GetText(strs.catfact), fact).SendAsync(); } diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index f7406cf..4ff9358 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -2,14 +2,8 @@ using EllieBot.Modules.Searches.Common; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using OneOf.Types; -using SixLabors.Fonts; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using Color = SixLabors.ImageSharp.Color; -using Image = SixLabors.ImageSharp.Image; +using System.Text.Json; +using OneOf; namespace EllieBot.Modules.Searches.Services; @@ -458,6 +452,21 @@ public class SearchesService : IEService return ErrorType.Unknown; } } + + public async Task> GetCatFactAsync() + { + using var http = _httpFactory.CreateClient(); + var response = await http.GetStringAsync("https://catfact.ninja/fact").ConfigureAwait(false); + + var doc = JsonDocument.Parse(response); + + if (!doc.RootElement.TryGetProperty("fact", out var factElement)) + { + return ErrorType.Unknown; + } + + return factElement.ToString(); + } } public enum ErrorType -- 2.43.0 From e3a4c4bd4349e71fdbd7a6b8156327aa10e53ad6 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:54:10 +1200 Subject: [PATCH 054/253] slight update to lmgtfy command's strings --- src/EllieBot/Modules/Searches/Searches.cs | 8 +++----- src/EllieBot/data/strings/commands/commands.en-US.yml | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 21eb45d..b6a7140 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.Caching.Memory; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Services; -using EllieBot.Modules.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SixLabors.ImageSharp; @@ -11,7 +10,6 @@ using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; using System.Diagnostics.CodeAnalysis; using System.Net; -using System.Net.Http.Json; using Color = SixLabors.ImageSharp.Color; namespace EllieBot.Modules.Searches; @@ -171,12 +169,12 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Lmgtfy([Leftover] string ffs = null) + public async Task Lmgtfy([Leftover] string smh = null) { - if (!await ValidateQuery(ffs)) + if (!await ValidateQuery(smh)) return; - var shortenedUrl = await _google.ShortenUrl($"https://letmegooglethat.com/?q={Uri.EscapeDataString(ffs)}"); + var shortenedUrl = await _google.ShortenUrl($"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"); await Response().Confirm($"<{shortenedUrl}>").SendAsync(); } diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index ce0f56f..8e5ff9d 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -2078,11 +2078,11 @@ image: - query: desc: "The search term used to retrieve the desired image." lmgtfy: - desc: Google something for an idiot. + desc: Google something for a baka. ex: - - query + - How to eat a banana params: - - ffs: + - smh: desc: "The search query to be entered into the search engine." google: desc: Get a Google search link for some terms. -- 2.43.0 From 1df8f092fe92cf8cc95d84783adaa5a1a93db709 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 18:57:59 +1200 Subject: [PATCH 055/253] .keep will also automatically trigger for any new server the bot joins --- .../Administration/DangerousCommands/CleanupService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 92feac4..7bf7128 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -159,10 +159,17 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService { await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger); + _client.JoinedGuild += ClientOnJoinedGuild; + if (_client.ShardId == 0) await _pubSub.Sub(_keepReportKey, OnKeepReport); } + private async Task ClientOnJoinedGuild(SocketGuild arg) + { + await KeepGuild(arg.Id); + } + private ValueTask OnKeepTrigger(bool arg) { _pubSub.Pub(_keepReportKey, -- 2.43.0 From 4c436ccd8f90d23e3912de05dd9c74d0650904c0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 19:00:25 +1200 Subject: [PATCH 056/253] .reroadd error message improved --- src/EllieBot/data/strings/responses/responses.en-US.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 523fb07..b55d8ad 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -1108,5 +1108,6 @@ "overloads": "Overloads", "honeypot_on": "Honeypot enabled on this channel.", "honeypot_off": "Honeypot disabled.", - "afk_set": "AFK message set. Type a message in any channel to clear." + "afk_set": "AFK message set. Type a message in any channel to clear.", + "rero_message_not_found": "The specified message wasn't found. Make sure you've specified the message from this channel." } -- 2.43.0 From efa71c0233b4edee3509c57e73e6cf6e49057710 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 29 Jul 2024 19:00:25 +1200 Subject: [PATCH 057/253] .reroadd error message improved --- .../Modules/Administration/Role/ReactionRoleCommands.cs | 2 +- src/EllieBot/data/strings/responses/responses.en-US.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs b/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs index 3a728ed..cfcad28 100644 --- a/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs +++ b/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs @@ -33,7 +33,7 @@ public partial class Administration var msg = await ctx.Channel.GetMessageAsync(messageId); if (msg is null) { - await Response().Error(strs.not_found).SendAsync(); + await Response().Error(strs.rero_message_not_found).SendAsync(); return; } diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 523fb07..b55d8ad 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -1108,5 +1108,6 @@ "overloads": "Overloads", "honeypot_on": "Honeypot enabled on this channel.", "honeypot_off": "Honeypot disabled.", - "afk_set": "AFK message set. Type a message in any channel to clear." + "afk_set": "AFK message set. Type a message in any channel to clear.", + "rero_message_not_found": "The specified message wasn't found. Make sure you've specified the message from this channel." } -- 2.43.0 From 219c122f1cd2ac95fddacda96e201eb43f3e1884 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 31 Jul 2024 19:49:47 +1200 Subject: [PATCH 058/253] refactored .bible and .quran, moved to their own folder and created ReligiousApiService for their logic --- src/EllieBot/.editorconfig | 1 - .../Searches/Religious/Common/BibleVerse.cs | 13 +++ .../Searches/Religious/Common/BibleVerses.cs | 7 ++ .../Searches/Religious/Common/QuranAyah.cs | 20 ++++ .../Religious/Common/QuranResponse.cs | 15 +++ .../Searches/Religious/ReligiousApiService.cs | 63 +++++++++++ .../Searches/Religious/ReligiousCommands.cs | 60 ++++++++++ .../Modules/Searches/ReligiousCommands.cs | 103 ------------------ .../Modules/Searches/_common/BibleVerses.cs | 20 ---- 9 files changed, 178 insertions(+), 124 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs create mode 100644 src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs create mode 100644 src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs create mode 100644 src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs create mode 100644 src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs create mode 100644 src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/ReligiousCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/BibleVerses.cs diff --git a/src/EllieBot/.editorconfig b/src/EllieBot/.editorconfig index bc6d4d4..304861d 100644 --- a/src/EllieBot/.editorconfig +++ b/src/EllieBot/.editorconfig @@ -77,7 +77,6 @@ csharp_style_var_when_type_is_apparent = true:suggestion # Expression-bodied members csharp_style_expression_bodied_accessors = true:suggestion -csharp_style_expression_bodied_constructors = when_on_single_line:suggestion csharp_style_expression_bodied_indexers = true:suggestion csharp_style_expression_bodied_lambdas = true:suggestion csharp_style_expression_bodied_local_functions = true:suggestion diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs new file mode 100644 index 0000000..8edcd1d --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs @@ -0,0 +1,13 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Searches; + +public class BibleVerse +{ + [JsonPropertyName("book_name")] + public required string BookName { get; set; } + + public required int Chapter { get; set; } + public required int Verse { get; set; } + public required string Text { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs new file mode 100644 index 0000000..e31ee04 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs @@ -0,0 +1,7 @@ +namespace EllieBot.Modules.Searches; + +public class BibleVerses +{ + public string? Error { get; set; } + public BibleVerse[]? Verses { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs b/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs new file mode 100644 index 0000000..b299242 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs @@ -0,0 +1,20 @@ +#nullable disable +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Searches; + +public sealed class QuranAyah +{ + [JsonPropertyName("number")] + public int Number { get; set; } + + [JsonPropertyName("audio")] + public string Audio { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("text")] + public string Text { get; set; } + +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs b/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs new file mode 100644 index 0000000..86bee95 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace EllieBot.Modules.Searches; + +public sealed class QuranResponse +{ + [JsonPropertyName("code")] + public required int Code { get; set; } + + [JsonPropertyName("status")] + public required string Status { get; set; } + + [JsonPropertyName("data")] + public required T[] Data { get; set; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs new file mode 100644 index 0000000..07fbfa3 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs @@ -0,0 +1,63 @@ +using EllieBot.Modules.Searches.Common; +using OneOf; +using OneOf.Types; +using System.Net; +using System.Net.Http.Json; + +namespace EllieBot.Modules.Searches; + +public sealed class ReligiousApiService : IEService +{ + private readonly IHttpClientFactory _httpFactory; + + public ReligiousApiService(IHttpClientFactory httpFactory) + { + _httpFactory = httpFactory; + } + + public async Task>> GetBibleVerseAsync(string book, string chapterAndVerse) + { + if (string.IsNullOrWhiteSpace(book) || string.IsNullOrWhiteSpace(chapterAndVerse)) + return new Error("Invalid input."); + + + book = Uri.EscapeDataString(book); + chapterAndVerse = Uri.EscapeDataString(chapterAndVerse); + + using var http = _httpFactory.CreateClient(); + try + { + var res = await http.GetFromJsonAsync($"https://bible-api.com/{book} {chapterAndVerse}"); + + if (res is null || res.Error is not null || res.Verses is null || res.Verses.Length == 0) + { + return new Error(res?.Error ?? "No verse found."); + } + + return res.Verses[0]; + } + catch (HttpRequestException ex) when (ex.StatusCode == HttpStatusCode.NotFound) + { + return new Error("No verse found."); + } + } + + public async Task, Error>> GetQuranVerseAsync(string ayah) + { + if (string.IsNullOrWhiteSpace(ayah)) + return new Error(strs.invalid_input); + + ayah = Uri.EscapeDataString(ayah); + + using var http = _httpFactory.CreateClient(); + var res = await http.GetFromJsonAsync>( + $"https://api.alquran.cloud/v1/ayah/{ayah}/editions/en.asad,ar.alafasy"); + + if (res is null or not { Code: 200 }) + { + return new Error(strs.not_found); + } + + return res; + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs new file mode 100644 index 0000000..3bb7899 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs @@ -0,0 +1,60 @@ +namespace EllieBot.Modules.Searches; + +public partial class Searches +{ + public partial class ReligiousCommands : EllieModule + { + private readonly IHttpClientFactory _httpFactory; + + public ReligiousCommands(IHttpClientFactory httpFactory) + => _httpFactory = httpFactory; + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task Bible(string book, string chapterAndVerse) + { + var res = await _service.GetBibleVerseAsync(book, chapterAndVerse); + + if (!res.TryPickT0(out var verse, out var error)) + { + await Response().Error(error.Value).SendAsync(); + return; + } + + await Response() + .Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle($"{verse.BookName} {verse.Chapter}:{verse.Verse}") + .WithDescription(verse.Text)) + .SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task Quran(string ayah) + { + var res = await _service.GetQuranVerseAsync(ayah); + + if (!res.TryPickT0(out var qr, out var error)) + { + await Response().Error(error.Value).SendAsync(); + return; + } + + var english = qr.Data[0]; + var arabic = qr.Data[1]; + + using var http = _httpFactory.CreateClient(); + await using var audio = await http.GetStreamAsync(arabic.Audio); + + await Response() + .Embed(_sender.CreateEmbed() + .WithOkColor() + .AddField("Arabic", arabic.Text) + .AddField("English", english.Text) + .WithFooter(arabic.Number.ToString())) + .File(audio, Uri.EscapeDataString(ayah) + ".mp3") + .SendAsync(); + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/ReligiousCommands.cs deleted file mode 100644 index 97bd82a..0000000 --- a/src/EllieBot/Modules/Searches/ReligiousCommands.cs +++ /dev/null @@ -1,103 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using System.Net.Http.Json; -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - public partial class ReligiousCommands : EllieModule - { - private readonly IHttpClientFactory _httpFactory; - - public ReligiousCommands(IHttpClientFactory httpFactory) - { - _httpFactory = httpFactory; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Bible(string book, string chapterAndVerse) - { - var obj = new BibleVerses(); - try - { - using var http = _httpFactory.CreateClient(); - obj = await http.GetFromJsonAsync($"https://bible-api.com/{book} {chapterAndVerse}"); - } - catch - { - } - - if (obj.Error is not null || obj.Verses is null || obj.Verses.Length == 0) - await Response().Error(obj.Error ?? "No verse found.").SendAsync(); - else - { - var v = obj.Verses[0]; - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{v.BookName} {v.Chapter}:{v.Verse}") - .WithDescription(v.Text)) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Quran(string ayah) - { - using var http = _httpFactory.CreateClient(); - - var obj = await http.GetFromJsonAsync>($"https://api.alquran.cloud/v1/ayah/{Uri.EscapeDataString(ayah)}/editions/en.asad,ar.alafasy"); - if(obj is null or not { Code: 200 }) - { - await Response().Error("No verse found.").SendAsync(); - return; - } - - var english = obj.Data[0]; - var arabic = obj.Data[1]; - - await using var audio = await http.GetStreamAsync(arabic.Audio); - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .AddField("Arabic", arabic.Text) - .AddField("English", english.Text) - .WithFooter(arabic.Number.ToString())) - .File(audio, Uri.EscapeDataString(ayah) + ".mp3") - .SendAsync(); - } - } -} - -public sealed class QuranResponse -{ - [JsonPropertyName("code")] - public int Code { get; set; } - - [JsonPropertyName("status")] - public string Status { get; set; } - - [JsonPropertyName("data")] - public T[] Data { get; set; } -} - -public sealed class QuranAyah -{ - [JsonPropertyName("number")] - public int Number { get; set; } - - [JsonPropertyName("audio")] - public string Audio { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("text")] - public string Text { get; set; } - -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/BibleVerses.cs b/src/EllieBot/Modules/Searches/_common/BibleVerses.cs deleted file mode 100644 index 30dd045..0000000 --- a/src/EllieBot/Modules/Searches/_common/BibleVerses.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches.Common; - -public class BibleVerses -{ - public string Error { get; set; } - public BibleVerse[] Verses { get; set; } -} - -public class BibleVerse -{ - [JsonPropertyName("book_name")] - public string BookName { get; set; } - - public int Chapter { get; set; } - public int Verse { get; set; } - public string Text { get; set; } -} \ No newline at end of file -- 2.43.0 From fe5c8622dd028764318e9ed786278913b33d3a5e Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 1 Aug 2024 01:03:08 +1200 Subject: [PATCH 059/253] .wikia slightly changed and refactored --- src/EllieBot/Modules/Searches/Searches.cs | 33 +++------- .../Modules/Searches/SearchesService.cs | 61 ++++++++++++++----- .../Modules/Searches/_common/ErrorType.cs | 9 +++ .../Modules/Searches/_common/WikiaResponse.cs | 7 +++ .../Searches/_common/WikipediaReply.cs | 11 ++++ 5 files changed, 80 insertions(+), 41 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/_common/ErrorType.cs create mode 100644 src/EllieBot/Modules/Searches/_common/WikiaResponse.cs create mode 100644 src/EllieBot/Modules/Searches/_common/WikipediaReply.cs diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index b6a7140..9159ac6 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -487,35 +487,16 @@ public partial class Searches : EllieModule return; } - await ctx.Channel.TriggerTypingAsync(); - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - try - { - var res = await http.GetStringAsync($"https://{Uri.EscapeDataString(target)}.fandom.com/api.php" - + "?action=query" - + "&format=json" - + "&list=search" - + $"&srsearch={Uri.EscapeDataString(query)}" - + "&srlimit=1"); - var items = JObject.Parse(res); - var title = items["query"]?["search"]?.FirstOrDefault()?["title"]?.ToString(); + var maybeRes = await _service.GetWikiaPageAsync(target, query); - if (string.IsNullOrWhiteSpace(title)) - { - await Response().Error(strs.wikia_error).SendAsync(); - return; - } - - var url = Uri.EscapeDataString($"https://{target}.fandom.com/wiki/{title}"); - var response = $@"`{GetText(strs.title)}` {title.SanitizeMentions()} -`{GetText(strs.url)}:` {url}"; - await Response().Text(response).SendAsync(); - } - catch + if (!maybeRes.TryPickT0(out var res, out var error)) { - await Response().Error(strs.wikia_error).SendAsync(); + await HandleErrorAsync(error); + return; } + + var response = $"### {res.Title}\n{res.Url}"; + await Response().Text(response).Sanitize().SendAsync(); } [Cmd] diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 4ff9358..c336b72 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -460,6 +460,7 @@ public class SearchesService : IEService var doc = JsonDocument.Parse(response); + if (!doc.RootElement.TryGetProperty("fact", out var factElement)) { return ErrorType.Unknown; @@ -467,22 +468,52 @@ public class SearchesService : IEService return factElement.ToString(); } -} -public enum ErrorType -{ - InvalidInput, - NotFound, - Unknown, - ApiKeyMissing -} - -public class WikipediaReply -{ - public class Info + public async Task> GetWikiaPageAsync(string target, string query) { - public required string Url { get; init; } - } + if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query)) + { + return ErrorType.InvalidInput; + } - public required Info Data { get; init; } + query = Uri.EscapeDataString(query.Trim()); + target = Uri.EscapeDataString(target.Trim()); + + if (string.IsNullOrEmpty(query)) + { + return ErrorType.InvalidInput; + } + + using var http = _httpFactory.CreateClient(); + http.DefaultRequestHeaders.Clear(); + try + { + var res = await http.GetStringAsync($"https://{Uri.EscapeDataString(target)}.fandom.com/api.php" + + "?action=query" + + "&format=json" + + "&list=search" + + $"&srsearch={Uri.EscapeDataString(query)}" + + "&srlimit=1"); + var items = JObject.Parse(res); + var title = items["query"]?["search"]?.FirstOrDefault()?["title"]?.ToString(); + + if (string.IsNullOrWhiteSpace(title)) + { + return ErrorType.NotFound; + } + + var url = $"https://{target}.fandom.com/wiki/{title}"; + + return new WikiaResponse() + { + Url = url, + Title = title, + }; + } + catch (Exception ex) + { + Log.Warning(ex, "Error getting wikia page: {Message}", ex.Message); + return ErrorType.Unknown; + } + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/ErrorType.cs b/src/EllieBot/Modules/Searches/_common/ErrorType.cs new file mode 100644 index 0000000..0daeea5 --- /dev/null +++ b/src/EllieBot/Modules/Searches/_common/ErrorType.cs @@ -0,0 +1,9 @@ +namespace EllieBot.Modules.Searches.Services; + +public enum ErrorType +{ + InvalidInput, + NotFound, + Unknown, + ApiKeyMissing +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/WikiaResponse.cs b/src/EllieBot/Modules/Searches/_common/WikiaResponse.cs new file mode 100644 index 0000000..d0b3960 --- /dev/null +++ b/src/EllieBot/Modules/Searches/_common/WikiaResponse.cs @@ -0,0 +1,7 @@ +namespace EllieBot.Modules.Searches.Services; + +public sealed class WikiaResponse +{ + public required string Url { get; init; } + public required string Title { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/WikipediaReply.cs b/src/EllieBot/Modules/Searches/_common/WikipediaReply.cs new file mode 100644 index 0000000..3969090 --- /dev/null +++ b/src/EllieBot/Modules/Searches/_common/WikipediaReply.cs @@ -0,0 +1,11 @@ +namespace EllieBot.Modules.Searches.Services; + +public class WikipediaReply +{ + public class Info + { + public required string Url { get; init; } + } + + public required Info Data { get; init; } +} \ No newline at end of file -- 2.43.0 From 3e73dc8ba5b50db9d2e2bf783d8a4e19b50a46fc Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 1 Aug 2024 13:41:30 +1200 Subject: [PATCH 060/253] .define slightly improved and refactored --- src/EllieBot/Modules/Searches/Searches.cs | 90 ++++++------------- .../Modules/Searches/SearchesService.cs | 64 ++++++++++++- .../Modules/Searches/_common/DefineData.cs | 10 +++ 3 files changed, 100 insertions(+), 64 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/_common/DefineData.cs diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 9159ac6..b3cc561 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -327,71 +327,35 @@ public partial class Searches : EllieModule if (!await ValidateQuery(word)) return; - using var http = _httpFactory.CreateClient(); - string res; - try + + var maybeItems = await _service.GetDefinitionsAsync(word); + + if (!maybeItems.TryPickT0(out var defs, out var error)) { - res = await _cache.GetOrCreateAsync($"define_{word}", - e => - { - e.AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(12); - return http.GetStringAsync("https://api.pearson.com/v2/dictionaries/entries?headword=" - + WebUtility.UrlEncode(word)); - }); - - var responseModel = JsonConvert.DeserializeObject(res); - - var data = responseModel.Results - .Where(x => x.Senses is not null - && x.Senses.Count > 0 - && x.Senses[0].Definition is not null) - .Select(x => (Sense: x.Senses[0], x.PartOfSpeech)) - .ToList(); - - if (!data.Any()) - { - Log.Warning("Definition not found: {Word}", word); - await Response().Error(strs.define_unknown).SendAsync(); - } - - - var col = data.Select(x => ( - Definition: x.Sense.Definition is string - ? x.Sense.Definition.ToString() - : ((JArray)JToken.Parse(x.Sense.Definition.ToString())).First.ToString(), - Example: x.Sense.Examples is null || x.Sense.Examples.Count == 0 - ? string.Empty - : x.Sense.Examples[0].Text, Word: word, - WordType: string.IsNullOrWhiteSpace(x.PartOfSpeech) ? "-" : x.PartOfSpeech)) - .ToList(); - - Log.Information("Sending {Count} definition for: {Word}", col.Count, word); - - await Response() - .Paginated() - .Items(col) - .PageSize(1) - .Page((items, _) => - { - var model = items.First(); - var embed = _sender.CreateEmbed() - .WithDescription(ctx.User.Mention) - .AddField(GetText(strs.word), model.Word, true) - .AddField(GetText(strs._class), model.WordType, true) - .AddField(GetText(strs.definition), model.Definition) - .WithOkColor(); - - if (!string.IsNullOrWhiteSpace(model.Example)) - embed.AddField(GetText(strs.example), model.Example); - - return embed; - }) - .SendAsync(); - } - catch (Exception ex) - { - Log.Error(ex, "Error retrieving definition data for: {Word}", word); + await HandleErrorAsync(error); + return; } + + await Response() + .Paginated() + .Items(defs) + .PageSize(1) + .Page((items, _) => + { + var model = items.First(); + var embed = _sender.CreateEmbed() + .WithDescription(ctx.User.Mention) + .AddField(GetText(strs.word), model.Word, true) + .AddField(GetText(strs._class), model.WordType, true) + .AddField(GetText(strs.definition), model.Definition) + .WithOkColor(); + + if (!string.IsNullOrWhiteSpace(model.Example)) + embed.AddField(GetText(strs.example), model.Example); + + return embed; + }) + .SendAsync(); } [Cmd] diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index c336b72..3f01fc1 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -399,7 +399,7 @@ public class SearchesService : IEService return gamesMap[key]; } - public async Task> GetWikipediaPageAsync(string query) + public async Task> GetWikipediaPageAsync(string query) { query = query.Trim(); if (string.IsNullOrEmpty(query)) @@ -516,4 +516,66 @@ public class SearchesService : IEService return ErrorType.Unknown; } } + + private static TypedKey GetDefineKey(string query) + => new TypedKey($"define_{query}"); + + public async Task, ErrorType>> GetDefinitionsAsync(string query) + { + if (string.IsNullOrEmpty(query)) + { + return ErrorType.InvalidInput; + } + + query = Uri.EscapeDataString(query); + + using var http = _httpFactory.CreateClient(); + string res; + try + { + res = await _c.GetOrAddAsync(GetDefineKey(query), + async () => await http.GetStringAsync( + $"https://api.pearson.com/v2/dictionaries/entries?headword={query}"), + TimeSpan.FromHours(12)); + + var responseModel = JsonConvert.DeserializeObject(res); + + var data = responseModel.Results + .Where(x => x.Senses is not null + && x.Senses.Count > 0 + && x.Senses[0].Definition is not null) + .Select(x => (Sense: x.Senses[0], x.PartOfSpeech)) + .ToList(); + + if (!data.Any()) + { + Log.Warning("Definition not found: {Word}", query); + return ErrorType.NotFound; + } + + var items = new List(); + + foreach (var d in data) + { + items.Add(new DefineData + { + Definition = d.Sense.Definition is JArray { Count: > 0 } defs + ? defs[0].ToString() + : d.Sense.Definition.ToString(), + Example = d.Sense.Examples is null || d.Sense.Examples.Count == 0 + ? string.Empty + : d.Sense.Examples[0].Text, + WordType = string.IsNullOrWhiteSpace(d.PartOfSpeech) ? "-" : d.PartOfSpeech, + Word = query, + }); + } + + return items.OrderByDescending(x => !string.IsNullOrWhiteSpace(x.Example)).ToList(); + } + catch (Exception ex) + { + Log.Error(ex, "Error retrieving definition data for: {Word}", query); + return ErrorType.Unknown; + } + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/DefineData.cs b/src/EllieBot/Modules/Searches/_common/DefineData.cs new file mode 100644 index 0000000..2698d50 --- /dev/null +++ b/src/EllieBot/Modules/Searches/_common/DefineData.cs @@ -0,0 +1,10 @@ +#nullable disable +namespace EllieBot.Modules.Searches.Services; + +public sealed class DefineData +{ + public required string Definition { get; init; } + public required string Example { get; init; } + public required string WordType { get; init; } + public required string Word { get; init; } +} \ No newline at end of file -- 2.43.0 From 67224663cd0dd6d82a3d4169f9192e03e17898eb Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 1 Aug 2024 23:29:04 +1200 Subject: [PATCH 061/253] small cleanup --- src/EllieBot/Modules/Searches/Searches.cs | 12 ------------ src/EllieBot/_common/Interaction/EllieInteraction.cs | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index b3cc561..845e2ad 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -3,13 +3,11 @@ using Microsoft.Extensions.Caching.Memory; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Services; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; using System.Diagnostics.CodeAnalysis; -using System.Net; using Color = SixLabors.ImageSharp.Color; namespace EllieBot.Modules.Searches; @@ -478,16 +476,6 @@ public partial class Searches : EllieModule return; } - //var embed = _sender.CreateEmbed() - // .WithOkColor() - // .WithDescription(gameData.ShortDescription) - // .WithTitle(gameData.Name) - // .WithUrl(gameData.Link) - // .WithImageUrl(gameData.HeaderImage) - // .AddField(GetText(strs.genres), gameData.TotalEpisodes.ToString(), true) - // .AddField(GetText(strs.price), gameData.IsFree ? GetText(strs.FREE) : game, true) - // .AddField(GetText(strs.links), gameData.GetGenresString(), true) - // .WithFooter(GetText(strs.recommendations(gameData.TotalRecommendations))); await Response().Text($"https://store.steampowered.com/app/{appId}").SendAsync(); } diff --git a/src/EllieBot/_common/Interaction/EllieInteraction.cs b/src/EllieBot/_common/Interaction/EllieInteraction.cs index 05b258f..3a24470 100644 --- a/src/EllieBot/_common/Interaction/EllieInteraction.cs +++ b/src/EllieBot/_common/Interaction/EllieInteraction.cs @@ -70,6 +70,7 @@ public abstract class EllieInteractionBase { if (_singleUse) _interactionCompletedSource.TrySetResult(true); + await ExecuteOnActionAsync(smc); if (!smc.HasResponded) -- 2.43.0 From 0397ea09b0bcf2c81f6dff26df3a450406491c21 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 2 Aug 2024 00:06:28 +1200 Subject: [PATCH 062/253] using official version of discord.net upped version to 5.1.5 removed nuget.config as we are no longer using our fork of discord.net Fixed some build warnings --- EllieBot.sln | 5 +- NuGet.Config | 6 - src/Ellie.Marmalade/Ellie.Marmalade.csproj | 2 +- src/EllieBot/EllieBot.csproj | 4 +- .../Games/ChatterBot/_common/Choice.cs | 5 +- .../Games/ChatterBot/_common/Message.cs | 5 +- .../_common/OpenAiApi/OpenAiApiMessage.cs | 9 +- .../_common/OpenAiApi/OpenAiApiRequest.cs | 11 +- src/EllieBot/_common/DoAsUserMessage.cs | 131 +++++++++++++----- 9 files changed, 114 insertions(+), 64 deletions(-) delete mode 100644 NuGet.Config diff --git a/EllieBot.sln b/EllieBot.sln index 4a3f164..f34ad17 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -8,11 +8,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C633450-E6C2-47ED-A7AA-7367232F703A}" ProjectSection(SolutionItems) = preProject CHANGELOG.md = CHANGELOG.md - LICENSE = LICENSE - README.md = README.md Dockerfile = Dockerfile - NuGet.Config = NuGet.Config + LICENSE = LICENSE migrate.ps1 = migrate.ps1 + README.md = README.md remove-migrations.ps1 = remove-migrations.ps1 TODO.md = TODO.md EndProjectSection diff --git a/NuGet.Config b/NuGet.Config deleted file mode 100644 index 7e64704..0000000 --- a/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/Ellie.Marmalade/Ellie.Marmalade.csproj b/src/Ellie.Marmalade/Ellie.Marmalade.csproj index db33025..8371f74 100644 --- a/src/Ellie.Marmalade/Ellie.Marmalade.csproj +++ b/src/Ellie.Marmalade/Ellie.Marmalade.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index dfb91a8..1f0a2f0 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.4 + 5.1.5 $(MSBuildProjectDirectory) @@ -29,7 +29,7 @@ - + diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs index 0d3cbe8..c1290dd 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs @@ -1,10 +1,9 @@ -#nullable disable -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; public class Choice { [JsonPropertyName("message")] - public Message Message { get; init; } + public required Message Message { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs index bd85a77..df26315 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs @@ -1,10 +1,9 @@ -#nullable disable -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; public class Message { [JsonPropertyName("content")] - public string Content { get; init; } + public required string Content { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs index efadfc0..20ee90d 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs @@ -1,16 +1,15 @@ -#nullable disable -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; public class OpenAiApiMessage { [JsonPropertyName("role")] - public string Role { get; init; } + public required string Role { get; init; } [JsonPropertyName("content")] - public string Content { get; init; } + public required string Content { get; init; } [JsonPropertyName("name")] - public string Name { get; init; } + public required string Name { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs index cf06ac1..3ab7d68 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs @@ -1,19 +1,18 @@ -#nullable disable -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; public class OpenAiApiRequest { [JsonPropertyName("model")] - public string Model { get; init; } + public required string Model { get; init; } [JsonPropertyName("messages")] - public List Messages { get; init; } + public required List Messages { get; init; } [JsonPropertyName("temperature")] - public int Temperature { get; init; } + public required int Temperature { get; init; } [JsonPropertyName("max_tokens")] - public int MaxTokens { get; init; } + public required int MaxTokens { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/_common/DoAsUserMessage.cs b/src/EllieBot/_common/DoAsUserMessage.cs index f7f2980..68a9188 100644 --- a/src/EllieBot/_common/DoAsUserMessage.cs +++ b/src/EllieBot/_common/DoAsUserMessage.cs @@ -15,9 +15,11 @@ public sealed class DoAsUserMessage : IUserMessage _message = message; } - public ulong Id => _msg.Id; + public ulong Id + => _msg.Id; - public DateTimeOffset CreatedAt => _msg.CreatedAt; + public DateTimeOffset CreatedAt + => _msg.CreatedAt; public Task DeleteAsync(RequestOptions? options = null) { @@ -56,67 +58,104 @@ public sealed class DoAsUserMessage : IUserMessage ReactionType type = ReactionType.Normal) => _msg.GetReactionUsersAsync(emoji, limit, options, type); - public IAsyncEnumerable> GetReactionUsersAsync(IEmote emoji, int limit, + public IAsyncEnumerable> GetReactionUsersAsync( + IEmote emoji, + int limit, RequestOptions? options = null) { return _msg.GetReactionUsersAsync(emoji, limit, options); } - public MessageType Type => _msg.Type; + public MessageType Type + => _msg.Type; - public MessageSource Source => _msg.Source; + public MessageSource Source + => _msg.Source; - public bool IsTTS => _msg.IsTTS; + public bool IsTTS + => _msg.IsTTS; - public bool IsPinned => _msg.IsPinned; + public bool IsPinned + => _msg.IsPinned; - public bool IsSuppressed => _msg.IsSuppressed; + public bool IsSuppressed + => _msg.IsSuppressed; - public bool MentionedEveryone => _msg.MentionedEveryone; + public bool MentionedEveryone + => _msg.MentionedEveryone; - public string Content => _message; + public string Content + => _message; - public string CleanContent => _msg.CleanContent; + public string CleanContent + => _msg.CleanContent; - public DateTimeOffset Timestamp => _msg.Timestamp; + public DateTimeOffset Timestamp + => _msg.Timestamp; - public DateTimeOffset? EditedTimestamp => _msg.EditedTimestamp; + public DateTimeOffset? EditedTimestamp + => _msg.EditedTimestamp; - public IMessageChannel Channel => _msg.Channel; + public IMessageChannel Channel + => _msg.Channel; - public IUser Author => _user; + public IUser Author + => _user; - public IThreadChannel Thread => _msg.Thread; + public IThreadChannel Thread + => _msg.Thread; - public IReadOnlyCollection Attachments => _msg.Attachments; + public IReadOnlyCollection Attachments + => _msg.Attachments; - public IReadOnlyCollection Embeds => _msg.Embeds; + public IReadOnlyCollection Embeds + => _msg.Embeds; - public IReadOnlyCollection Tags => _msg.Tags; + public IReadOnlyCollection Tags + => _msg.Tags; - public IReadOnlyCollection MentionedChannelIds => _msg.MentionedChannelIds; + public IReadOnlyCollection MentionedChannelIds + => _msg.MentionedChannelIds; - public IReadOnlyCollection MentionedRoleIds => _msg.MentionedRoleIds; + public IReadOnlyCollection MentionedRoleIds + => _msg.MentionedRoleIds; - public IReadOnlyCollection MentionedUserIds => _msg.MentionedUserIds; + public IReadOnlyCollection MentionedUserIds + => _msg.MentionedUserIds; - public MessageActivity Activity => _msg.Activity; + public MessageActivity Activity + => _msg.Activity; - public MessageApplication Application => _msg.Application; + public MessageApplication Application + => _msg.Application; - public MessageReference Reference => _msg.Reference; + public MessageReference Reference + => _msg.Reference; - public IReadOnlyDictionary Reactions => _msg.Reactions; + public IReadOnlyDictionary Reactions + => _msg.Reactions; - public IReadOnlyCollection Components => _msg.Components; + public IReadOnlyCollection Components + => _msg.Components; - public IReadOnlyCollection Stickers => _msg.Stickers; + public IReadOnlyCollection Stickers + => _msg.Stickers; - public MessageFlags? Flags => _msg.Flags; + public MessageFlags? Flags + => _msg.Flags; [Obsolete("Obsolete in favor of InteractionMetadata")] - public IMessageInteraction Interaction => _msg.Interaction; - public MessageRoleSubscriptionData RoleSubscriptionData => _msg.RoleSubscriptionData; + public IMessageInteraction Interaction + => _msg.Interaction; + + public MessageRoleSubscriptionData RoleSubscriptionData + => _msg.RoleSubscriptionData; + + public PurchaseNotification PurchaseNotification + => _msg.PurchaseNotification; + + public MessageCallData? CallData + => _msg.CallData; public Task ModifyAsync(Action func, RequestOptions? options = null) { @@ -138,17 +177,39 @@ public sealed class DoAsUserMessage : IUserMessage return _msg.CrosspostAsync(options); } - public string Resolve(TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name, + public string Resolve( + TagHandling userHandling = TagHandling.Name, + TagHandling channelHandling = TagHandling.Name, TagHandling roleHandling = TagHandling.Name, - TagHandling everyoneHandling = TagHandling.Ignore, TagHandling emojiHandling = TagHandling.Name) + TagHandling everyoneHandling = TagHandling.Ignore, + TagHandling emojiHandling = TagHandling.Name) { return _msg.Resolve(userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling); } - public MessageResolvedData ResolvedData => _msg.ResolvedData; + public Task EndPollAsync(RequestOptions options) + => _msg.EndPollAsync(options); - public IUserMessage ReferencedMessage => _msg.ReferencedMessage; + public IAsyncEnumerable> GetPollAnswerVotersAsync( + uint answerId, + int? limit = null, + ulong? afterId = null, + RequestOptions? options = null) + => _msg.GetPollAnswerVotersAsync( + answerId, + limit, + afterId, + options); + + public MessageResolvedData ResolvedData + => _msg.ResolvedData; + + public IUserMessage ReferencedMessage + => _msg.ReferencedMessage; public IMessageInteractionMetadata InteractionMetadata => _msg.InteractionMetadata; + + public Poll? Poll + => _msg.Poll; } \ No newline at end of file -- 2.43.0 From 9f46eaf5a7efe4ff3d4714a3f067e8a26f750269 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 2 Aug 2024 12:15:49 +1200 Subject: [PATCH 063/253] Updated Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e842b1f..ef42ae1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## Unreleased +## [5.1.5] - 01.08.2024 ### Added -- 2.43.0 From a2381ff90256c0f220dd2d4dd94b9343797811fa Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 3 Aug 2024 02:12:58 +1200 Subject: [PATCH 064/253] Updated CHANGELOG --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef42ae1..f85c669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,22 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - The specified message will be prefixed with "The user is afk: " - The afk message will disappear 30 seconds after being triggered +### Changed + +- Bot now shows a message when 'prune fails due to already running error +- Updated some bet descriptions to include 'all' 'half' usage instructions +- Updated some command strings +- dev: Vastly simplified marmalade creation using dotnet templates, docs updated +- Slight refactor of 'wiki, 'time, 'catfact, 'wikia, 'define, 'bible and 'quran commands, no significant change in functionality + +### Fixed + +- 'coins will no longer show double minus sign for negative changes +- You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands + +### Removed +- Removed .rip command + ## [5.1.4] - 15.07.2024 ### Added -- 2.43.0 From 500cb95208a56bf99a6d35c9f6fd4d7ffcdf47a2 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 3 Aug 2024 17:27:51 +1200 Subject: [PATCH 065/253] Updated CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f85c669..2816440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands ### Removed -- Removed .rip command +- Removed 'rip command ## [5.1.4] - 15.07.2024 -- 2.43.0 From 3f7e5d5054623e9093dda07c47ba06af671dcdee Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 5 Aug 2024 14:04:18 +1200 Subject: [PATCH 066/253] Possible fix for a broken timestamp tag in remind list --- src/EllieBot/Modules/Utility/Remind/RemindCommands.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs index 67b87af..a9eda9e 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs @@ -95,8 +95,8 @@ public partial class Utility return; var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list)); + .WithOkColor() + .WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list)); List rems; await using (var uow = _db.GetDbContext()) @@ -114,10 +114,9 @@ public partial class Utility { var when = rem.When; embed.AddField( - $"#{++i + (page * 10)} {rem.When:HH:mm yyyy-MM-dd} UTC " - + $"{TimestampTag.FromDateTime(when)}", - $@"`Target:` {(rem.IsPrivate ? "DM" : "Channel")} -`TargetId:` {rem.ChannelId} + $"#{++i + (page * 10)}", + $@"`When:` {TimestampTag.FromDateTime(when, TimestampTagStyles.ShortDateTime)} +`Target:` {(rem.IsPrivate ? "DM" : "Channel")} [`{rem.ChannelId}`] `Message:` {rem.Message?.TrimTo(50)}"); } } -- 2.43.0 From 82f82d0fb6bf5b8170e495595ae1aded0e66f44d Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 5 Aug 2024 21:34:29 +1200 Subject: [PATCH 067/253] Added a space to CHANGELOG.md and added .gitlab-ci.yml --- .gitlab-ci.yml | 139 +++++++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 140 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8f1cb78 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,139 @@ +image: mcr.microsoft.com/dotnet/sdk:8.0 + +stages: + - build + - test + - build-installer + - upload-builds + - release + - publish-marmalade-package + +variables: + project: EllieBot + test: "EllieBot.Tests" + LINUX_X64_OUTPUT_DIR: "elliebot-linux-x64" + LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar" + LINUX_ARM64_OUTPUT_DIR: "elliebot-linux-arm64" + LINUX_ARM64_RELEASE: "$CI_COMMIT_TAG-linux-arm64-build.tar" + MACOS_X64_OUTPUT_DIR: "elliebot-osx-x64" + MACOS_X64_RELEASE: "$CI_COMMIT_TAG-osx-x64-build.tar" + MACOS_ARM64_OUTPUT_DIR: "elliebot-osx-arm64" + MACOS_ARM64_RELEASE: "$CI_COMMIT_TAG-osx-arm64-build.tar" + WIN_X64_OUTPUT_DIR: "elliebot-windows-x64" + WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip" + WIN_ARM64_OUTPUT_DIR: "elliebot-windows-arm64" + WIN_ARM64_RELEASE: "$CI_COMMIT_TAG-windows-arm64-build.zip" + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/EllieBot-build/${CI_COMMIT_TAG}" + INSTALLER_OUTPUT_DIR: "ellie-installers/${CI_COMMIT_TAG}" + INSTALLER_FILE_NAME: "ellie-setup-${CI_COMMIT_TAG}.exe" + +build: + stage: build + script: + - | + VERSION_STRING="" + if [ -n "$CI_COMMIT_TAG" ]; then + VERSION_STRING="-p:Version=$CI_COMMIT_TAG" + fi + - "dotnet publish -c Release -r linux-x64 --self-contained $VERSION_STRING -o $LINUX_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + - "dotnet publish -c Release -r linux-arm64 --self-contained $VERSION_STRING -o $LINUX_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + - "dotnet publish -c Release -r win-x64 --self-contained $VERSION_STRING -o $WIN_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + - "dotnet publish -c Release -r win-arm64 --self-contained $VERSION_STRING -o $WIN_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + - "dotnet publish -c Release -r osx-x64 --self-contained $VERSION_STRING -o $MACOS_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + - "dotnet publish -c Release -r osx-arm64 --self-contained $VERSION_STRING -o $MACOS_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" + artifacts: + paths: + - "$LINUX_X64_OUTPUT_DIR/" + - "$LINUX_ARM64_OUTPUT_DIR/" + - "$WIN_X64_OUTPUT_DIR/" + - "$WIN_ARM64_OUTPUT_DIR/" + - "$MACOS_X64_OUTPUT_DIR/" + - "$MACOS_ARM64_OUTPUT_DIR/" + +upload-builds: + stage: upload-builds + image: alpine:latest + rules: + - if: $CI_COMMIT_TAG + script: + - apk add --no-cache curl tar zip + - "tar cvf $LINUX_X64_RELEASE $LINUX_X64_OUTPUT_DIR/*" + - "tar cvf $LINUX_ARM64_RELEASE $LINUX_ARM64_OUTPUT_DIR/*" + - "tar cvf $MACOS_X64_RELEASE $MACOS_X64_OUTPUT_DIR/*" + - "tar cvf $MACOS_ARM64_RELEASE $MACOS_ARM64_OUTPUT_DIR/*" + - "zip -r $WIN_X64_RELEASE $WIN_X64_OUTPUT_DIR/*" + - "zip -r $WIN_ARM64_RELEASE $WIN_ARM64_OUTPUT_DIR/*" + - "mv $INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME $INSTALLER_FILE_NAME" + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_X64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_X64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_ARM64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_X64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_X64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_ARM64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_X64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_X64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_ARM64_RELEASE + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $INSTALLER_FILE_NAME $PACKAGE_REGISTRY_URL/$INSTALLER_FILE_NAME + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG + script: + - | + release-cli create --name "EllieBot v$CI_COMMIT_TAG" --description "## [Changelog](https://git.toastiet0ast.com/toastie/elliebot/-/blob/v5/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \ + --assets-link "{\"name\":\"${LINUX_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_X64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${LINUX_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${WIN_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_X64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${WIN_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_ARM64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${MACOS_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_X64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${MACOS_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_ARM64_RELEASE}\"}" \ + --assets-link "{\"name\":\"${INSTALLER_FILE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${INSTALLER_FILE_NAME}\"}" + +test: + stage: test + variables: + tests_path: "src/$tests" + script: + - "cd $tests_path" + - "dotnet test" + +build-installer: + stage: build-installer + rules: + - if: "$CI_COMMIT_TAG" + image: scottyhardy/docker-wine + before_script: + - choco install dotnet-runtime --version=8.0.4 -y + - choco install dotnet-sdk --version=8.0.204 -y + - choco install innosetup -y + artifacts: + paths: + - "$INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME" + script: + - dotnet clean + - dotnet restore -f --no-cache -v n + - dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=$CI_COMMIT_TAG src/EllieBot + - $env:ELLIEBOT_INSTALL_VERSION = $CI_COMMIT_TAG + - iscc.exe "/O+" ".\exe_builder.iss" + tags: + - saas-windows-medium-amd64 + +publish-medusa-package: + stage: publish-medusa-package + allow_failure: true + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG + script: + - LAST_TAG=$(git describe --tags --abbrev=0) + - if [ $CI_COMMIT_TAG ];then MARMALADE_VERSION="$CI_COMMIT_TAG"; else MARMALADE_VERSION="$LAST_TAG-alpha$CI_COMMIT_SHORT_SHA"; fi + - cd src/Ellie.Marmalade/ + - dotnet pack -c Release /p:Version=$MARMALADE_VERSION -o bin/Release/packed + - dotnet nuget push bin/Release/packed/ --source https://toastielab.dev/api/packages/ellie/nuget/index.json --api-key "$NUGET_API_KEY" diff --git a/CHANGELOG.md b/CHANGELOG.md index 2816440..f5b56fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands ### Removed + - Removed 'rip command ## [5.1.4] - 15.07.2024 -- 2.43.0 From 20a5d25eca2553403b60d475dd214f8af96ee7c4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 5 Aug 2024 21:45:08 +1200 Subject: [PATCH 068/253] Fixed .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f1cb78..36331c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,8 +124,8 @@ build-installer: tags: - saas-windows-medium-amd64 -publish-medusa-package: - stage: publish-medusa-package +publish-marmalade-package: + stage: publish-marmalade-package allow_failure: true rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' -- 2.43.0 From 7d0ef44e8e79e59806e1d2f1beb768f1a5117b6a Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 5 Aug 2024 22:52:58 +1200 Subject: [PATCH 069/253] Removed .gitlab-ci.yml --- .gitlab-ci.yml | 139 ------------------------------------------------- 1 file changed, 139 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 36331c5..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,139 +0,0 @@ -image: mcr.microsoft.com/dotnet/sdk:8.0 - -stages: - - build - - test - - build-installer - - upload-builds - - release - - publish-marmalade-package - -variables: - project: EllieBot - test: "EllieBot.Tests" - LINUX_X64_OUTPUT_DIR: "elliebot-linux-x64" - LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar" - LINUX_ARM64_OUTPUT_DIR: "elliebot-linux-arm64" - LINUX_ARM64_RELEASE: "$CI_COMMIT_TAG-linux-arm64-build.tar" - MACOS_X64_OUTPUT_DIR: "elliebot-osx-x64" - MACOS_X64_RELEASE: "$CI_COMMIT_TAG-osx-x64-build.tar" - MACOS_ARM64_OUTPUT_DIR: "elliebot-osx-arm64" - MACOS_ARM64_RELEASE: "$CI_COMMIT_TAG-osx-arm64-build.tar" - WIN_X64_OUTPUT_DIR: "elliebot-windows-x64" - WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip" - WIN_ARM64_OUTPUT_DIR: "elliebot-windows-arm64" - WIN_ARM64_RELEASE: "$CI_COMMIT_TAG-windows-arm64-build.zip" - PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/EllieBot-build/${CI_COMMIT_TAG}" - INSTALLER_OUTPUT_DIR: "ellie-installers/${CI_COMMIT_TAG}" - INSTALLER_FILE_NAME: "ellie-setup-${CI_COMMIT_TAG}.exe" - -build: - stage: build - script: - - | - VERSION_STRING="" - if [ -n "$CI_COMMIT_TAG" ]; then - VERSION_STRING="-p:Version=$CI_COMMIT_TAG" - fi - - "dotnet publish -c Release -r linux-x64 --self-contained $VERSION_STRING -o $LINUX_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - - "dotnet publish -c Release -r linux-arm64 --self-contained $VERSION_STRING -o $LINUX_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - - "dotnet publish -c Release -r win-x64 --self-contained $VERSION_STRING -o $WIN_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - - "dotnet publish -c Release -r win-arm64 --self-contained $VERSION_STRING -o $WIN_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - - "dotnet publish -c Release -r osx-x64 --self-contained $VERSION_STRING -o $MACOS_X64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - - "dotnet publish -c Release -r osx-arm64 --self-contained $VERSION_STRING -o $MACOS_ARM64_OUTPUT_DIR src/EllieBot/EllieBot.csproj" - artifacts: - paths: - - "$LINUX_X64_OUTPUT_DIR/" - - "$LINUX_ARM64_OUTPUT_DIR/" - - "$WIN_X64_OUTPUT_DIR/" - - "$WIN_ARM64_OUTPUT_DIR/" - - "$MACOS_X64_OUTPUT_DIR/" - - "$MACOS_ARM64_OUTPUT_DIR/" - -upload-builds: - stage: upload-builds - image: alpine:latest - rules: - - if: $CI_COMMIT_TAG - script: - - apk add --no-cache curl tar zip - - "tar cvf $LINUX_X64_RELEASE $LINUX_X64_OUTPUT_DIR/*" - - "tar cvf $LINUX_ARM64_RELEASE $LINUX_ARM64_OUTPUT_DIR/*" - - "tar cvf $MACOS_X64_RELEASE $MACOS_X64_OUTPUT_DIR/*" - - "tar cvf $MACOS_ARM64_RELEASE $MACOS_ARM64_OUTPUT_DIR/*" - - "zip -r $WIN_X64_RELEASE $WIN_X64_OUTPUT_DIR/*" - - "zip -r $WIN_ARM64_RELEASE $WIN_ARM64_OUTPUT_DIR/*" - - "mv $INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME $INSTALLER_FILE_NAME" - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_X64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_X64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_ARM64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_X64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_X64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_ARM64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_X64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_X64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_ARM64_RELEASE - - | - curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $INSTALLER_FILE_NAME $PACKAGE_REGISTRY_URL/$INSTALLER_FILE_NAME - -release: - stage: release - image: registry.gitlab.com/gitlab-org/release-cli:latest - rules: - - if: $CI_COMMIT_TAG - script: - - | - release-cli create --name "EllieBot v$CI_COMMIT_TAG" --description "## [Changelog](https://git.toastiet0ast.com/toastie/elliebot/-/blob/v5/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \ - --assets-link "{\"name\":\"${LINUX_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_X64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${LINUX_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${WIN_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_X64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${WIN_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_ARM64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${MACOS_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_X64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${MACOS_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_ARM64_RELEASE}\"}" \ - --assets-link "{\"name\":\"${INSTALLER_FILE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${INSTALLER_FILE_NAME}\"}" - -test: - stage: test - variables: - tests_path: "src/$tests" - script: - - "cd $tests_path" - - "dotnet test" - -build-installer: - stage: build-installer - rules: - - if: "$CI_COMMIT_TAG" - image: scottyhardy/docker-wine - before_script: - - choco install dotnet-runtime --version=8.0.4 -y - - choco install dotnet-sdk --version=8.0.204 -y - - choco install innosetup -y - artifacts: - paths: - - "$INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME" - script: - - dotnet clean - - dotnet restore -f --no-cache -v n - - dotnet publish -c Release --self-contained --runtime win-x64 /p:Version=$CI_COMMIT_TAG src/EllieBot - - $env:ELLIEBOT_INSTALL_VERSION = $CI_COMMIT_TAG - - iscc.exe "/O+" ".\exe_builder.iss" - tags: - - saas-windows-medium-amd64 - -publish-marmalade-package: - stage: publish-marmalade-package - allow_failure: true - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: never - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG - script: - - LAST_TAG=$(git describe --tags --abbrev=0) - - if [ $CI_COMMIT_TAG ];then MARMALADE_VERSION="$CI_COMMIT_TAG"; else MARMALADE_VERSION="$LAST_TAG-alpha$CI_COMMIT_SHORT_SHA"; fi - - cd src/Ellie.Marmalade/ - - dotnet pack -c Release /p:Version=$MARMALADE_VERSION -o bin/Release/packed - - dotnet nuget push bin/Release/packed/ --source https://toastielab.dev/api/packages/ellie/nuget/index.json --api-key "$NUGET_API_KEY" -- 2.43.0 From 66560bb769439aeabe2958eda5f8c1ed40d4d9b2 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 6 Aug 2024 00:29:40 +1200 Subject: [PATCH 070/253] lmgtfy should now be properly shortened, small refactor of 'shorten command --- src/EllieBot/Modules/Searches/Searches.cs | 43 +++---------------- .../Modules/Searches/SearchesService.cs | 41 +++++++++++++++++- .../Modules/Searches/_common/ShortenData.cs | 10 +++++ 3 files changed, 57 insertions(+), 37 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/_common/ShortenData.cs diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 845e2ad..14b7e79 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -14,7 +14,6 @@ namespace EllieBot.Modules.Searches; public partial class Searches : EllieModule { - private static readonly ConcurrentDictionary _cachedShortenedLinks = new(); private readonly IBotCredentials _creds; private readonly IGoogleApiService _google; private readonly IHttpClientFactory _httpFactory; @@ -172,7 +171,8 @@ public partial class Searches : EllieModule if (!await ValidateQuery(smh)) return; - var shortenedUrl = await _google.ShortenUrl($"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"); + var link = $"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"; + var shortenedUrl = await _service.ShortenLink(link) ?? link; await Response().Confirm($"<{shortenedUrl}>").SendAsync(); } @@ -182,35 +182,12 @@ public partial class Searches : EllieModule if (!await ValidateQuery(query)) return; - query = query.Trim(); - if (!_cachedShortenedLinks.TryGetValue(query, out var shortLink)) + var shortLink = await _service.ShortenLink(query); + + if (shortLink is null) { - try - { - using var http = _httpFactory.CreateClient(); - using var req = new HttpRequestMessage(HttpMethod.Post, "https://goolnk.com/api/v1/shorten"); - var formData = new MultipartFormDataContent - { - { new StringContent(query), "url" } - }; - req.Content = formData; - - using var res = await http.SendAsync(req); - var content = await res.Content.ReadAsStringAsync(); - var data = JsonConvert.DeserializeObject(content); - - if (!string.IsNullOrWhiteSpace(data?.ResultUrl)) - _cachedShortenedLinks.TryAdd(query, data.ResultUrl); - else - return; - - shortLink = data.ResultUrl; - } - catch (Exception ex) - { - Log.Error(ex, "Error shortening a link: {Message}", ex.Message); - return; - } + await Response().Error(strs.error_occured).SendAsync(); + return; } await Response() @@ -487,10 +464,4 @@ public partial class Searches : EllieModule await Response().Error(strs.specify_search_params).SendAsync(); return false; } - - public class ShortenData - { - [JsonProperty("result_url")] - public string ResultUrl { get; set; } - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 3f01fc1..b8dd2e5 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -2,8 +2,8 @@ using EllieBot.Modules.Searches.Common; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System.Text.Json; using OneOf; +using System.Text.Json; namespace EllieBot.Modules.Searches.Services; @@ -30,6 +30,7 @@ public class SearchesService : IEService private readonly object _yomamaLock = new(); private int yomamaJokeIndex; + private readonly ConcurrentDictionary _cachedShortenedLinks = new(); public SearchesService( IGoogleApiService google, @@ -578,4 +579,42 @@ public class SearchesService : IEService return ErrorType.Unknown; } } + + public async Task ShortenLink(string query) + { + query = query.Trim(); + + if (_cachedShortenedLinks.TryGetValue(query, out var shortLink)) + return shortLink; + + try + { + using var http = _httpFactory.CreateClient(); + using var req = new HttpRequestMessage(HttpMethod.Post, "https://goolnk.com/api/v1/shorten"); + var formData = new MultipartFormDataContent + { + { new StringContent(query), "url" } + }; + req.Content = formData; + + using var res = await http.SendAsync(req); + var content = await res.Content.ReadAsStringAsync(); + var data = JsonConvert.DeserializeObject(content); + + if (!string.IsNullOrWhiteSpace(data?.ResultUrl)) + _cachedShortenedLinks.TryAdd(query, data.ResultUrl); + else + return query; + + shortLink = data.ResultUrl; + } + catch (Exception ex) + { + Log.Error(ex, "Error shortening a link: {Message}", ex.Message); + return null; + } + + return shortLink; + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/ShortenData.cs b/src/EllieBot/Modules/Searches/_common/ShortenData.cs new file mode 100644 index 0000000..b08435c --- /dev/null +++ b/src/EllieBot/Modules/Searches/_common/ShortenData.cs @@ -0,0 +1,10 @@ +#nullable disable +using Newtonsoft.Json; + +namespace EllieBot.Modules.Searches.Services; + +public class ShortenData +{ + [JsonProperty("result_url")] + public string ResultUrl { get; set; } +} \ No newline at end of file -- 2.43.0 From d428fc55327605c54253cc794ed5613f5ec71632 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 6 Aug 2024 21:53:28 +1200 Subject: [PATCH 071/253] Removed some unused code, no functional change --- src/EllieBot/Modules/Games/GamesService.cs | 33 +--------- src/EllieBot/Modules/Games/GirlRating.cs | 61 ------------------- src/EllieBot/Services/Impl/ImageCache.cs | 6 -- src/EllieBot/_common/ImageUrls.cs | 9 +-- .../_common/Services/Impl/IImageCache.cs | 2 - .../_common/Services/Impl/ImagesConfig.cs | 12 ++++ src/EllieBot/data/images.yml | 5 +- 7 files changed, 15 insertions(+), 113 deletions(-) delete mode 100644 src/EllieBot/Modules/Games/GirlRating.cs diff --git a/src/EllieBot/Modules/Games/GamesService.cs b/src/EllieBot/Modules/Games/GamesService.cs index 9f4f61b..1436285 100644 --- a/src/EllieBot/Modules/Games/GamesService.cs +++ b/src/EllieBot/Modules/Games/GamesService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.Extensions.Caching.Memory; -using EllieBot.Common.ModuleBehaviors; using EllieBot.Modules.Games.Common; using EllieBot.Modules.Games.Common.Acrophobia; using EllieBot.Modules.Games.Common.Nunchi; @@ -8,11 +7,10 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Games.Services; -public class GamesService : IEService, IReadyExecutor +public class GamesService : IEService { private const string TYPING_ARTICLES_PATH = "data/typing_articles3.json"; - public ConcurrentDictionary GirlRatings { get; } = new(); public IReadOnlyList EightBallResponses => _gamesConfig.Data.EightBallResponses; @@ -25,7 +23,6 @@ public class GamesService : IEService, IReadyExecutor public ConcurrentDictionary RunningContests { get; } = new(); public ConcurrentDictionary NunchiGames { get; } = new(); - public AsyncLazy Ratings { get; } private readonly GamesConfigService _gamesConfig; private readonly IHttpClientFactory _httpFactory; @@ -41,7 +38,6 @@ public class GamesService : IEService, IReadyExecutor SizeLimit = 500_000 }); - Ratings = new(GetRatingTexts); _rng = new EllieRandom(); try @@ -55,22 +51,6 @@ public class GamesService : IEService, IReadyExecutor } } - public async Task OnReadyAsync() - { - // reset rating once a day - using var timer = new PeriodicTimer(TimeSpan.FromDays(1)); - while (await timer.WaitForNextTickAsync()) - GirlRatings.Clear(); - } - - private async Task GetRatingTexts() - { - using var http = _httpFactory.CreateClient(); - var text = await http.GetStringAsync( - "https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/rategirl/rates.json"); - return JsonConvert.DeserializeObject(text); - } - public void AddTypingArticle(IUser user, string text) { TypingArticles.Add(new() @@ -104,15 +84,4 @@ public class GamesService : IEService, IReadyExecutor File.WriteAllText(TYPING_ARTICLES_PATH, JsonConvert.SerializeObject(articles)); return removed; } - - public class RatingTexts - { - public string Nog { get; set; } - public string Tra { get; set; } - public string Fun { get; set; } - public string Uni { get; set; } - public string Wif { get; set; } - public string Dat { get; set; } - public string Dan { get; set; } - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GirlRating.cs b/src/EllieBot/Modules/Games/GirlRating.cs deleted file mode 100644 index 4576216..0000000 --- a/src/EllieBot/Modules/Games/GirlRating.cs +++ /dev/null @@ -1,61 +0,0 @@ -#nullable disable -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Processing; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Games.Common; - -public class GirlRating -{ - public double Crazy { get; } - public double Hot { get; } - public int Roll { get; } - public string Advice { get; } - - public AsyncLazy Stream { get; } - private readonly IImageCache _images; - - public GirlRating( - IImageCache images, - double crazy, - double hot, - int roll, - string advice) - { - _images = images; - Crazy = crazy; - Hot = hot; - Roll = roll; - Advice = advice; // convenient to have it here, even though atm there are only few different ones. - - Stream = new(async () => - { - try - { - var bgBytes = await _images.GetRategirlBgAsync(); - using var img = Image.Load(bgBytes); - const int minx = 35; - const int miny = 385; - const int length = 345; - - var pointx = (int)(minx + (length * (Hot / 10))); - var pointy = (int)(miny - (length * ((Crazy - 4) / 6))); - - var dotBytes = await _images.GetRategirlDotAsync(); - using (var pointImg = Image.Load(dotBytes)) - { - img.Mutate(x => x.DrawImage(pointImg, new(pointx - 10, pointy - 10), new GraphicsOptions())); - } - - var imgStream = new MemoryStream(); - img.SaveAsPng(imgStream); - return imgStream; - } - catch (Exception ex) - { - Log.Warning(ex, "Error getting RateGirl image"); - return null; - } - }); - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/Impl/ImageCache.cs b/src/EllieBot/Services/Impl/ImageCache.cs index 4fc4e72..cf18590 100644 --- a/src/EllieBot/Services/Impl/ImageCache.cs +++ b/src/EllieBot/Services/Impl/ImageCache.cs @@ -60,12 +60,6 @@ public sealed class ImageCache : IImageCache, IEService public Task GetXpBackgroundImageAsync() => GetImageDataAsync(_ic.Data.Xp.Bg); - public Task GetRategirlBgAsync() - => GetImageDataAsync(_ic.Data.Rategirl.Matrix); - - public Task GetRategirlDotAsync() - => GetImageDataAsync(_ic.Data.Rategirl.Dot); - public Task GetDiceAsync(int num) => GetImageDataAsync(_ic.Data.Dice[num]); diff --git a/src/EllieBot/_common/ImageUrls.cs b/src/EllieBot/_common/ImageUrls.cs index 5dc9557..fa253a7 100644 --- a/src/EllieBot/_common/ImageUrls.cs +++ b/src/EllieBot/_common/ImageUrls.cs @@ -8,12 +8,11 @@ namespace EllieBot.Common; public partial class ImageUrls : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 4; + public int Version { get; set; } = 5; public CoinData Coins { get; set; } public Uri[] Currency { get; set; } public Uri[] Dice { get; set; } - public RategirlData Rategirl { get; set; } public XpData Xp { get; set; } public SlotData Slots { get; set; } @@ -30,12 +29,6 @@ public partial class ImageUrls : ICloneable public Uri[] Tails { get; set; } } - public class RategirlData - { - public Uri Matrix { get; set; } - public Uri Dot { get; set; } - } - public class XpData { public Uri Bg { get; set; } diff --git a/src/EllieBot/_common/Services/Impl/IImageCache.cs b/src/EllieBot/_common/Services/Impl/IImageCache.cs index 890eeea..5a7e01c 100644 --- a/src/EllieBot/_common/Services/Impl/IImageCache.cs +++ b/src/EllieBot/_common/Services/Impl/IImageCache.cs @@ -6,8 +6,6 @@ public interface IImageCache Task GetTailsImageAsync(); Task GetCurrencyImageAsync(); Task GetXpBackgroundImageAsync(); - Task GetRategirlBgAsync(); - Task GetRategirlDotAsync(); Task GetDiceAsync(int num); Task GetSlotEmojiAsync(int number); Task GetSlotBgAsync(); diff --git a/src/EllieBot/_common/Services/Impl/ImagesConfig.cs b/src/EllieBot/_common/Services/Impl/ImagesConfig.cs index 821d717..a730a94 100644 --- a/src/EllieBot/_common/Services/Impl/ImagesConfig.cs +++ b/src/EllieBot/_common/Services/Impl/ImagesConfig.cs @@ -15,5 +15,17 @@ public sealed class ImagesConfig : ConfigServiceBase public ImagesConfig(IConfigSeria serializer, IPubSub pubSub) : base(PATH, serializer, pubSub, _changeKey) { + Migrate(); + } + + private void Migrate() + { + if (data.Version < 5) + { + ModifyConfig(c => + { + c.Version = 5; + }); + } } } \ No newline at end of file diff --git a/src/EllieBot/data/images.yml b/src/EllieBot/data/images.yml index 73ea5e6..76d8da6 100644 --- a/src/EllieBot/data/images.yml +++ b/src/EllieBot/data/images.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 4 +version: 5 coins: heads: - https://cdn.nadeko.bot/coins/heads3.png @@ -20,9 +20,6 @@ dice: - https://cdn.nadeko.bot/other/dice/7.png - https://cdn.nadeko.bot/other/dice/8.png - https://cdn.nadeko.bot/other/dice/9.png -rategirl: - matrix: https://cdn.nadeko.bot/other/rategirl/matrix.png - dot: https://cdn.nadeko.bot/other/rategirl/dot.png xp: bg: https://cdn.nadeko.bot/other/xp/bg_k.png rip: -- 2.43.0 From fe7445eefb87d66d570a04a9cb5f73044b90172f Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 6 Aug 2024 22:33:22 +1200 Subject: [PATCH 072/253] removed unused usings, no functional change --- src/Ellie.Marmalade/Context/AnyContext.cs | 1 - .../Db/Models/anti/AntiRaidSetting.cs | 2 - src/EllieBot/Migrations/MigrationQueries.cs | 1 - .../Mysql/20220409170652_mysql-init.cs | 3 +- .../Migrations/Mysql/20220429044757_bank.cs | 3 +- .../Mysql/20220504162509_new-rero.cs | 3 +- .../Mysql/20220614071410_patronage-system.cs | 3 +- .../Mysql/20220623090718_stondel-db-cache.cs | 3 +- .../Mysql/20220725155953_xpitemshop.cs | 3 +- ...220808141855_remove-obsolete-xp-columns.cs | 3 +- .../Mysql/20220916194514_autopub.cs | 3 +- .../Mysql/20221003175743_gambling-stats.cs | 3 +- .../Migrations/Mysql/20240502233216_v5.cs | 3 +- .../20240518221440_guidlconfig-cleanup.cs | 3 +- .../PostgreSql/20220409170719_mysql-init.cs | 3 +- .../PostgreSql/20220429044808_bank.cs | 3 +- .../PostgreSql/20220504162457_new-rero.cs | 3 +- .../20220614071421_patronage-system.cs | 3 +- .../20220623090729_stondel-db-cache.cs | 3 +- .../PostgreSql/20220725155941_xpitemshop.cs | 3 +- ...220808142559_remove-obsolete-xp-columns.cs | 3 +- .../PostgreSql/20220916194523_autopub.cs | 3 +- .../20221003175752_gambling-stats.cs | 3 +- .../PostgreSql/20240502233202_v5.cs | 3 +- .../20240518221432_guidlconfig-cleanup.cs | 3 +- .../Sqlite/20210621042359_squash.cs | 3 +- .../Sqlite/20210707002343_cleanup.cs | 3 +- .../20210914180026_image-only-channels.cs | 3 +- .../20211015232708_nsfw-blacklist-tags.cs | 3 +- .../Sqlite/20211213145407_atl-rework.cs | 3 +- .../20220110105942_filter-settings-cleanup.cs | 3 +- .../Sqlite/20220409170828_clubs-refactor.cs | 3 +- .../Migrations/Sqlite/20220428051304_bank.cs | 3 +- .../Sqlite/20220503234243_new-rero.cs | 3 +- .../Sqlite/20220614071359_patronage-system.cs | 3 +- .../Sqlite/20220623073903_stondel-db-cache.cs | 3 +- .../Sqlite/20220725112348_xpitemshop.cs | 3 +- ...220808141842_remove-obsolete-xp-columns.cs | 3 +- .../Sqlite/20220916191702_autopub.cs | 3 +- .../Sqlite/20221003111019_gambling-stats.cs | 3 +- .../Migrations/Sqlite/20240502233144_v5.cs | 3 +- .../20240518221424_guidlconfig-cleanup.cs | 3 +- .../Administration/AdministrationService.cs | 1 - .../AutoAssignRoleService.cs | 1 - .../GameVoiceChannelService.cs | 2 - .../Administration/GreetBye/GreetService.cs | 1 - .../Administration/Mute/MuteService.cs | 1 - .../Protection/ProtectionService.cs | 1 - .../Role/IReactionRoleService.cs | 1 - .../Role/ReactionRolesService.cs | 1 - .../Administration/Role/StickyRolesService.cs | 1 - .../SelfAssignedRolesService.cs | 1 - .../ServerLog/ServerLogCommandService.cs | 1 - .../Timezone/GuildTimezoneService.cs | 1 - .../UserPunish/UserPunishService.cs | 1 - .../Administration/VcRole/VcRoleService.cs | 1 - .../Expressions/EllieExpressionsService.cs | 1 - .../Gambling/BlackJack/BlackJackCommands.cs | 1 - src/EllieBot/Modules/Gambling/Gambling.cs | 1 - .../Modules/Gambling/GamblingService.cs | 1 - .../Gambling/PlantPick/PlantPickService.cs | 1 - .../Modules/Gambling/Shop/ShopCommands.cs | 1 - .../Modules/Gambling/Shop/ShopService.cs | 1 - .../Modules/Gambling/Slot/SlotCommands.cs | 2 - .../Gambling/Waifus/WaifuClaimCommands.cs | 1 - .../Modules/Gambling/Waifus/WaifuService.cs | 2 - .../Gambling/_common/IGamblingService.cs | 1 - .../Gambling/_common/NewGamblingService.cs | 1 - .../BaseShmartInputAmountReader.cs | 1 - .../Games/ChatterBot/ChatterBotCommands.cs | 2 - .../{ThinkResponse.cs => ThinkResult.cs} | 2 - src/EllieBot/Modules/Music/Music.cs | 1 - .../Modules/Music/PlaylistCommands.cs | 1 - .../Modules/Music/Services/MusicService.cs | 3 +- .../Modules/Patronage/PatronageService.cs | 2 - .../CommandCooldown/CmdCdService.cs | 1 - .../CommandCooldown/CmdCdsCommands.cs | 1 - .../Permissions/Filter/FilterCommands.cs | 1 - .../Permissions/Filter/FilterService.cs | 1 - .../Modules/Permissions/Permissions.cs | 1 - .../Modules/Permissions/PermissionsService.cs | 1 - .../Modules/Searches/Crypto/CryptoService.cs | 2 - .../Crypto/DefaultStockDataService.cs | 1 - .../Modules/Searches/Feeds/FeedsService.cs | 1 - .../Searches/Religious/ReligiousApiService.cs | 3 +- .../StreamNotificationCommands.cs | 1 - .../StreamNotificationService.cs | 1 - .../Modules/Utility/Ai/UtilityCommands.cs | 4 +- .../Modules/Utility/Alias/AliasCommands.cs | 1 - .../Modules/Utility/Alias/AliasService.cs | 1 - .../Modules/Utility/Quote/QuoteCommands.cs | 1 - .../Modules/Utility/Remind/RemindCommands.cs | 1 - .../Utility/StreamRole/StreamRoleService.cs | 1 - src/EllieBot/Modules/Utility/Utility.cs | 2 - .../Modules/Utility/VerboseErrorsService.cs | 2 - src/EllieBot/Modules/Xp/Club/Club.cs | 1 - src/EllieBot/Modules/Xp/Club/ClubService.cs | 1 - src/EllieBot/Modules/Xp/Xp.cs | 1 - src/EllieBot/Modules/Xp/XpService.cs | 63 +++++++++---------- .../Modules/Xp/_common/FullUserStats.cs | 1 - .../Services/Impl/BotCredsProvider.cs | 1 - src/EllieBot/Services/Impl/Localization.cs | 1 - .../Attributes/NoPublicBotAttribute.cs | 2 - .../Common/Models/CanaryCommandData.cs | 3 +- .../_common/Patronage/IPatronageService.cs | 5 +- src/EllieBot/_common/Patronage/QuotaLimit.cs | 4 +- .../_common/Sender/MessageSenderService.cs | 1 - .../_common/Sender/ResponseBuilder.cs | 4 +- .../_common/Services/CommandHandler.cs | 1 - .../Services/Currency/CurrencyService.cs | 1 - .../_common/_Extensions/DbExtensions.cs | 1 - .../_common/_Extensions/Extensions.cs | 1 - 112 files changed, 77 insertions(+), 205 deletions(-) rename src/EllieBot/Modules/Games/ChatterBot/_common/{ThinkResponse.cs => ThinkResult.cs} (90%) diff --git a/src/Ellie.Marmalade/Context/AnyContext.cs b/src/Ellie.Marmalade/Context/AnyContext.cs index 4f7207c..5af3930 100644 --- a/src/Ellie.Marmalade/Context/AnyContext.cs +++ b/src/Ellie.Marmalade/Context/AnyContext.cs @@ -1,5 +1,4 @@ using Discord; -using EllieBot; namespace EllieBot.Marmalade; diff --git a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs index b5e5f67..1e219eb 100644 --- a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs +++ b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs @@ -1,6 +1,4 @@ #nullable disable -using System.ComponentModel.DataAnnotations.Schema; - namespace EllieBot.Db.Models; diff --git a/src/EllieBot/Migrations/MigrationQueries.cs b/src/EllieBot/Migrations/MigrationQueries.cs index 8265ebb..3cd32d2 100644 --- a/src/EllieBot/Migrations/MigrationQueries.cs +++ b/src/EllieBot/Migrations/MigrationQueries.cs @@ -1,6 +1,5 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Migrations; -using EllieBot.Db.Models; namespace EllieBot.Migrations; diff --git a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs index cdf1904..b857ff5 100644 --- a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs +++ b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs b/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs index 73e42f7..3fe3ee6 100644 --- a/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs +++ b/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs index e94af0b..9090ab2 100644 --- a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs +++ b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs index af53bf5..eb04272 100644 --- a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs +++ b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs index 1546ea1..b3e2d00 100644 --- a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs +++ b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs index e876590..be9530f 100644 --- a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs +++ b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs index dedceb3..96daeaf 100644 --- a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs +++ b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs index 16a0ed2..b3f24dc 100644 --- a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs +++ b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs index bb53a5e..351ed01 100644 --- a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs +++ b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs b/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs index 4ed5d52..24234b4 100644 --- a/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs +++ b/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs index 89c098d..b76512c 100644 --- a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs +++ b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs index 47fedf6..3e0cbc0 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs index 6d5cc67..4f0a4a5 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs index 237a0d8..7185c09 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs index f8bb7b9..b8fcc2c 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs index 9cb7187..eed96a7 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs index 073f682..258dc4c 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs index 4cd146c..64f3334 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs index 9718e60..35ace3c 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs index 81dbd5b..88c4b12 100644 --- a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs +++ b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs index d3629d8..943e959 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs index b22df63..a6a4994 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs index c54a634..4273df4 100644 --- a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs +++ b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs index b9cea6d..1d2dc92 100644 --- a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs index 3e1ca4a..5dfbf73 100644 --- a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs +++ b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs index b1f5b4f..760e27f 100644 --- a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs +++ b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs index c602c24..bb7df2b 100644 --- a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs +++ b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs index f247be4..0920046 100644 --- a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs index 3c863ab..1dc81f7 100644 --- a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs +++ b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs index 3ac27ac..b3efa7e 100644 --- a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs +++ b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs index acb4e12..dce2e4b 100644 --- a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs +++ b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs index b752b3c..fd1100f 100644 --- a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs +++ b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs index 06eb71d..efce911 100644 --- a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs +++ b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs index 84d2b74..ef8d9c4 100644 --- a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs +++ b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs index c26f711..8ef5757 100644 --- a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs +++ b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs index d974254..f3d98db 100644 --- a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs +++ b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs index cdff8c1..6ebf812 100644 --- a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs +++ b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs index c6f46b5..da4fdd7 100644 --- a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs +++ b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs index cc33c61..33418e2 100644 --- a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Modules/Administration/AdministrationService.cs b/src/EllieBot/Modules/Administration/AdministrationService.cs index de037bd..b1bec59 100644 --- a/src/EllieBot/Modules/Administration/AdministrationService.cs +++ b/src/EllieBot/Modules/Administration/AdministrationService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Administration._common.results; diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs index f373d45..5e232f8 100644 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs +++ b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs @@ -4,7 +4,6 @@ using System.Net; using System.Threading.Channels; using LinqToDB; using Microsoft.EntityFrameworkCore; -using EllieBot.Db; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs index 54f9870..e83e5a3 100644 --- a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs +++ b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs @@ -1,6 +1,4 @@ #nullable disable -using EllieBot.Db; - namespace EllieBot.Modules.Administration.Services; public class GameVoiceChannelService : IEService diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index 1511913..277c242 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -1,5 +1,4 @@ using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using System.Threading.Channels; diff --git a/src/EllieBot/Modules/Administration/Mute/MuteService.cs b/src/EllieBot/Modules/Administration/Mute/MuteService.cs index a3fbea3..a67610d 100644 --- a/src/EllieBot/Modules/Administration/Mute/MuteService.cs +++ b/src/EllieBot/Modules/Administration/Mute/MuteService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs index c28d3c4..c72a941 100644 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs +++ b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; using System.Threading.Channels; diff --git a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs b/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs index 771ceb0..1f2911d 100644 --- a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs +++ b/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Modules.Patronage; using EllieBot.Db.Models; using OneOf; using OneOf.Types; diff --git a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs b/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs index cf36457..caa3e19 100644 --- a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs +++ b/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs @@ -2,7 +2,6 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Modules.Patronage; using EllieBot.Db.Models; using OneOf.Types; diff --git a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs b/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs index 1fcfc15..ede5b63 100644 --- a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs +++ b/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs @@ -3,7 +3,6 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Db.Models; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; namespace EllieBot.Modules.Administration; diff --git a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs index 1305835..505f56c 100644 --- a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs +++ b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs index 6ea5345..3b6cd3e 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Modules.Administration.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs b/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs index e1f2fea..f36d7af 100644 --- a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs +++ b/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Common.ModuleBehaviors; diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index 9ab0b73..a42a9f1 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -4,7 +4,6 @@ using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Common.TypeReaders.Models; -using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; using Newtonsoft.Json; diff --git a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs b/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs index c2dc60b..0ba9feb 100644 --- a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs +++ b/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs b/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs index 250c517..a660b4d 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs @@ -2,7 +2,6 @@ using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Common.Yml; -using EllieBot.Db; using EllieBot.Db.Models; using System.Runtime.CompilerServices; using LinqToDB.EntityFrameworkCore; diff --git a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs index ea9c8b8..772cb4f 100644 --- a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs +++ b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs @@ -3,7 +3,6 @@ using EllieBot.Common.TypeReaders; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Blackjack; using EllieBot.Modules.Gambling.Services; -using EllieBot.Modules.Utility; namespace EllieBot.Modules.Gambling; diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs index 52789d0..53cb07e 100644 --- a/src/EllieBot/Modules/Gambling/Gambling.cs +++ b/src/EllieBot/Modules/Gambling/Gambling.cs @@ -13,7 +13,6 @@ using System.Text; using EllieBot.Modules.Gambling.Rps; using EllieBot.Common.TypeReaders; using EllieBot.Modules.Patronage; -using EllieBot.Modules.Utility; namespace EllieBot.Modules.Gambling; diff --git a/src/EllieBot/Modules/Gambling/GamblingService.cs b/src/EllieBot/Modules/Gambling/GamblingService.cs index a324437..e7ed369 100644 --- a/src/EllieBot/Modules/Gambling/GamblingService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingService.cs @@ -2,7 +2,6 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Connect4; diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs index 6b50a1e..3fac5ba 100644 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs +++ b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using SixLabors.Fonts; using SixLabors.ImageSharp; diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs b/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs index a7910de..2d0749e 100644 --- a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs +++ b/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs b/src/EllieBot/Modules/Gambling/Shop/ShopService.cs index dfe944a..9e46aa0 100644 --- a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs +++ b/src/EllieBot/Modules/Gambling/Shop/ShopService.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Gambling.Services; diff --git a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs index 979cbae..b925cd8 100644 --- a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs @@ -7,9 +7,7 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; -using EllieBot.Modules.Gambling; using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Utility; using Color = SixLabors.ImageSharp.Color; using Image = SixLabors.ImageSharp.Image; diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index 19b1dc5..3730ded 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -3,7 +3,6 @@ using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; -using TwitchLib.Api.Helix.Models.Teams; namespace EllieBot.Modules.Gambling; diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs index ab5e021..502a260 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs @@ -3,11 +3,9 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; -using SixLabors.ImageSharp; namespace EllieBot.Modules.Gambling.Services; diff --git a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs index 4ed31c9..77cc2d7 100644 --- a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs +++ b/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Modules.Gambling; using EllieBot.Modules.Gambling.Betdraw; using EllieBot.Modules.Gambling.Rps; using OneOf; diff --git a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs index 2412503..85fa703 100644 --- a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs +++ b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Modules.Gambling; using EllieBot.Modules.Gambling.Betdraw; using EllieBot.Modules.Gambling.Rps; using EllieBot.Modules.Gambling.Services; diff --git a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs b/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs index 42c6f09..6773b78 100644 --- a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs +++ b/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Services; using NCalc; diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs index 7f7f2cb..ea902c2 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs @@ -1,7 +1,5 @@ #nullable disable -using EllieBot.Db; using EllieBot.Modules.Games.Services; -using EllieBot.Db.Models; namespace EllieBot.Modules.Games; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs similarity index 90% rename from src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs rename to src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs index a5b0b5f..d6aa75e 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs @@ -1,6 +1,4 @@ #nullable disable -using System.CodeDom; - namespace EllieBot.Modules.Games.Common.ChatterBot; public sealed class ThinkResult diff --git a/src/EllieBot/Modules/Music/Music.cs b/src/EllieBot/Modules/Music/Music.cs index a36c440..3b1393c 100644 --- a/src/EllieBot/Modules/Music/Music.cs +++ b/src/EllieBot/Modules/Music/Music.cs @@ -1,7 +1,6 @@ #nullable disable using EllieBot.Modules.Music.Services; using EllieBot.Db.Models; -using EllieBot.Modules.Utility; namespace EllieBot.Modules.Music; diff --git a/src/EllieBot/Modules/Music/PlaylistCommands.cs b/src/EllieBot/Modules/Music/PlaylistCommands.cs index 259bb9e..0e4137b 100644 --- a/src/EllieBot/Modules/Music/PlaylistCommands.cs +++ b/src/EllieBot/Modules/Music/PlaylistCommands.cs @@ -1,6 +1,5 @@ #nullable disable using LinqToDB; -using EllieBot.Db; using EllieBot.Modules.Music.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Music/Services/MusicService.cs b/src/EllieBot/Modules/Music/Services/MusicService.cs index c92d8de..8495211 100644 --- a/src/EllieBot/Modules/Music/Services/MusicService.cs +++ b/src/EllieBot/Modules/Music/Services/MusicService.cs @@ -1,5 +1,4 @@ -using EllieBot.Db; -using EllieBot.Db.Models; +using EllieBot.Db.Models; using System.Diagnostics.CodeAnalysis; namespace EllieBot.Modules.Music.Services; diff --git a/src/EllieBot/Modules/Patronage/PatronageService.cs b/src/EllieBot/Modules/Patronage/PatronageService.cs index e6d7899..ff0ced6 100644 --- a/src/EllieBot/Modules/Patronage/PatronageService.cs +++ b/src/EllieBot/Modules/Patronage/PatronageService.cs @@ -2,8 +2,6 @@ using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; -using StackExchange.Redis; -using System.Diagnostics; namespace EllieBot.Modules.Patronage; diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs index 9f5c6e2..55eb64d 100644 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs +++ b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs @@ -1,6 +1,5 @@ using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; namespace EllieBot.Modules.Permissions.Services; diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs index e2c1427..a9b7a13 100644 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs +++ b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.TypeReaders; -using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs b/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs index cdd3cad..fab1a11 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs index 139d0d5..dd5fbc0 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Permissions.Services; diff --git a/src/EllieBot/Modules/Permissions/Permissions.cs b/src/EllieBot/Modules/Permissions/Permissions.cs index 447dd19..5fb6fb2 100644 --- a/src/EllieBot/Modules/Permissions/Permissions.cs +++ b/src/EllieBot/Modules/Permissions/Permissions.cs @@ -1,7 +1,6 @@ #nullable disable using EllieBot.Common.TypeReaders; using EllieBot.Common.TypeReaders.Models; -using EllieBot.Db; using EllieBot.Modules.Permissions.Common; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/PermissionsService.cs b/src/EllieBot/Modules/Permissions/PermissionsService.cs index 95b6388..e0ac658 100644 --- a/src/EllieBot/Modules/Permissions/PermissionsService.cs +++ b/src/EllieBot/Modules/Permissions/PermissionsService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Modules.Permissions.Common; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index 59463fa..f5271d6 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -4,13 +4,11 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; -using System.Collections.ObjectModel; using System.Globalization; using System.Net.Http.Json; using System.Text.Json.Serialization; using System.Xml; using Color = SixLabors.ImageSharp.Color; -using StringExtensions = EllieBot.Extensions.StringExtensions; namespace EllieBot.Modules.Searches.Services; diff --git a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs b/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs index feb0548..9b000bd 100644 --- a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs @@ -1,7 +1,6 @@ using AngleSharp; using CsvHelper; using CsvHelper.Configuration; -using System.Diagnostics; using System.Globalization; using System.Text.Json; diff --git a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs b/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs index 43ad71f..d08ec0a 100644 --- a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs +++ b/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs @@ -4,7 +4,6 @@ using CodeHollow.FeedReader.Feeds; using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Searches.Services; diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs index 07fbfa3..ccef2b8 100644 --- a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs +++ b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs @@ -1,5 +1,4 @@ -using EllieBot.Modules.Searches.Common; -using OneOf; +using OneOf; using OneOf.Types; using System.Net; using System.Net.Http.Json; diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs index 46f9ed6..0710956 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Searches.Services; diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs index c003366..5d40000 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Common.StreamNotifications; diff --git a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs index 52fe4d5..e4f3f04 100644 --- a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs +++ b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs @@ -1,6 +1,4 @@ -using EllieBot.Modules.Administration; - -namespace EllieBot.Modules.Utility; +namespace EllieBot.Modules.Utility; public partial class UtilityCommands { diff --git a/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs b/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs index 8fd9563..fd2e52f 100644 --- a/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs +++ b/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Modules.Utility.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Utility/Alias/AliasService.cs b/src/EllieBot/Modules/Utility/Alias/AliasService.cs index 6d47a23..876f155 100644 --- a/src/EllieBot/Modules/Utility/Alias/AliasService.cs +++ b/src/EllieBot/Modules/Utility/Alias/AliasService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Utility.Services; diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index 913781b..d0ff339 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -2,7 +2,6 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.Yml; -using EllieBot.Db; using EllieBot.Db.Models; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; diff --git a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs index a9eda9e..9667384 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Db; using EllieBot.Modules.Utility.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs b/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs index 4ded9d0..eee20a1 100644 --- a/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs +++ b/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs @@ -1,5 +1,4 @@ using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Modules.Utility.Common; using EllieBot.Modules.Utility.Common.Exceptions; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 7afa03e..d3e9c37 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -1,4 +1,3 @@ -using LinqToDB.Reflection; using EllieBot.Modules.Utility.Services; using Newtonsoft.Json; using System.Diagnostics; @@ -7,7 +6,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; -using EllieBot.Modules.Games.Hangman; using EllieBot.Modules.Searches.Common; namespace EllieBot.Modules.Utility; diff --git a/src/EllieBot/Modules/Utility/VerboseErrorsService.cs b/src/EllieBot/Modules/Utility/VerboseErrorsService.cs index c5cf886..e8e8c43 100644 --- a/src/EllieBot/Modules/Utility/VerboseErrorsService.cs +++ b/src/EllieBot/Modules/Utility/VerboseErrorsService.cs @@ -1,6 +1,4 @@ #nullable disable -using EllieBot.Db; - namespace EllieBot.Modules.Utility.Services; public class VerboseErrorsService : IEService diff --git a/src/EllieBot/Modules/Xp/Club/Club.cs b/src/EllieBot/Modules/Xp/Club/Club.cs index 9a84dc9..aff45be 100644 --- a/src/EllieBot/Modules/Xp/Club/Club.cs +++ b/src/EllieBot/Modules/Xp/Club/Club.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Xp.Services; diff --git a/src/EllieBot/Modules/Xp/Club/ClubService.cs b/src/EllieBot/Modules/Xp/Club/ClubService.cs index d35a05d..d143ff5 100644 --- a/src/EllieBot/Modules/Xp/Club/ClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/ClubService.cs @@ -2,7 +2,6 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; using OneOf; diff --git a/src/EllieBot/Modules/Xp/Xp.cs b/src/EllieBot/Modules/Xp/Xp.cs index 3892f65..63e59e3 100644 --- a/src/EllieBot/Modules/Xp/Xp.cs +++ b/src/EllieBot/Modules/Xp/Xp.cs @@ -2,7 +2,6 @@ using EllieBot.Modules.Xp.Services; using EllieBot.Db.Models; using EllieBot.Modules.Patronage; -using EllieBot.Modules.Utility; namespace EllieBot.Modules.Xp; diff --git a/src/EllieBot/Modules/Xp/XpService.cs b/src/EllieBot/Modules/Xp/XpService.cs index 6df1151..ea034a7 100644 --- a/src/EllieBot/Modules/Xp/XpService.cs +++ b/src/EllieBot/Modules/Xp/XpService.cs @@ -2,7 +2,6 @@ using LinqToDB; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using EllieBot.Db.Models; using Newtonsoft.Json; using SixLabors.Fonts; @@ -191,9 +190,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var items = await ctx.Set() .Where(x => group.Contains(x.UserId)) .UpdateWithOutputAsync(old => new() - { - TotalXp = old.TotalXp + group.Key - }, + { + TotalXp = old.TotalXp + group.Key + }, (_, n) => n); await ctx.Set() @@ -216,9 +215,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand .Where(x => x.GuildId == guildId) .Where(x => group.Contains(x.UserId)) .UpdateWithOutputAsync(old => new() - { - Xp = old.Xp + group.Key - }, + { + Xp = old.Xp + group.Key + }, (_, n) => n); gxps.AddRange(items); @@ -230,14 +229,14 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand .Set() .ToLinqToDBTable() .InsertOrUpdateAsync(() => new UserXpStats() - { - UserId = userId, - GuildId = guildId, - Xp = group.Key, - DateAdded = DateTime.UtcNow, - AwardedXp = 0, - NotifyOnLevelUp = XpNotificationLocation.None - }, + { + UserId = userId, + GuildId = guildId, + Xp = group.Key, + DateAdded = DateTime.UtcNow, + AwardedXp = 0, + NotifyOnLevelUp = XpNotificationLocation.None + }, _ => new() { }, @@ -770,8 +769,8 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand private bool ShouldTrackXp(SocketGuildUser user, IMessageChannel channel) { var channelId = channel.Id; - - if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && (chans.Contains(channelId) + + if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && (chans.Contains(channelId) || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) return false; @@ -1010,12 +1009,12 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand img.Mutate(x => { x.DrawText(new TextOptions(usernameFont) - { - HorizontalAlignment = HorizontalAlignment.Left, - VerticalAlignment = VerticalAlignment.Center, - FallbackFontFamilies = _fonts.FallBackFonts, - Origin = new(template.User.Name.Pos.X, template.User.Name.Pos.Y + 8) - }, + { + HorizontalAlignment = HorizontalAlignment.Left, + VerticalAlignment = VerticalAlignment.Center, + FallbackFontFamilies = _fonts.FallBackFonts, + Origin = new(template.User.Name.Pos.X, template.User.Name.Pos.Y + 8) + }, "@" + username, Brushes.Solid(template.User.Name.Color), outlinePen); @@ -1031,12 +1030,12 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var clubFont = _fonts.NotoSans.CreateFont(template.Club.Name.FontSize, FontStyle.Regular); img.Mutate(x => x.DrawText(new TextOptions(clubFont) - { - HorizontalAlignment = HorizontalAlignment.Right, - VerticalAlignment = VerticalAlignment.Top, - FallbackFontFamilies = _fonts.FallBackFonts, - Origin = new(template.Club.Name.Pos.X + 50, template.Club.Name.Pos.Y - 8) - }, + { + HorizontalAlignment = HorizontalAlignment.Right, + VerticalAlignment = VerticalAlignment.Top, + FallbackFontFamilies = _fonts.FallBackFonts, + Origin = new(template.Club.Name.Pos.X + 50, template.Club.Name.Pos.Y - 8) + }, clubName, Brushes.Solid(template.Club.Name.Color), outlinePen)); @@ -1248,9 +1247,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.Club.Icon.Show) await DrawClubImage(img, stats); -// #if GLOBAL_ELLIE + // #if GLOBAL_ELLIE await DrawFrame(img, stats.User.UserId); -// #endif + // #endif var outputSize = template.OutputSize; if (outputSize.X != img.Width || outputSize.Y != img.Height) @@ -1307,7 +1306,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (frame is not null) img.Mutate(x => x.DrawImage(frame, new Point(0, 0), new GraphicsOptions())); } -// #endif + // #endif private void DrawXpBar(float percent, XpBar info, Image img) { diff --git a/src/EllieBot/Modules/Xp/_common/FullUserStats.cs b/src/EllieBot/Modules/Xp/_common/FullUserStats.cs index de8b8da..d56a62e 100644 --- a/src/EllieBot/Modules/Xp/_common/FullUserStats.cs +++ b/src/EllieBot/Modules/Xp/_common/FullUserStats.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Xp; diff --git a/src/EllieBot/Services/Impl/BotCredsProvider.cs b/src/EllieBot/Services/Impl/BotCredsProvider.cs index 5c156db..81c5a25 100644 --- a/src/EllieBot/Services/Impl/BotCredsProvider.cs +++ b/src/EllieBot/Services/Impl/BotCredsProvider.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Primitives; using EllieBot.Common.Yml; -using Newtonsoft.Json; namespace EllieBot.Services; diff --git a/src/EllieBot/Services/Impl/Localization.cs b/src/EllieBot/Services/Impl/Localization.cs index 3c2cb5b..a1ff55d 100644 --- a/src/EllieBot/Services/Impl/Localization.cs +++ b/src/EllieBot/Services/Impl/Localization.cs @@ -1,5 +1,4 @@ #nullable disable -using EllieBot.Db; using Newtonsoft.Json; using System.Globalization; diff --git a/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs b/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs index 2ce8ccc..358265e 100644 --- a/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs +++ b/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs @@ -1,6 +1,4 @@ #nullable disable -using System.Diagnostics.CodeAnalysis; - namespace EllieBot.Common; [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] diff --git a/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs b/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs index 8244576..cc5ab35 100644 --- a/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs +++ b/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs @@ -1,5 +1,4 @@ -using EllieBot.Marmalade; -using System.Reflection; +using System.Reflection; namespace EllieBot.Marmalade; diff --git a/src/EllieBot/_common/Patronage/IPatronageService.cs b/src/EllieBot/_common/Patronage/IPatronageService.cs index 650bf06..379de6b 100644 --- a/src/EllieBot/_common/Patronage/IPatronageService.cs +++ b/src/EllieBot/_common/Patronage/IPatronageService.cs @@ -1,7 +1,4 @@ -using EllieBot.Db.Models; -using OneOf; - -namespace EllieBot.Modules.Patronage; +namespace EllieBot.Modules.Patronage; /// /// Manages patrons and provides access to their data diff --git a/src/EllieBot/_common/Patronage/QuotaLimit.cs b/src/EllieBot/_common/Patronage/QuotaLimit.cs index ed2cae9..5669c0c 100644 --- a/src/EllieBot/_common/Patronage/QuotaLimit.cs +++ b/src/EllieBot/_common/Patronage/QuotaLimit.cs @@ -1,6 +1,4 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Patronage; +namespace EllieBot.Modules.Patronage; /// /// Represents information about why the user has triggered a quota limit diff --git a/src/EllieBot/_common/Sender/MessageSenderService.cs b/src/EllieBot/_common/Sender/MessageSenderService.cs index f91f1ab..88f1c40 100644 --- a/src/EllieBot/_common/Sender/MessageSenderService.cs +++ b/src/EllieBot/_common/Sender/MessageSenderService.cs @@ -1,5 +1,4 @@ using EllieBot.Common.Configs; -using System.Diagnostics.CodeAnalysis; namespace EllieBot.Extensions; diff --git a/src/EllieBot/_common/Sender/ResponseBuilder.cs b/src/EllieBot/_common/Sender/ResponseBuilder.cs index 60783de..08d1ad3 100644 --- a/src/EllieBot/_common/Sender/ResponseBuilder.cs +++ b/src/EllieBot/_common/Sender/ResponseBuilder.cs @@ -1,6 +1,4 @@ -using EllieBot.Common.Configs; -using EllieBot.Db.Models; -using System.Collections.ObjectModel; +using System.Collections.ObjectModel; namespace EllieBot.Extensions; diff --git a/src/EllieBot/_common/Services/CommandHandler.cs b/src/EllieBot/_common/Services/CommandHandler.cs index 2061b29..b9b0721 100644 --- a/src/EllieBot/_common/Services/CommandHandler.cs +++ b/src/EllieBot/_common/Services/CommandHandler.cs @@ -1,7 +1,6 @@ #nullable disable using EllieBot.Common.Configs; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db; using ExecuteResult = Discord.Commands.ExecuteResult; using PreconditionResult = Discord.Commands.PreconditionResult; diff --git a/src/EllieBot/_common/Services/Currency/CurrencyService.cs b/src/EllieBot/_common/Services/Currency/CurrencyService.cs index 9cb4037..66029ff 100644 --- a/src/EllieBot/_common/Services/Currency/CurrencyService.cs +++ b/src/EllieBot/_common/Services/Currency/CurrencyService.cs @@ -1,7 +1,6 @@ #nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Services.Currency; diff --git a/src/EllieBot/_common/_Extensions/DbExtensions.cs b/src/EllieBot/_common/_Extensions/DbExtensions.cs index 58a9abd..0975a1f 100644 --- a/src/EllieBot/_common/_Extensions/DbExtensions.cs +++ b/src/EllieBot/_common/_Extensions/DbExtensions.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Extensions; diff --git a/src/EllieBot/_common/_Extensions/Extensions.cs b/src/EllieBot/_common/_Extensions/Extensions.cs index 33aa564..dca195d 100644 --- a/src/EllieBot/_common/_Extensions/Extensions.cs +++ b/src/EllieBot/_common/_Extensions/Extensions.cs @@ -1,4 +1,3 @@ -using System.Diagnostics; using System.Globalization; using System.Text.Json; using System.Text.RegularExpressions; -- 2.43.0 From 7399e8bac14d5fb1653bcd3c6149641bd9a1acbd Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 6 Aug 2024 22:38:09 +1200 Subject: [PATCH 073/253] small cleanup in clubs --- src/EllieBot/Modules/Xp/Club/ClubService.cs | 11 +++++------ src/EllieBot/Modules/Xp/Club/IClubService.cs | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/EllieBot/Modules/Xp/Club/ClubService.cs b/src/EllieBot/Modules/Xp/Club/ClubService.cs index d143ff5..0c63913 100644 --- a/src/EllieBot/Modules/Xp/Club/ClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/ClubService.cs @@ -1,4 +1,3 @@ -#nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; @@ -99,9 +98,9 @@ public class ClubService : IEService, IClubService return member; } - public async Task SetClubIconAsync(ulong ownerUserId, string url) + public async Task SetClubIconAsync(ulong ownerUserId, string? url) { - if (url is not null) + if (!string.IsNullOrWhiteSpace(url)) { using var http = _httpFactory.CreateClient(); using var temp = await http.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); @@ -174,7 +173,7 @@ public class ClubService : IEService, IClubService } - public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) + public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -200,7 +199,7 @@ public class ClubService : IEService, IClubService return ClubAcceptResult.Accepted; } - public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) + public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -241,7 +240,7 @@ public class ClubService : IEService, IClubService return ClubLeaveResult.Success; } - public bool SetDescription(ulong userId, string desc) + public bool SetDescription(ulong userId, string? desc) { using var uow = _db.GetDbContext(); var club = uow.Set().GetByOwner(userId); diff --git a/src/EllieBot/Modules/Xp/Club/IClubService.cs b/src/EllieBot/Modules/Xp/Club/IClubService.cs index 8a45e8d..863d81f 100644 --- a/src/EllieBot/Modules/Xp/Club/IClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/IClubService.cs @@ -12,8 +12,6 @@ public interface IClubService Task SetClubIconAsync(ulong ownerUserId, string? url); bool GetClubByName(string clubName, out ClubInfo club); ClubApplyResult ApplyToClub(IUser user, ClubInfo club); - ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); - ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); ClubInfo? GetClubWithBansAndApplications(ulong ownerUserId); ClubLeaveResult LeaveClub(IUser user); bool SetDescription(ulong userId, string? desc); -- 2.43.0 From a6c2ec0511010f9ca50a015c10fe7263a3033884 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 6 Aug 2024 22:52:02 +1200 Subject: [PATCH 074/253] small cleanup --- src/EllieBot/Bot.cs | 2 +- .../Administration/Self/SelfCommands.cs | 2 +- .../Gambling/PlantPick/PlantPickService.cs | 2 -- .../Gambling/Waifus/WaifuClaimCommands.cs | 12 ++++--- .../Trivia/{Games.cs => TriviaCommands.cs} | 6 ++-- .../Modules/Games/Trivia/TriviaGame.cs | 23 +++++++++---- .../_common/Resolvers/RadioResolveStrategy.cs | 12 +++---- .../Modules/Patronage/PatronageService.cs | 33 ++++++++----------- .../Modules/Searches/Crypto/CryptoCommands.cs | 12 ------- .../Utility/Giveaway/GiveawayService.cs | 1 - ...ernelExtensions.cs => DryIocExtensions.cs} | 8 ----- .../Common/MarmaladeIoCKernelModule.cs | 2 +- 12 files changed, 49 insertions(+), 66 deletions(-) rename src/EllieBot/Modules/Games/Trivia/{Games.cs => TriviaCommands.cs} (98%) rename src/EllieBot/_common/{NinjectIKernelExtensions.cs => DryIocExtensions.cs} (80%) diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index 9ab0f92..a8c5fd3 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -114,7 +114,7 @@ public sealed class Bot : IBot // svcs.Components.Remove(); // svcs.Components.Add(); - svcs.AddSingleton(_ => _credsProvider.GetCreds()); + svcs.AddSingleton(_ => _credsProvider.GetCreds()); svcs.AddSingleton(_db); svcs.AddSingleton(_credsProvider); svcs.AddSingleton(Client); diff --git a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs index d67ac93..b8842cd 100644 --- a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs +++ b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs @@ -546,7 +546,7 @@ public partial class Administration text = await repSvc.ReplaceAsync(text, repCtx); await Response().Channel(ch).Text(text).SendAsync(); - await ctx.OkAsync();; + await ctx.OkAsync(); } [Cmd] diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs index 3fac5ba..bffd035 100644 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs +++ b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs @@ -31,7 +31,6 @@ public class PlantPickService : IEService, IExecNoCommand public PlantPickService( DbService db, - CommandHandler cmd, IBotStrings strings, IImageCache images, FontProvider fonts, @@ -107,7 +106,6 @@ public class PlantPickService : IEService, IExecNoCommand /// Get a random currency image stream, with an optional password sticked onto it. /// /// Optional password to add to top left corner. - /// Extension of the file, defaults to png /// Stream of the currency image public async Task<(Stream, string)> GetRandomCurrencyImageAsync(string pass) { diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index 3730ded..d488e72 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -3,6 +3,7 @@ using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; +using System.Globalization; namespace EllieBot.Modules.Gambling; @@ -152,12 +153,12 @@ public partial class Gambling await Response().Confirm(strs.waifu_divorced_notlike(N(amount))).SendAsync(); else if (result == DivorceResult.NotYourWife) await Response().Error(strs.waifu_not_yours).SendAsync(); - else + else if (remaining is { } rem) { await Response() .Error(strs.waifu_recent_divorce( - Format.Bold(((int)remaining?.TotalHours).ToString()), - Format.Bold(remaining?.Minutes.ToString()))) + Format.Bold(((int)rem.TotalHours).ToString()), + Format.Bold(rem.Minutes.ToString()))) .SendAsync(); } } @@ -237,7 +238,7 @@ public partial class Gambling private string GetLbString(WaifuLbResult w) { var claimer = "no one"; - var status = string.Empty; + string status; var waifuUsername = w.Username.TrimTo(20); var claimerUsername = w.Claimer?.TrimTo(20); @@ -376,7 +377,8 @@ public partial class Gambling if (sucess) { await Response() - .Confirm(strs.waifu_gift(Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), + .Confirm(strs.waifu_gift( + Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), Format.Bold(waifu.ToString()))) .SendAsync(); } diff --git a/src/EllieBot/Modules/Games/Trivia/Games.cs b/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs similarity index 98% rename from src/EllieBot/Modules/Games/Trivia/Games.cs rename to src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs index ff7ffbd..72b4eb4 100644 --- a/src/EllieBot/Modules/Games/Trivia/Games.cs +++ b/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs @@ -107,9 +107,9 @@ public partial class Games return sb.ToString(); } - private EmbedBuilder? questionEmbed = null; - private IUserMessage? questionMessage = null; - private bool showHowToQuit = false; + private EmbedBuilder? questionEmbed; + private IUserMessage? questionMessage; + private bool showHowToQuit; private void RegisterEvents(TriviaGame trivia) { diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs b/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs index 4223104..07c4ab4 100644 --- a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs +++ b/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs @@ -11,12 +11,19 @@ public sealed class TriviaGame private readonly IQuestionPool _questionPool; #region Events + public event Func OnQuestion = static delegate { return Task.CompletedTask; }; public event Func OnHint = static delegate { return Task.CompletedTask; }; public event Func OnStats = static delegate { return Task.CompletedTask; }; - public event Func OnGuess = static delegate { return Task.CompletedTask; }; + + public event Func OnGuess = static delegate + { + return Task.CompletedTask; + }; + public event Func OnTimeout = static delegate { return Task.CompletedTask; }; public event Func OnEnded = static delegate { return Task.CompletedTask; }; + #endregion private bool _isStopped; @@ -24,7 +31,7 @@ public sealed class TriviaGame public TriviaQuestion? CurrentQuestion { get; set; } - private readonly ConcurrentDictionary _users = new (); + private readonly ConcurrentDictionary _users = new(); private readonly Channel<(TriviaUser User, string Input)> _inputs = Channel.CreateUnbounded<(TriviaUser, string)>(new UnboundedChannelOptions @@ -41,8 +48,8 @@ public sealed class TriviaGame _questionPool = _opts.IsPokemon ? new PokemonQuestionPool(cache) : new DefaultQuestionPool(cache); - } + public async Task RunAsync() { await GameLoop(); @@ -50,7 +57,8 @@ public sealed class TriviaGame private async Task GameLoop() { - Task TimeOutFactory() => Task.Delay(_opts.QuestionTimer * 1000 / 2); + Task TimeOutFactory() + => Task.Delay(_opts.QuestionTimer * 1000 / 2); var errorCount = 0; var inactivity = 0; @@ -91,7 +99,8 @@ public sealed class TriviaGame { // clear out all of the past guesses while (_inputs.Reader.TryRead(out _)) - ; + { + } await OnQuestion(this, question); } @@ -121,7 +130,7 @@ public sealed class TriviaGame if (task == halfGuessTimerTask) { readCancel.Cancel(); - + // if hint is already sent, means time expired // break (end the round) if (hintSent) @@ -213,7 +222,7 @@ public sealed class TriviaGame public async Task TriggerQuestionAsync() { - if(CurrentQuestion is TriviaQuestion q) + if (CurrentQuestion is TriviaQuestion q) await OnQuestion(this, q); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs b/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs index c3733a4..475b026 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs @@ -61,8 +61,8 @@ public class RadioResolver : IRadioResolver try { var m = _m3URegex.Match(file); - var res = m.Groups["url"]?.ToString(); - return res?.Trim(); + var res = m.Groups["url"].ToString(); + return res.Trim(); } catch { @@ -76,8 +76,8 @@ public class RadioResolver : IRadioResolver try { var m = _asxRegex.Match(file); - var res = m.Groups["url"]?.ToString(); - return res?.Trim(); + var res = m.Groups["url"].ToString(); + return res.Trim(); } catch { @@ -91,8 +91,8 @@ public class RadioResolver : IRadioResolver try { var m = _xspfRegex.Match(file); - var res = m.Groups["url"]?.ToString(); - return res?.Trim(); + var res = m.Groups["url"].ToString(); + return res.Trim(); } catch { diff --git a/src/EllieBot/Modules/Patronage/PatronageService.cs b/src/EllieBot/Modules/Patronage/PatronageService.cs index ff0ced6..0ea46e4 100644 --- a/src/EllieBot/Modules/Patronage/PatronageService.cs +++ b/src/EllieBot/Modules/Patronage/PatronageService.cs @@ -19,16 +19,11 @@ public sealed class PatronageService public int Priority => int.MinValue; - private static readonly PatronTier[] _tiers = Enum.GetValues(); - private readonly PatronageConfig _pConf; private readonly DbService _db; private readonly DiscordSocketClient _client; private readonly ISubscriptionHandler _subsHandler; - private static readonly TypedKey _quotaKey - = new($"quota:last_hourly_reset"); - private readonly IBotCache _cache; private readonly IBotCredsProvider _creds; private readonly IMessageSenderService _sender; @@ -133,19 +128,19 @@ public sealed class PatronageService // user is charged again for this month // if his sub would end in teh future, extend it by one month. // if it's not, just add 1 month to the last charge date - var count = await ctx.GetTable() - .Where(x => x.UniquePlatformUserId - == subscriber.UniquePlatformUserId) - .UpdateAsync(old => new() - { - UserId = subscriber.UserId, - AmountCents = subscriber.Cents, - LastCharge = lastChargeUtc, - ValidThru = old.ValidThru >= todayDate - // ? Sql.DateAdd(Sql.DateParts.Month, 1, old.ValidThru).Value - ? old.ValidThru.AddMonths(1) - : dateInOneMonth, - }); + await ctx.GetTable() + .Where(x => x.UniquePlatformUserId + == subscriber.UniquePlatformUserId) + .UpdateAsync(old => new() + { + UserId = subscriber.UserId, + AmountCents = subscriber.Cents, + LastCharge = lastChargeUtc, + ValidThru = old.ValidThru >= todayDate + // ? Sql.DateAdd(Sql.DateParts.Month, 1, old.ValidThru).Value + ? old.ValidThru.AddMonths(1) + : dateInOneMonth, + }); dbPatron.UserId = subscriber.UserId; @@ -330,7 +325,7 @@ public sealed class PatronageService { if (!_pConf.Data.IsEnabled) return _infiniteQuota; - + var maybePatron = await GetPatronAsync(userId); if (maybePatron is not { } patron) diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs index 1bb8910..290685d 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs @@ -65,18 +65,6 @@ public partial class Searches var change = (stock.Price - stock.Close).ToString("N2", Culture); var changePercent = (1 - (stock.Close / stock.Price)).ToString("P1", Culture); - var sign50 = stock.Change50d >= 0 - ? "\\🔼" - : "\\🔻"; - - var change50 = (stock.Change50d).ToString("P1", Culture); - - var sign200 = stock.Change200d >= 0 - ? "\\🔼" - : "\\🔻"; - - var change200 = (stock.Change200d).ToString("P1", Culture); - var price = stock.Price.ToString("C2", localCulture); var eb = _sender.CreateEmbed() diff --git a/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs b/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs index f43e7bb..200c88a 100644 --- a/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs +++ b/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs @@ -19,7 +19,6 @@ public sealed class GiveawayService : IEService, IReadyExecutor private readonly IMemoryCache _cache; private SortedSet _giveawayCache = new SortedSet(); private readonly EllieRandom _rng; - private readonly ConcurrentDictionary _rerolls = new(); public GiveawayService(DbService db, IBotCredentials creds, DiscordSocketClient client, IMessageSenderService sender, IBotStrings strings, ILocalization localization, IMemoryCache cache) diff --git a/src/EllieBot/_common/NinjectIKernelExtensions.cs b/src/EllieBot/_common/DryIocExtensions.cs similarity index 80% rename from src/EllieBot/_common/NinjectIKernelExtensions.cs rename to src/EllieBot/_common/DryIocExtensions.cs index 5b5b909..c7d8c2a 100644 --- a/src/EllieBot/_common/NinjectIKernelExtensions.cs +++ b/src/EllieBot/_common/DryIocExtensions.cs @@ -20,14 +20,6 @@ public static class DryIocExtensions return container; } - public static IContainer AddSingleton(this IContainer container, Func factory) - where TImpl : TSvc - { - container.RegisterDelegate(factory, Reuse.Singleton); - - return container; - } - public static IContainer AddSingleton(this IContainer container) { container.Register(Reuse.Singleton); diff --git a/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs b/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs index e55ddff..3b9c450 100644 --- a/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs +++ b/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs @@ -34,7 +34,7 @@ public sealed class MarmaladeNinjectIocModule : IIocModule, IDisposable if (isLoaded) return; - foreach (var (type, data) in _types) + foreach (var (type, _) in _types) { var attribute = type.GetCustomAttribute()!; -- 2.43.0 From 811c12617498dc6b49257ca945dbf1c9cf0a83bb Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 7 Aug 2024 11:30:26 +1200 Subject: [PATCH 075/253] Fixed a build error introduced in 7399e8bac14d5fb1653bcd3c6149641bd9a1acbd How did this pass the test? --- src/EllieBot/Modules/Xp/Club/IClubService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/EllieBot/Modules/Xp/Club/IClubService.cs b/src/EllieBot/Modules/Xp/Club/IClubService.cs index 863d81f..d838e91 100644 --- a/src/EllieBot/Modules/Xp/Club/IClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/IClubService.cs @@ -12,6 +12,8 @@ public interface IClubService Task SetClubIconAsync(ulong ownerUserId, string? url); bool GetClubByName(string clubName, out ClubInfo club); ClubApplyResult ApplyToClub(IUser user, ClubInfo club); + ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser); + ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser); ClubInfo? GetClubWithBansAndApplications(ulong ownerUserId); ClubLeaveResult LeaveClub(IUser user); bool SetDescription(ulong userId, string? desc); -- 2.43.0 From 9892de7c2e5ba78d738153a312dcdf4f8e95a5ba Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 7 Aug 2024 11:32:51 +1200 Subject: [PATCH 076/253] Removed a lot of old useless/broken commands. Improved 'listserver. Full changes in changelog --- CHANGELOG.md | 22 +++ src/EllieBot/Bot.cs | 2 +- .../Modules/Gambling/Connect4/Connect4.cs | 47 ++--- .../Gambling/Connect4/Connect4Commands.cs | 48 ++--- src/EllieBot/Modules/Gambling/Gambling.cs | 141 -------------- .../Modules/Gambling/GamblingService.cs | 32 ---- .../Gambling/Raffle/CurrencyRaffleCommands.cs | 61 ------ .../Gambling/Raffle/CurrencyRaffleGame.cs | 69 ------- .../Gambling/Raffle/CurrencyRaffleService.cs | 81 -------- .../Modules/Gambling/Slot/SlotCommands.cs | 31 ++- .../Searches/Anime/AnimeSearchCommands.cs | 179 +++--------------- .../Modules/Searches/MemegenCommands.cs | 99 ---------- .../Modules/Utility/Info/InfoCommands.cs | 34 ---- src/EllieBot/Modules/Utility/Utility.cs | 35 ++-- src/EllieBot/data/aliases.yml | 16 +- .../data/strings/commands/commands.en-US.yml | 67 +------ .../strings/responses/responses.en-US.json | 7 - 17 files changed, 115 insertions(+), 856 deletions(-) delete mode 100644 src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs delete mode 100644 src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs delete mode 100644 src/EllieBot/Modules/Searches/MemegenCommands.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b56fd..700a754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +## Unreleased + +### Added + +- `'serverlist` is now paginated + +### Changed + +- `'listservers` renamed to `'serverlist` + +### Removed +- Removed old bloat / semi broken / dumb commands + - `'memelist` / `'memegen` (too inconvenient to use) + - `'activity` (useless owner-only command) + - `'rafflecur` (Just use raffle and then award manually instead) + - `'rollduel` (we had this command?) +- You can no longer bet on `'connect4` +- `'economy` Removed. + - Was buggy and didn't really show the real state of the economy. + - It might come back improved in the future +- `'mal` Removed. Useless information / semi broken + ## [5.1.5] - 01.08.2024 ### Added diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index a8c5fd3..3ea8ffa 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -88,7 +88,7 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() - => Client.Guilds.Select(x => x.Id).ToList(); + => Client.Guilds.Select(x => x.Id).ToList().ToList(); private void AddServices() { diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs index 45d2e89..02537fd 100644 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs +++ b/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs @@ -38,11 +38,11 @@ public sealed class Connect4Game : IDisposable public Phase CurrentPhase { get; private set; } = Phase.Joining; - public ImmutableArray GameState - => _gameState.ToImmutableArray(); + public IReadOnlyList GameState + => _gameState.AsReadOnly(); - public ImmutableArray<(ulong UserId, string Username)?> Players - => _players.ToImmutableArray(); + public IReadOnlyCollection<(ulong UserId, string Username)?> Players + => _players.AsReadOnly(); public (ulong UserId, string Username) CurrentPlayer => CurrentPhase == Phase.P1Move ? _players[0].Value : _players[1].Value; @@ -56,7 +56,6 @@ public sealed class Connect4Game : IDisposable private readonly SemaphoreSlim _locker = new(1, 1); private readonly Options _options; - private readonly ICurrencyService _cs; private readonly EllieRandom _rng; private Timer playerTimeoutTimer; @@ -73,12 +72,11 @@ public sealed class Connect4Game : IDisposable public Connect4Game( ulong userId, string userName, - Options options, - ICurrencyService cs) + Options options + ) { _players[0] = (userId, userName); _options = options; - _cs = cs; _rng = new(); for (var i = 0; i < NUMBER_OF_COLUMNS * NUMBER_OF_ROWS; i++) @@ -99,14 +97,13 @@ public sealed class Connect4Game : IDisposable { _ = OnGameFailedToStart?.Invoke(this); CurrentPhase = Phase.Ended; - await _cs.AddAsync(_players[0].Value.UserId, _options.Bet, new("connect4", "refund")); } } finally { _locker.Release(); } }); } - public async Task Join(ulong userId, string userName, int bet) + public async Task Join(ulong userId, string userName) { await _locker.WaitAsync(); try @@ -117,11 +114,6 @@ public sealed class Connect4Game : IDisposable if (_players[0].Value.UserId == userId) // same user can't join own game return false; - if (bet != _options.Bet) // can't join if bet amount is not the same - return false; - - if (!await _cs.RemoveAsync(userId, bet, new("connect4", "bet"))) // user doesn't have enough money to gamble - return false; if (_rng.Next(0, 2) == 0) //rolling from 0-1, if number is 0, join as first player { @@ -133,14 +125,14 @@ public sealed class Connect4Game : IDisposable CurrentPhase = Phase.P1Move; //start the game playerTimeoutTimer = new(async _ => + { + await _locker.WaitAsync(); + try { - await _locker.WaitAsync(); - try - { - EndGame(Result.OtherPlayerWon, OtherPlayer.UserId); - } - finally { _locker.Release(); } - }, + EndGame(Result.OtherPlayerWon, OtherPlayer.UserId); + } + finally { _locker.Release(); } + }, null, TimeSpan.FromSeconds(_options.TurnTimer), TimeSpan.FromSeconds(_options.TurnTimer)); @@ -351,13 +343,8 @@ public sealed class Connect4Game : IDisposable if (result == Result.Draw) { - _cs.AddAsync(CurrentPlayer.UserId, _options.Bet, new("connect4", "draw")); - _cs.AddAsync(OtherPlayer.UserId, _options.Bet, new("connect4", "draw")); return; } - - if (winId is not null) - _cs.AddAsync(winId.Value, (long)(_options.Bet * 1.98), new("connect4", "win")); } private Field GetPlayerPiece(ulong userId) @@ -394,16 +381,10 @@ public sealed class Connect4Game : IDisposable HelpText = "Turn time in seconds. It has to be between 5 and 60. Default 15.")] public int TurnTimer { get; set; } = 15; - [Option('b', "bet", Required = false, Default = 0, HelpText = "Amount you bet. Default 0.")] - public int Bet { get; set; } - public void NormalizeOptions() { if (TurnTimer is < 5 or > 60) TurnTimer = 15; - - if (Bet < 0) - Bet = 0; } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs index 8210ad4..3b3aad1 100644 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs +++ b/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs @@ -29,17 +29,15 @@ public partial class Gambling } private readonly DiscordSocketClient _client; - private readonly ICurrencyService _cs; private IUserMessage msg; private int repostCounter; - public Connect4Commands(DiscordSocketClient client, ICurrencyService cs, GamblingConfigService gamb) + public Connect4Commands(DiscordSocketClient client, GamblingConfigService gamb) : base(gamb) { _client = client; - _cs = cs; } [Cmd] @@ -48,10 +46,8 @@ public partial class Gambling public async Task Connect4(params string[] args) { var (options, _) = OptionsParser.ParseFrom(new Connect4Game.Options(), args); - if (!await CheckBetOptional(options.Bet)) - return; - var newGame = new Connect4Game(ctx.User.Id, ctx.User.ToString(), options, _cs); + var newGame = new Connect4Game(ctx.User.Id, ctx.User.ToString(), options); Connect4Game game; if ((game = _service.Connect4Games.GetOrAdd(ctx.Channel.Id, newGame)) != newGame) { @@ -60,31 +56,17 @@ public partial class Gambling newGame.Dispose(); //means game already exists, try to join - await game.Join(ctx.User.Id, ctx.User.ToString(), options.Bet); + await game.Join(ctx.User.Id, ctx.User.ToString()); return; } - if (options.Bet > 0) - { - if (!await _cs.RemoveAsync(ctx.User.Id, options.Bet, new("connect4", "bet"))) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - _service.Connect4Games.TryRemove(ctx.Channel.Id, out _); - game.Dispose(); - return; - } - } - game.OnGameStateUpdated += Game_OnGameStateUpdated; game.OnGameFailedToStart += GameOnGameFailedToStart; game.OnGameEnded += GameOnGameEnded; _client.MessageReceived += ClientMessageReceived; game.Initialize(); - if (options.Bet == 0) - await Response().Confirm(strs.connect4_created).SendAsync(); - else - await Response().Error(strs.connect4_created_bet(N(options.Bet))).SendAsync(); + await Response().Confirm(strs.connect4_created).SendAsync(); Task ClientMessageReceived(SocketMessage arg) { @@ -99,7 +81,8 @@ public partial class Gambling if (success) { - try { await arg.DeleteAsync(); } + try + { await arg.DeleteAsync(); } catch { } } else @@ -109,7 +92,8 @@ public partial class Gambling RepostCounter++; if (RepostCounter == 0) { - try { msg = await Response().Embed(msg.Embeds.First().ToEmbedBuilder()).SendAsync(); } + try + { msg = await Response().Embed(msg.Embeds.First().ToEmbedBuilder()).SendAsync(); } catch { } } } @@ -151,19 +135,19 @@ public partial class Gambling title = GetText(strs.connect4_draw); return msg.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithTitle(title) - .WithDescription(GetGameStateText(game)) - .WithOkColor() - .Build()); + .WithTitle(title) + .WithDescription(GetGameStateText(game)) + .WithOkColor() + .Build()); } } private async Task Game_OnGameStateUpdated(Connect4Game game) { var embed = _sender.CreateEmbed() - .WithTitle($"{game.CurrentPlayer.Username} vs {game.OtherPlayer.Username}") - .WithDescription(GetGameStateText(game)) - .WithOkColor(); + .WithTitle($"{game.CurrentPlayer.Username} vs {game.OtherPlayer.Username}") + .WithDescription(GetGameStateText(game)) + .WithOkColor(); if (msg is null) @@ -198,7 +182,7 @@ public partial class Gambling for (var i = 0; i < Connect4Game.NUMBER_OF_COLUMNS; i++) sb.Append(_numbers[i]); - + return sb.ToString(); } } diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs index 53cb07e..64fedf5 100644 --- a/src/EllieBot/Modules/Gambling/Gambling.cs +++ b/src/EllieBot/Modules/Gambling/Gambling.cs @@ -30,8 +30,6 @@ public partial class Gambling : GamblingModule private readonly GamblingTxTracker _gamblingTxTracker; private readonly IPatronageService _ps; - private IUserMessage rdMsg; - public Gambling( IGamblingService gs, DbService db, @@ -104,34 +102,6 @@ public partial class Gambling : GamblingModule await Response().Embed(eb).SendAsync(); } - [Cmd] - public async Task Economy() - { - var ec = await _service.GetEconomyAsync(); - decimal onePercent = 0; - - // This stops the top 1% from owning more than 100% of the money - if (ec.Cash > 0) - { - onePercent = ec.OnePercent / (ec.Cash - ec.Bot); - } - - // [21:03] Bob Page: Kinda remids me of US economy - var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.economy_state)) - .AddField(GetText(strs.currency_owned), N(ec.Cash - ec.Bot)) - .AddField(GetText(strs.currency_one_percent), (onePercent * 100).ToString("F2") + "%") - .AddField(GetText(strs.currency_planted), N(ec.Planted)) - .AddField(GetText(strs.owned_waifus_total), N(ec.Waifus)) - .AddField(GetText(strs.bot_currency), N(ec.Bot)) - .AddField(GetText(strs.bank_accounts), N(ec.Bank)) - .AddField(GetText(strs.total), N(ec.Cash + ec.Planted + ec.Waifus + ec.Bank)) - .WithOkColor(); - - // ec.Cash already contains ec.Bot as it's the total of all values in the CurrencyAmount column of the DiscordUser table - await Response().Embed(embed).SendAsync(); - } - private async Task RemindTimelyAction(SocketMessageComponent smc, DateTime when) { var tt = TimestampTag.FromDateTime(when, TimestampTagStyles.Relative); @@ -601,117 +571,6 @@ public partial class Gambling : GamblingModule } } - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RollDuel(IUser u) - { - if (ctx.User.Id == u.Id) - { - return; - } - - //since the challenge is created by another user, we need to reverse the ids - //if it gets removed, means challenge is accepted - if (_service.Duels.TryRemove((ctx.User.Id, u.Id), out var game)) - { - await game.StartGame(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RollDuel([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, IUser u) - { - if (ctx.User.Id == u.Id) - { - return; - } - - if (amount <= 0) - { - return; - } - - var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.roll_duel)); - - var description = string.Empty; - - var game = new RollDuelGame(_cs, _client.CurrentUser.Id, ctx.User.Id, u.Id, amount); - //means challenge is just created - if (_service.Duels.TryGetValue((ctx.User.Id, u.Id), out var other)) - { - if (other.Amount != amount) - { - await Response().Error(strs.roll_duel_already_challenged).SendAsync(); - } - else - { - await RollDuel(u); - } - - return; - } - - if (_service.Duels.TryAdd((u.Id, ctx.User.Id), game)) - { - game.OnGameTick += GameOnGameTick; - game.OnEnded += GameOnEnded; - - await Response() - .Confirm(strs.roll_duel_challenge(Format.Bold(ctx.User.ToString()), - Format.Bold(u.ToString()), - Format.Bold(N(amount)))) - .SendAsync(); - } - - async Task GameOnGameTick(RollDuelGame arg) - { - var rolls = arg.Rolls.Last(); - description += $@"{Format.Bold(ctx.User.ToString())} rolled **{rolls.Item1}** -{Format.Bold(u.ToString())} rolled **{rolls.Item2}** --- -"; - embed = embed.WithDescription(description); - - if (rdMsg is null) - { - rdMsg = await Response().Embed(embed).SendAsync(); - } - else - { - await rdMsg.ModifyAsync(x => { x.Embed = embed.Build(); }); - } - } - - async Task GameOnEnded(RollDuelGame rdGame, RollDuelGame.Reason reason) - { - try - { - if (reason == RollDuelGame.Reason.Normal) - { - var winner = rdGame.Winner == rdGame.P1 ? ctx.User : u; - description += $"\n**{winner}** Won {N((long)(rdGame.Amount * 2 * 0.98))}"; - - embed = embed.WithDescription(description); - - await rdMsg.ModifyAsync(x => x.Embed = embed.Build()); - } - else if (reason == RollDuelGame.Reason.Timeout) - { - await Response().Error(strs.roll_duel_timeout).SendAsync(); - } - else if (reason == RollDuelGame.Reason.NoFunds) - { - await Response().Error(strs.roll_duel_no_funds).SendAsync(); - } - } - finally - { - _service.Duels.TryRemove((u.Id, ctx.User.Id), out _); - } - } - } - [Cmd] public async Task BetRoll([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) { diff --git a/src/EllieBot/Modules/Gambling/GamblingService.cs b/src/EllieBot/Modules/Gambling/GamblingService.cs index e7ed369..f9a55bc 100644 --- a/src/EllieBot/Modules/Gambling/GamblingService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingService.cs @@ -128,38 +128,6 @@ public class GamblingService : IEService, IReadyExecutor private static readonly TypedKey _ecoKey = new("ellie:economy"); - public async Task GetEconomyAsync() - { - var data = await _cache.GetOrAddAsync(_ecoKey, - async () => - { - await using var uow = _db.GetDbContext(); - var cash = uow.Set().GetTotalCurrency(); - var onePercent = uow.Set().GetTopOnePercentCurrency(_client.CurrentUser.Id); - decimal planted = uow.Set().AsQueryable().Sum(x => x.Amount); - var waifus = uow.Set().GetTotalValue(); - var bot = await uow.Set().GetUserCurrencyAsync(_client.CurrentUser.Id); - decimal bank = await uow.GetTable() - .SumAsyncLinqToDB(x => x.Balance); - - var result = new EconomyResult - { - Cash = cash, - Planted = planted, - Bot = bot, - Waifus = waifus, - OnePercent = onePercent, - Bank = bank - }; - - return result; - }, - TimeSpan.FromMinutes(3)); - - return data; - } - - private static readonly SemaphoreSlim _timelyLock = new(1, 1); private static TypedKey> _timelyKey diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs deleted file mode 100644 index 513aa59..0000000 --- a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs +++ /dev/null @@ -1,61 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - public partial class CurrencyRaffleCommands : GamblingSubmodule - { - public enum Mixed { Mixed } - - public CurrencyRaffleCommands(GamblingConfigService gamblingConfService) - : base(gamblingConfService) - { - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public Task RaffleCur(Mixed _, [OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - => RaffleCur(amount, true); - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task RaffleCur([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, bool mixed = false) - { - if (!await CheckBetMandatory(amount)) - return; - - async Task OnEnded(IUser arg, long won) - { - await Response() - .Confirm(GetText(strs.rafflecur_ended(CurrencyName, - Format.Bold(arg.ToString()), - won + CurrencySign))) - .SendAsync(); - } - - var res = await _service.JoinOrCreateGame(ctx.Channel.Id, ctx.User, amount, mixed, OnEnded); - - if (res.Item1 is not null) - { - await Response() - .Confirm(GetText(strs.rafflecur(res.Item1.GameType.ToString())), - string.Join("\n", res.Item1.Users.Select(x => $"{x.DiscordUser} ({N(x.Amount)})")), - footer: GetText(strs.rafflecur_joined(ctx.User.ToString()))) - .SendAsync(); - } - else - { - if (res.Item2 == CurrencyRaffleService.JoinErrorType.AlreadyJoinedOrInvalidAmount) - await Response().Error(strs.rafflecur_already_joined).SendAsync(); - else if (res.Item2 == CurrencyRaffleService.JoinErrorType.NotEnoughCurrency) - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs deleted file mode 100644 index d6f5770..0000000 --- a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs +++ /dev/null @@ -1,69 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common; - -public class CurrencyRaffleGame -{ - public enum Type - { - Mixed, - Normal - } - - public IEnumerable Users - => _users; - - public Type GameType { get; } - - private readonly HashSet _users = new(); - - public CurrencyRaffleGame(Type type) - => GameType = type; - - public bool AddUser(IUser usr, long amount) - { - // if game type is normal, and someone already joined the game - // (that's the user who created it) - if (GameType == Type.Normal && _users.Count > 0 && _users.First().Amount != amount) - return false; - - if (!_users.Add(new() - { - DiscordUser = usr, - Amount = amount - })) - return false; - - return true; - } - - public User GetWinner() - { - var rng = new EllieRandom(); - if (GameType == Type.Mixed) - { - var num = rng.NextLong(0L, Users.Sum(x => x.Amount)); - var sum = 0L; - foreach (var u in Users) - { - sum += u.Amount; - if (sum > num) - return u; - } - } - - var usrs = _users.ToArray(); - return usrs[rng.Next(0, usrs.Length)]; - } - - public class User - { - public IUser DiscordUser { get; set; } - public long Amount { get; set; } - - public override int GetHashCode() - => DiscordUser.GetHashCode(); - - public override bool Equals(object obj) - => obj is User u ? u.DiscordUser == DiscordUser : false; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs deleted file mode 100644 index 743549e..0000000 --- a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs +++ /dev/null @@ -1,81 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; - -namespace EllieBot.Modules.Gambling.Services; - -public class CurrencyRaffleService : IEService -{ - public enum JoinErrorType - { - NotEnoughCurrency, - AlreadyJoinedOrInvalidAmount - } - - public Dictionary Games { get; } = new(); - private readonly SemaphoreSlim _locker = new(1, 1); - private readonly ICurrencyService _cs; - - public CurrencyRaffleService(ICurrencyService cs) - => _cs = cs; - - public async Task<(CurrencyRaffleGame, JoinErrorType?)> JoinOrCreateGame( - ulong channelId, - IUser user, - long amount, - bool mixed, - Func onEnded) - { - await _locker.WaitAsync(); - try - { - var newGame = false; - if (!Games.TryGetValue(channelId, out var crg)) - { - newGame = true; - crg = new(mixed ? CurrencyRaffleGame.Type.Mixed : CurrencyRaffleGame.Type.Normal); - Games.Add(channelId, crg); - } - - //remove money, and stop the game if this - // user created it and doesn't have the money - if (!await _cs.RemoveAsync(user.Id, amount, new("raffle", "join"))) - { - if (newGame) - Games.Remove(channelId); - return (null, JoinErrorType.NotEnoughCurrency); - } - - if (!crg.AddUser(user, amount)) - { - await _cs.AddAsync(user.Id, amount, new("raffle", "refund")); - return (null, JoinErrorType.AlreadyJoinedOrInvalidAmount); - } - - if (newGame) - { - _ = Task.Run(async () => - { - await Task.Delay(60000); - await _locker.WaitAsync(); - try - { - var winner = crg.GetWinner(); - var won = crg.Users.Sum(x => x.Amount); - - await _cs.AddAsync(winner.DiscordUser.Id, won, new("raffle", "win")); - Games.Remove(channelId, out _); - _ = onEnded(winner.DiscordUser, won); - } - catch { } - finally { _locker.Release(); } - }); - } - - return (crg, null); - } - finally - { - _locker.Release(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs index b925cd8..a5c7465 100644 --- a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs @@ -23,9 +23,6 @@ public partial class Gambling [Group] public partial class SlotCommands : GamblingSubmodule { - private static decimal totalBet; - private static decimal totalPaidOut; - private readonly IImageCache _images; private readonly FontProvider _fonts; private readonly DbService _db; @@ -69,17 +66,19 @@ public partial class Gambling var eb = _sender.CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(Format.Bold(text)) - .WithImageUrl($"attachment://result.png") - .WithOkColor(); + .WithAuthor(ctx.User) + .WithDescription(Format.Bold(text)) + .WithImageUrl($"attachment://result.png") + .WithOkColor(); var bb = new ButtonBuilder(emote: Emoji.Parse("🔁"), customId: "slot:again", label: "Pull Again"); - var inter = _inter.Create(ctx.User.Id, bb, smc => - { - smc.DeferAsync(); - return Slot(amount); - }); + var inter = _inter.Create(ctx.User.Id, + bb, + smc => + { + smc.DeferAsync(); + return Slot(amount); + }); var msg = await ctx.Channel.SendFileAsync(imgStream, "result.png", @@ -159,12 +158,6 @@ public partial class Gambling { return null; } - - lock (_slotStatsLock) - { - totalBet += amount; - totalPaidOut += result.Won; - } return result; } @@ -211,7 +204,7 @@ public partial class Gambling { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, - Origin = new(393, 480) + Origin = new(393, 480) }, ownedAmount.ToString(), fontColor)); diff --git a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs b/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs index 8acae72..d86cd14 100644 --- a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs +++ b/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs @@ -10,133 +10,6 @@ public partial class Searches [Group] public partial class AnimeSearchCommands : EllieModule { - // [EllieCommand, Aliases] - // public async Task Novel([Leftover] string query) - // { - // if (string.IsNullOrWhiteSpace(query)) - // return; - // - // var novelData = await _service.GetNovelData(query); - // - // if (novelData is null) - // { - // await Response().Error(strs.failed_finding_novel).SendAsync(); - // return; - // } - // - // var embed = _sender.CreateEmbed() - // .WithOkColor() - // .WithDescription(novelData.Description.Replace("
", Environment.NewLine, StringComparison.InvariantCulture)) - // .WithTitle(novelData.Title) - // .WithUrl(novelData.Link) - // .WithImageUrl(novelData.ImageUrl) - // .AddField(GetText(strs.authors), string.Join("\n", novelData.Authors), true) - // .AddField(GetText(strs.status), novelData.Status, true) - // .AddField(GetText(strs.genres), string.Join(" ", novelData.Genres.Any() ? novelData.Genres : new[] { "none" }), true) - // .WithFooter($"{GetText(strs.score)} {novelData.Score}"); - // - // await Response().Embed(embed).SendAsync(); - // } - - [Cmd] - [Priority(0)] - public async Task Mal([Leftover] string name) - { - if (string.IsNullOrWhiteSpace(name)) - return; - - var fullQueryLink = "https://myanimelist.net/profile/" + name; - - var config = Configuration.Default.WithDefaultLoader(); - using var document = await BrowsingContext.New(config).OpenAsync(fullQueryLink); - var imageElem = - document.QuerySelector( - "body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-left > div.user-profile > div.user-image > img"); - var imageUrl = ((IHtmlImageElement)imageElem)?.Source - ?? "http://icecream.me/uploads/870b03f36b59cc16ebfe314ef2dde781.png"; - - var stats = document - .QuerySelectorAll( - "body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-right > div#statistics > div.user-statistics-stats > div.stats > div.clearfix > ul.stats-status > li > span") - .Select(x => x.InnerHtml) - .ToList(); - - var favorites = document.QuerySelectorAll("div.user-favorites > div.di-tc"); - - var favAnime = GetText(strs.anime_no_fav); - if (favorites.Length > 0 && favorites[0].QuerySelector("p") is null) - { - favAnime = string.Join("\n", - favorites[0] - .QuerySelectorAll("ul > li > div.di-tc.va-t > a") - .Shuffle() - .Take(3) - .Select(x => - { - var elem = (IHtmlAnchorElement)x; - return $"[{elem.InnerHtml}]({elem.Href})"; - })); - } - - var info = document.QuerySelectorAll("ul.user-status:nth-child(3) > li.clearfix") - .Select(x => Tuple.Create(x.Children[0].InnerHtml, x.Children[1].InnerHtml)) - .ToList(); - - var daysAndMean = document.QuerySelectorAll("div.anime:nth-child(1) > div:nth-child(2) > div") - .Select(x => x.TextContent.Split(':').Select(y => y.Trim()).ToArray()) - .ToArray(); - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.mal_profile(name))) - .AddField("💚 " + GetText(strs.watching), stats[0], true) - .AddField("💙 " + GetText(strs.completed), stats[1], true); - if (info.Count < 3) - embed.AddField("💛 " + GetText(strs.on_hold), stats[2], true); - embed.AddField("💔 " + GetText(strs.dropped), stats[3], true) - .AddField("⚪ " + GetText(strs.plan_to_watch), stats[4], true) - .AddField("🕐 " + daysAndMean[0][0], daysAndMean[0][1], true) - .AddField("📊 " + daysAndMean[1][0], daysAndMean[1][1], true) - .AddField(MalInfoToEmoji(info[0].Item1) + " " + info[0].Item1, info[0].Item2.TrimTo(20), true) - .AddField(MalInfoToEmoji(info[1].Item1) + " " + info[1].Item1, info[1].Item2.TrimTo(20), true); - if (info.Count > 2) - embed.AddField(MalInfoToEmoji(info[2].Item1) + " " + info[2].Item1, info[2].Item2.TrimTo(20), true); - - embed.WithDescription($@" -** https://myanimelist.net/animelist/{name} ** - -**{GetText(strs.top_3_fav_anime)}** -{favAnime}") - .WithUrl(fullQueryLink) - .WithImageUrl(imageUrl); - - await Response().Embed(embed).SendAsync(); - } - - private static string MalInfoToEmoji(string info) - { - info = info.Trim().ToLowerInvariant(); - switch (info) - { - case "gender": - return "🚁"; - case "location": - return "🗺"; - case "last online": - return "👥"; - case "birthday": - return "📆"; - default: - return "❔"; - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public Task Mal(IGuildUser usr) - => Mal(usr.Username); - [Cmd] public async Task Anime([Leftover] string query) { @@ -152,19 +25,19 @@ public partial class Searches } var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(animeData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(animeData.TitleEnglish) - .WithUrl(animeData.Link) - .WithImageUrl(animeData.ImageUrlLarge) - .AddField(GetText(strs.episodes), animeData.TotalEpisodes.ToString(), true) - .AddField(GetText(strs.status), animeData.AiringStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {animeData.AverageScore} / 100"); + .WithOkColor() + .WithDescription(animeData.Synopsis.Replace("
", + Environment.NewLine, + StringComparison.InvariantCulture)) + .WithTitle(animeData.TitleEnglish) + .WithUrl(animeData.Link) + .WithImageUrl(animeData.ImageUrlLarge) + .AddField(GetText(strs.episodes), animeData.TotalEpisodes.ToString(), true) + .AddField(GetText(strs.status), animeData.AiringStatus, true) + .AddField(GetText(strs.genres), + string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : ["none"]), + true) + .WithFooter($"{GetText(strs.score)} {animeData.AverageScore} / 100"); await Response().Embed(embed).SendAsync(); } @@ -184,19 +57,19 @@ public partial class Searches } var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(mangaData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(mangaData.TitleEnglish) - .WithUrl(mangaData.Link) - .WithImageUrl(mangaData.ImageUrlLge) - .AddField(GetText(strs.chapters), mangaData.TotalChapters.ToString(), true) - .AddField(GetText(strs.status), mangaData.PublishingStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {mangaData.AverageScore} / 100"); + .WithOkColor() + .WithDescription(mangaData.Synopsis.Replace("
", + Environment.NewLine, + StringComparison.InvariantCulture)) + .WithTitle(mangaData.TitleEnglish) + .WithUrl(mangaData.Link) + .WithImageUrl(mangaData.ImageUrlLge) + .AddField(GetText(strs.chapters), mangaData.TotalChapters.ToString(), true) + .AddField(GetText(strs.status), mangaData.PublishingStatus, true) + .AddField(GetText(strs.genres), + string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : ["none"]), + true) + .WithFooter($"{GetText(strs.score)} {mangaData.AverageScore} / 100"); await Response().Embed(embed).SendAsync(); } diff --git a/src/EllieBot/Modules/Searches/MemegenCommands.cs b/src/EllieBot/Modules/Searches/MemegenCommands.cs deleted file mode 100644 index dbe2679..0000000 --- a/src/EllieBot/Modules/Searches/MemegenCommands.cs +++ /dev/null @@ -1,99 +0,0 @@ -#nullable disable -using Newtonsoft.Json; -using System.Collections.Immutable; -using System.Text; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class MemegenCommands : EllieModule - { - private static readonly ImmutableDictionary _map = new Dictionary - { - { '?', "~q" }, - { '%', "~p" }, - { '#', "~h" }, - { '/', "~s" }, - { ' ', "-" }, - { '-', "--" }, - { '_', "__" }, - { '"', "''" } - }.ToImmutableDictionary(); - - private readonly IHttpClientFactory _httpFactory; - - public MemegenCommands(IHttpClientFactory factory) - => _httpFactory = factory; - - [Cmd] - public async Task Memelist(int page = 1) - { - if (--page < 0) - return; - - using var http = _httpFactory.CreateClient("memelist"); - using var res = await http.GetAsync("https://api.memegen.link/templates/"); - - var rawJson = await res.Content.ReadAsStringAsync(); - - var data = JsonConvert.DeserializeObject>(rawJson)!; - - await Response() - .Paginated() - .Items(data) - .PageSize(15) - .CurrentPage(page) - .Page((items, curPage) => - { - var templates = string.Empty; - foreach (var template in items) - templates += $"**{template.Name}:**\n key: `{template.Id}`\n"; - var embed = _sender.CreateEmbed().WithOkColor().WithDescription(templates); - - return embed; - }) - .SendAsync(); - } - - [Cmd] - public async Task Memegen(string meme, [Leftover] string memeText = null) - { - var memeUrl = $"http://api.memegen.link/{meme}"; - if (!string.IsNullOrWhiteSpace(memeText)) - { - var memeTextArray = memeText.Split(';'); - foreach (var text in memeTextArray) - { - var newText = Replace(text); - memeUrl += $"/{newText}"; - } - } - - memeUrl += ".png"; - await Response().Text(memeUrl).SendAsync(); - } - - private static string Replace(string input) - { - var sb = new StringBuilder(); - - foreach (var c in input) - { - if (_map.TryGetValue(c, out var tmp)) - sb.Append(tmp); - else - sb.Append(c); - } - - return sb.ToString(); - } - - private class MemegenTemplate - { - public string Name { get; set; } - public string Id { get; set; } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs index e2533e0..c9ae861 100644 --- a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs +++ b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs @@ -176,39 +176,5 @@ public partial class Utility return joinedAt; } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task Activity(int page = 1) - { - const int activityPerPage = 10; - page -= 1; - - if (page < 0) - return; - - var startCount = page * activityPerPage; - - var str = new StringBuilder(); - foreach (var kvp in _cmdHandler.UserMessagesSent.OrderByDescending(kvp => kvp.Value) - .Skip(page * activityPerPage) - .Take(activityPerPage)) - { - str.AppendLine(GetText(strs.activity_line(++startCount, - Format.Bold(kvp.Key.ToString()), - kvp.Value / _stats.GetUptime().TotalSeconds, - kvp.Value))); - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithTitle(GetText(strs.activity_page(page + 1))) - .WithOkColor() - .WithFooter(GetText( - strs.activity_users_total(_cmdHandler.UserMessagesSent.Count))) - .WithDescription(str.ToString())) - .SendAsync(); - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index d3e9c37..ac76f93 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -557,29 +557,38 @@ public partial class Utility : EllieModule [Cmd] [OwnerOnly] - public async Task ListServers(int page = 1) + public async Task ServerList(int page = 1) { page -= 1; if (page < 0) return; - var guilds = _client.Guilds.OrderBy(g => g.Name) - .Skip(page * 15) - .Take(15) + var allGuilds = _client.Guilds + .OrderBy(g => g.Name) .ToList(); - if (!guilds.Any()) - { - await Response().Error(strs.listservers_none).SendAsync(); - return; - } + await Response() + .Paginated() + .Items(allGuilds) + .PageSize(9) + .Page((guilds, _) => + { + if (!guilds.Any()) + { + return _sender.CreateEmbed() + .WithDescription(GetText(strs.listservers_none)) + .WithErrorColor(); + } - var embed = _sender.CreateEmbed().WithOkColor(); - foreach (var guild in guilds) - embed.AddField(guild.Name, GetText(strs.listservers(guild.Id, guild.MemberCount, guild.OwnerId))); + var embed = _sender.CreateEmbed() + .WithOkColor(); + foreach (var guild in guilds) + embed.AddField(guild.Name, GetText(strs.listservers(guild.Id, guild.MemberCount, guild.OwnerId))); - await Response().Embed(embed).SendAsync(); + return embed; + }) + .SendAsync(); } [Cmd] diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index d8c13df..ff53850 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -587,10 +587,6 @@ pokemon: pokemonability: - pokemonability - pokeab -memelist: - - memelist -memegen: - - memegen weather: - weather - we @@ -771,7 +767,7 @@ typedel: - typedel typelist: - typelist -listservers: +serverlist: - listservers cleverbot: - cleverbot @@ -804,8 +800,6 @@ autodisconnect: define: - define - def -activity: - - activity setstatus: - setstatus invitecreate: @@ -855,8 +849,6 @@ divorce: waifuinfo: - waifuinfo - waifustats -mal: - - mal setmusicchannel: - setmusicchannel - smch @@ -1148,8 +1140,6 @@ discordpermoverridelist: - dpoli discordpermoverridereset: - dpor -rafflecur: - - rafflecur timelyset: - timelyset timely: @@ -1166,8 +1156,6 @@ massban: - massban masskill: - masskill -rollduel: - - rollduel reroadd: - reroadd - reroa @@ -1209,8 +1197,6 @@ roleid: agerestricttoggle: - nsfwtoggle - artoggle -economy: - - economy purgeuser: - purgeuser imageonlychannel: diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 8e5ff9d..8d378c7 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -1987,23 +1987,6 @@ pokemonability: params: - ability: desc: "The type of the Pokémon's special power or trait that can be used in battle." -memelist: - desc: Shows a list of template keys (and their respective names) used for `{0}memegen`. - ex: - - '' - params: - - page: - desc: "The number of pages in the list to be displayed." -memegen: - desc: Generates a meme from memelist with specified text. Separate multiple text values with semicolons. Provide no meme text to see an example meme with that template. - ex: - - biw gets iced coffee;in the winter - - ntot - params: - - meme: - desc: "The caption or punchline of the meme, which can be a single sentence or multiple sentences separated by semicolons." - memeText: - desc: "The user-provided text to be displayed on the generated meme." weather: desc: Shows current weather data for the specified city. ex: @@ -2550,7 +2533,7 @@ typelist: params: - page: desc: "The current page number for the list of typing articles." -listservers: +serverlist: desc: Lists servers the bot is on with some basic info. 15 per page. ex: - 3 @@ -2645,13 +2628,6 @@ define: params: - word: desc: "The word being searched for." -activity: - desc: Checks for spammers. - ex: - - '' - params: - - page: - desc: "The number of pages to scan for spam." setstatus: desc: Sets the bot's status. (Online/Idle/Dnd/Invisible) ex: @@ -2808,15 +2784,6 @@ waifuinfo: desc: "The user being targeted, whose waifu information will be displayed." - targetId: desc: "The ID of the person whose waifu stats are being displayed." -mal: - desc: Shows basic info from a MyAnimeList profile. - ex: - - straysocks - params: - - name: - desc: "The username or identifier for the MyAnimeList account being queried." - - usr: - desc: "The user's guild membership information is used to fetch their anime list and other relevant data." setmusicchannel: desc: Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. Persistent server setting. ex: @@ -3871,20 +3838,6 @@ discordpermoverridereset: - '' params: - {} -rafflecur: - desc: Starts or joins a currency raffle with a specified amount. Users who join the raffle will lose the amount of currency specified and add it to the pot. After 30 seconds, random winner will be selected who will receive the whole pot. There is also a `mixed` mode in which the users will be able to join the game with any amount of currency, and have their chances be proportional to the amount they've bet. - ex: - - 20 - - mixed 15 - params: - - _: - desc: "The type of game mode to use, either \"fixed\" or \"mixed\"." - amount: - desc: "The minimum or maximum amount of currency that can be used for betting." - - amount: - desc: "The minimum or maximum amount of currency that can be used for betting." - mixed: - desc: "The parameter determines whether the raffle operates in \"fixed\" or \"proportional\" mode." autodisconnect: desc: Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`. ex: @@ -3956,18 +3909,6 @@ masskill: params: - people: desc: "The list of user IDs or usernames to ban from the server and blacklist from the bot." -rollduel: - desc: Challenge someone to a roll duel by specifying the amount and the user you wish to challenge as the parameters. To accept the challenge, just specify the name of the user who challenged you, without the amount. - ex: - - 50 @Someone - - '@Challenger' - params: - - u: - desc: "The user being challenged or accepting the challenge." - - amount: - desc: "The stakes for the roll duel." - u: - desc: "The user being challenged or accepting the challenge." reroadd: desc: |- Specify a message id, emote and a role name to have the bot assign the specified role to the user who reacts to the specified message (in this channel) with the specified emoji. @@ -4158,12 +4099,6 @@ agerestricttoggle: - '' params: - {} -economy: - desc: Breakdown of the current state of the bot's economy. Updates every 3 minutes. - ex: - - '' - params: - - {} purgeuser: desc: Purge user from the database completely. This includes currency, xp, clubs that user owns, waifu info ex: diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index b55d8ad..fe495bb 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -977,14 +977,7 @@ "reset_user_confirm": "Are you sure that you want to reset specified user's XP on this server?", "reset_user": "User with id {0} has had their XP reset on this server.", "reset_server": "XP of all users on the server has been reset.", - "economy_state": "State of the economy", - "currency_owned": "Total currency owned by users", - "currency_one_percent": "% of currency owned by top 1%", - "currency_planted": "Currency currently planted", - "owned_waifus_total": "Total value of owned waifus", - "bot_currency": "Currency owned by the bot", "total": "Total", - "bank_accounts": "Bank Accounts", "no_invites": "No invites on this page.", "invite_deleted": "Invite {0} has been deleted.", "group_name_added": "Group #{0} now has a name: {1}", -- 2.43.0 From 027690b3d7d0acf76c1bdd1dbf5947c272539336 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 7 Aug 2024 11:45:10 +1200 Subject: [PATCH 077/253] More cleanup --- src/EllieBot/Modules/Searches/Searches.cs | 70 +++++++++---------- .../data/strings/commands/commands.en-US.yml | 20 +++--- 2 files changed, 40 insertions(+), 50 deletions(-) diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index 14b7e79..70e2556 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -1,4 +1,3 @@ -#nullable disable using Microsoft.Extensions.Caching.Memory; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Services; @@ -114,7 +113,7 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Movie([Leftover] string query = null) + public async Task Movie([Leftover] string query) { if (!await ValidateQuery(query)) return; @@ -166,7 +165,7 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Lmgtfy([Leftover] string smh = null) + public async Task Lmgtfy([Leftover] string smh) { if (!await ValidateQuery(smh)) return; @@ -198,6 +197,7 @@ public partial class Searches : EllieModule .SendAsync(); } + [Cmd] public async Task MagicTheGathering([Leftover] string search) { @@ -255,45 +255,38 @@ public partial class Searches : EllieModule } [Cmd] - public async Task UrbanDict([Leftover] string query = null) + public async Task UrbanDict([Leftover] string query) { if (!await ValidateQuery(query)) return; await ctx.Channel.TriggerTypingAsync(); - using (var http = _httpFactory.CreateClient()) + using var http = _httpFactory.CreateClient(); + var res = await http.GetStringAsync($"https://api.urbandictionary.com/v0/define?" + + $"term={Uri.EscapeDataString(query)}"); + var allItems = JsonConvert.DeserializeObject(res)?.List; + + if (allItems is null or { Length: 0 }) { - var res = await http.GetStringAsync( - $"https://api.urbandictionary.com/v0/define?term={Uri.EscapeDataString(query)}"); - try - { - var allItems = JsonConvert.DeserializeObject(res).List; - if (allItems.Any()) - { - await Response() - .Paginated() - .Items(allItems) - .PageSize(1) - .CurrentPage(0) - .Page((items, _) => - { - var item = items[0]; - return _sender.CreateEmbed() - .WithOkColor() - .WithUrl(item.Permalink) - .WithTitle(item.Word) - .WithDescription(item.Definition); - }) - .SendAsync(); - return; - } - } - catch - { - } + await Response().Error(strs.ud_error).SendAsync(); + return; } - await Response().Error(strs.ud_error).SendAsync(); + await Response() + .Paginated() + .Items(allItems) + .PageSize(1) + .CurrentPage(0) + .Page((items, _) => + { + var item = items[0]; + return _sender.CreateEmbed() + .WithOkColor() + .WithUrl(item.Permalink) + .WithTitle(item.Word) + .WithDescription(item.Definition); + }) + .SendAsync(); } [Cmd] @@ -350,7 +343,7 @@ public partial class Searches : EllieModule [Cmd] public async Task Wiki([Leftover] string query) { - query = query?.Trim(); + query = query.Trim(); if (!await ValidateQuery(query)) return; @@ -392,16 +385,17 @@ public partial class Searches : EllieModule for (var i = 0; i < colorObjects.Length; i++) { var x = i * 50; - img.Mutate(m => m.FillPolygon(colorObjects[i], new(x, 0), new(x + 50, 0), new(x + 50, 50), new(x, 50))); + var j = i; + img.Mutate(m => m.FillPolygon(colorObjects[j], new(x, 0), new(x + 50, 0), new(x + 50, 50), new(x, 50))); } - await using var ms = img.ToStream(); + await using var ms = await img.ToStreamAsync(); await ctx.Channel.SendFileAsync(ms, "colors.png"); } [Cmd] [RequireContext(ContextType.Guild)] - public async Task Avatar([Leftover] IGuildUser usr = null) + public async Task Avatar([Leftover] IGuildUser? usr = null) { usr ??= (IGuildUser)ctx.User; diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 8d378c7..51dba44 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -63,10 +63,8 @@ greet: greetmsg: desc: |- Sets a new join announcement message which will be shown in the current channel. - Write `%user.mention%` if you want to mention the new member. - Full list of placeholders can be found here Using this command with no message will show the current greet message. - You can use embed json from instead of regular text, if you want the message to be embedded. + Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) ex: - Welcome, %user.mention%. params: @@ -80,11 +78,9 @@ bye: - {} byemsg: desc: |- - Sets a new leave announcement message which will be shown in the current channel. - Type `%user.name%` to show the name of the user who left. - Full list of placeholders can be found here + Sets a new leave announcement message which will be shown in the current channel. Using this command with no message will show the current bye message. - You can use embed json from instead of regular text, if you want the message to be embedded. + Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) ex: - '%user.name% has left.' params: @@ -113,7 +109,9 @@ greettest: - user: desc: "The user to impersonate when sending the greeting, defaulting to yourself if not specified." boosttest: - desc: Sends the boost message in the current channel as if you just boosted the server. You can optionally specify a different user. + desc: |- + Sends the boost message in the current channel as if you just boosted the server. + You can optionally specify a different user. ex: - '' - '@SomeoneElse' @@ -145,10 +143,8 @@ boost: boostmsg: desc: |- Sets a new boost announcement message which will be shown in the current channel. - Type `%user.mention%` if you want to mention the booster. - Full list of placeholders can be found here Using this command with no message will show the current boost message. - You can use embed json from instead of regular text, if you want the message to be embedded. + Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) ex: - '%user.mention% has boosted the server!!!' params: @@ -3083,7 +3079,7 @@ banmessage: - '{{ "description": "%ban.user% you have been banned from %server.name% by %ban.mod%" }}' params: - message: - desc: "The custom message to be displayed when a user is banned from the server, allowing for placeholders to be replaced with relevant information." + desc: "The custom message to be displayed when a user is banned from the server." banmessagetest: desc: If ban message is not disabled, bot will send you the message as if you were banned by yourself. Used for testing the ban message. ex: -- 2.43.0 From a8aa1d909fe1676360455ab7d0c0fa74742102fd Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 7 Aug 2024 11:49:24 +1200 Subject: [PATCH 078/253] doing 'gencmdlist will now generate a data/commandlist.json which is the same as the file you receive in discord --- src/EllieBot/Modules/Help/Help.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EllieBot/Modules/Help/Help.cs b/src/EllieBot/Modules/Help/Help.cs index f8fe29b..95fabd6 100644 --- a/src/EllieBot/Modules/Help/Help.cs +++ b/src/EllieBot/Modules/Help/Help.cs @@ -509,6 +509,7 @@ public sealed partial class Help : EllieModule // send the indented file to chat await using var rDataStream = new MemoryStream(Encoding.ASCII.GetBytes(readableData)); + await File.WriteAllTextAsync("data/commandlist.json", readableData); await ctx.Channel.SendFileAsync(rDataStream, "cmds.json", GetText(strs.commandlist_regen)); } -- 2.43.0 From 7a82f262f80534a4e57d4cf18846b710805622c2 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 7 Aug 2024 12:09:11 +1200 Subject: [PATCH 079/253] Updated Dockerfile Why did I not update this when 5.1 rleased? --- Dockerfile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index dcdedcf..889584a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,24 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +# Use the .NET 8.0 SDK as the base image for the build stage +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /source +# Copy the .csproj files for each project COPY src/Ellie.Marmalade/*.csproj src/Ellie.Marmalade/ COPY src/EllieBot/*.csproj src/EllieBot/ COPY src/EllieBot.Coordinator/*.csproj src/EllieBot.Coordinator/ COPY src/EllieBot.Generators/*.csproj src/EllieBot.Generators/ COPY src/EllieBot.Voice/*.csproj src/EllieBot.Voice/ -COPY NuGet.Config ./ + +# Restore the dependencies for the EllieBot project RUN dotnet restore src/EllieBot/ +# Copy the rest of the source code COPY . . + +# Set the working directory to the EllieBot project WORKDIR /source/src/EllieBot + +# Build and publish the EllieBot project, then clean up unnecessary files RUN set -xe; \ dotnet --version; \ dotnet publish -c Release -o /app --no-restore; \ @@ -19,28 +27,33 @@ RUN set -xe; \ find /app -type f -exec chmod -x {} \; ;\ chmod +x /app/EllieBot -# final stage/image -FROM mcr.microsoft.com/dotnet/runtime:6.0 +# Use the .NET 8.0 runtime as the base image for the final stage +FROM mcr.microsoft.com/dotnet/runtime:8.0 WORKDIR /app +# Create a new user, install dependencies, and set up sudoers file RUN set -xe; \ useradd -m ellie; \ apt-get update; \ apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 sudo; \ - update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1; \ echo 'Defaults>ellie env_keep+="ASPNETCORE_* DOTNET_* EllieBot_* shard_id total_shards TZ"' > /etc/sudoers.d/ellie; \ curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \ chmod a+rx /usr/local/bin/yt-dlp; \ apt-get autoremove -y; \ apt-get autoclean -y +# Copy the built application and the entrypoint script from the build stage COPY --from=build /app ./ COPY docker-entrypoint.sh /usr/local/sbin +# Set environment variables ENV shard_id=0 ENV total_shards=1 ENV EllieBot__creds=/app/data/creds.yml +# Define the data directory as a volume VOLUME [" /app/data "] + +# Set the entrypoint and default command ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ] CMD dotnet EllieBot.dll "$shard_id" "$total_shards" -- 2.43.0 From 6e0a129bc0209718b6e3c9cda3cb6bdc47c0b5a0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 8 Aug 2024 13:37:39 +1200 Subject: [PATCH 080/253] Afk messages should now be sent in DMs to prevent abuse Also updated EllieBot.sln --- EllieBot.sln | 1 - src/EllieBot/Modules/Utility/AfkService.cs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EllieBot.sln b/EllieBot.sln index f34ad17..7f96e39 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution migrate.ps1 = migrate.ps1 README.md = README.md remove-migrations.ps1 = remove-migrations.ps1 - TODO.md = TODO.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot", "src\EllieBot\EllieBot.csproj", "{4D9001F7-B3E8-48FE-97AA-CFD36DA65A64}" diff --git a/src/EllieBot/Modules/Utility/AfkService.cs b/src/EllieBot/Modules/Utility/AfkService.cs index d41169b..2ea269b 100644 --- a/src/EllieBot/Modules/Utility/AfkService.cs +++ b/src/EllieBot/Modules/Utility/AfkService.cs @@ -74,7 +74,7 @@ public sealed class AfkService : IEService, IReadyExecutor private Task TryTriggerAfkMessage(SocketMessage arg) { - if (arg.Author.IsBot) + if (arg.Author.IsBot || arg.Author.IsWebhook) return Task.CompletedTask; if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc) @@ -126,9 +126,10 @@ public sealed class AfkService : IEService, IReadyExecutor { var st = SmartText.CreateFrom(msg); - st = "The user is AFK: " + st; + st = $"The user you've pinged ({arg.Author}) is AFK: " + st; var toDelete = await _mss.Response(arg.Channel) + .User(arg.Author) .Message(uMsg) .Text(st) .Sanitize(false) -- 2.43.0 From c61f3f1433dd051b6f19aa247f47af0ecb828e6d Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 8 Aug 2024 13:46:32 +1200 Subject: [PATCH 081/253] fixed user id in afk message dm --- src/EllieBot/Modules/Utility/AfkService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Utility/AfkService.cs b/src/EllieBot/Modules/Utility/AfkService.cs index 2ea269b..18c5f2c 100644 --- a/src/EllieBot/Modules/Utility/AfkService.cs +++ b/src/EllieBot/Modules/Utility/AfkService.cs @@ -126,13 +126,12 @@ public sealed class AfkService : IEService, IReadyExecutor { var st = SmartText.CreateFrom(msg); - st = $"The user you've pinged ({arg.Author}) is AFK: " + st; + st = $"The user you've pinged (<#{mentionedUserId}>) is AFK: " + st; var toDelete = await _mss.Response(arg.Channel) .User(arg.Author) .Message(uMsg) .Text(st) - .Sanitize(false) .SendAsync(); toDelete.DeleteAfter(30); -- 2.43.0 From e26e2a7404f970cde822017a3ecfa82cd77aed62 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 8 Aug 2024 13:48:43 +1200 Subject: [PATCH 082/253] fixed one of the migrations which was preventing some bots from starting --- src/EllieBot/Migrations/MigrationQueries.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/EllieBot/Migrations/MigrationQueries.cs b/src/EllieBot/Migrations/MigrationQueries.cs index 3cd32d2..a20f4a3 100644 --- a/src/EllieBot/Migrations/MigrationQueries.cs +++ b/src/EllieBot/Migrations/MigrationQueries.cs @@ -49,5 +49,9 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;") builder.Sql($""" DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; """); + + builder.Sql(""" + DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); + """); } } \ No newline at end of file -- 2.43.0 From 09a4a69521915b9c89cd0d2ec4450366ad0d5035 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 8 Aug 2024 13:55:05 +1200 Subject: [PATCH 083/253] Updated changelog, upped version to 5.1.6 --- CHANGELOG.md | 7 ++++++- src/EllieBot/EllieBot.csproj | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 700a754..2688201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## Unreleased +## [5.1.6] - 08.08.2024 ### Added @@ -11,6 +11,11 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Changed - `'listservers` renamed to `'serverlist` + +### Fixed + +- `'afk` messages can no longer ping, and the response is moved to DMs to avoid abuse +- Possible fix for `'remind` timestamp ### Removed - Removed old bloat / semi broken / dumb commands diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 1f0a2f0..ff1c6ec 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.5 + 5.1.6 $(MSBuildProjectDirectory) -- 2.43.0 From b491f8d828883964bee1132c859afe9ffd3d243c Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 9 Aug 2024 14:29:00 +1200 Subject: [PATCH 084/253] fixed some command groups incorrectly showing up as modules --- CHANGELOG.md | 6 ++++++ src/EllieBot/EllieBot.csproj | 2 +- .../Administration/DangerousCommands/CleanupCommands.cs | 6 ++++-- src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs | 5 +++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2688201..55d60c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +## [5.1.7] - 09.08.2024 + +### Fixed + +- Fixed some command groups incorrectly showing up as modules + ## [5.1.6] - 08.08.2024 ### Added diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index ff1c6ec..b67381c 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.6 + 5.1.7 $(MSBuildProjectDirectory) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index e4e8e76..c49e77b 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -1,9 +1,11 @@ -namespace EllieBot.Modules.Administration.DangerousCommands; +using EllieBot.Modules.Administration.DangerousCommands; + +namespace EllieBot.Modules.Administration; public partial class Administration { [Group] - public class CleanupCommands : CleanupModuleBase + public partial class CleanupCommands : CleanupModuleBase { private readonly ICleanupService _svc; diff --git a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs index e4f3f04..1fd6cfd 100644 --- a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs +++ b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs @@ -1,8 +1,9 @@ namespace EllieBot.Modules.Utility; -public partial class UtilityCommands +public partial class Utility { - public class PromptCommands : EllieModule + [Group] + public partial class PromptCommands : EllieModule { [Cmd] [RequireContext(ContextType.Guild)] -- 2.43.0 From 0b6e15dad4bd8f243dcc73cb6c78a50d1e9e9b2a Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 9 Aug 2024 14:52:04 +1200 Subject: [PATCH 085/253] Updated EllieBot.sln to have my build script added so I can easily work on it --- EllieBot.sln | 1 + 1 file changed, 1 insertion(+) diff --git a/EllieBot.sln b/EllieBot.sln index 7f96e39..267f7b4 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B28FB883-968 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C633450-E6C2-47ED-A7AA-7367232F703A}" ProjectSection(SolutionItems) = preProject + build.ps1 = build.ps1 CHANGELOG.md = CHANGELOG.md Dockerfile = Dockerfile LICENSE = LICENSE -- 2.43.0 From 28ff1851d57db3db3ce51d8625406ae580910cb3 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 9 Aug 2024 17:13:43 +1200 Subject: [PATCH 086/253] Added embed links in command descriptions where missing --- src/EllieBot/data/strings/commands/commands.en-US.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 51dba44..817d774 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -3746,7 +3746,7 @@ say: Make the bot say something, or in other words, make the bot send the message. You can optionally specify the channel where the bot will send the message. If you omit the channel name, it will send the message in the current channel. - Supports embeds. + Supports [embeds](https://eb.elliebot.net/) ex: - hi - '#chat hi' @@ -4049,7 +4049,9 @@ quran: - ayah: desc: "The number of the ayah in the Quran, for example 2:255." edit: - desc: Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel. Supports embeds. + desc: |- + Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel. + Supports [embeds](https://eb.elliebot.net/) ex: - 7479498384 Hi :^) - '#other-channel 771562360594628608 New message!' @@ -4245,7 +4247,9 @@ patron: - user: desc: "The ID or handle of the user whose patronage status is being checked." patronmessage: - desc: Sends a message to all patrons of the specified tier and higher. Supports embeds. + desc: |- + Sends a message to all patrons of the specified tier and higher. + Supports [embeds](https://eb.elliebot.net/) ex: - x hello params: -- 2.43.0 From 56d1c7920564c86fd01f935504ba153092b341e0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 9 Aug 2024 18:22:27 +1200 Subject: [PATCH 087/253] Added commandlist --- src/EllieBot/data/commandlist.json | 7792 ++++++++++++++++++++++++++++ 1 file changed, 7792 insertions(+) create mode 100644 src/EllieBot/data/commandlist.json diff --git a/src/EllieBot/data/commandlist.json b/src/EllieBot/data/commandlist.json new file mode 100644 index 0000000..c549ef0 --- /dev/null +++ b/src/EllieBot/data/commandlist.json @@ -0,0 +1,7792 @@ +{ + "Administration": [ + { + "Aliases": [ + ".imageonlychannel", + ".imageonly", + ".imagesonly" + ], + "Description": "Toggles whether the channel only allows images.\nUsers who send more than a few non-image messages will be banned from using the channel. ", + "Usage": [ + ".imageonlychannel" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".linkonlychannel", + ".linkonly", + ".linkssonly" + ], + "Description": "Toggles whether the channel only allows links.\nUsers who send more than a few non-link messages will be banned from using the channel. ", + "Usage": [ + ".linkonlychannel" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".slowmode" + ], + "Description": "Toggles slowmode on the current channel with the specified amount of time. Provide no parameters to disable.", + "Usage": [ + ".slowmode", + ".slowmode 27s", + ".slowmode 3h15m5s" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Channel Permission" + ] + }, + { + "Aliases": [ + ".delmsgoncmd", + ".dmc" + ], + "Description": "Toggles the automatic deletion of the user's successful command message to prevent chat flood. You can use it either as a server toggle, channel whitelist, or channel blacklist, as channel option has 3 settings: Enable (always do it on this channel), Disable (never do it on this channel), and Inherit (respect server setting). Use `list` parameter to see the current states.", + "Usage": [ + ".delmsgoncmd", + ".delmsgoncmd channel enable", + ".delmsgoncmd ch inherit", + ".delmsgoncmd list" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".deafen", + ".deaf" + ], + "Description": "Deafens mentioned user or users.", + "Usage": [ + ".deafen \"@Someguy\"", + ".deafen \"@Someguy\" \"@Someguy\"" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "DeafenMembers Server Permission" + ] + }, + { + "Aliases": [ + ".undeafen", + ".undef" + ], + "Description": "Undeafens mentioned user or users.", + "Usage": [ + ".undeafen \"@Someguy\"", + ".undeafen \"@Someguy\" \"@Someguy\"" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "DeafenMembers Server Permission" + ] + }, + { + "Aliases": [ + ".delvoichanl", + ".dvch" + ], + "Description": "Deletes a voice channel with a given name.", + "Usage": [ + ".delvoichanl VoiceChannelName" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".creatvoichanl", + ".cvch" + ], + "Description": "Creates a new voice channel with a given name.", + "Usage": [ + ".creatvoichanl VoiceChannelName" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".deltxtchanl", + ".dtch" + ], + "Description": "Deletes a text channel with a given name.", + "Usage": [ + ".deltxtchanl TextChannelName" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".creatxtchanl", + ".ctch" + ], + "Description": "Creates a new text channel with a given name.", + "Usage": [ + ".creatxtchanl TextChannelName" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".settopic", + ".st" + ], + "Description": "Sets a topic on the current channel.", + "Usage": [ + ".settopic My new topic" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".setchanlname", + ".schn" + ], + "Description": "Changes the name of the current channel.", + "Usage": [ + ".setchanlname NewName" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".nsfwtoggle", + ".artoggle" + ], + "Description": "Toggles whether the current channel is age-restricted.", + "Usage": [ + ".nsfwtoggle" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageChannels Server Permission" + ] + }, + { + "Aliases": [ + ".edit" + ], + "Description": "Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel.\nSupports [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".edit 7479498384 Hi :^)", + ".edit #other-channel 771562360594628608 New message!", + ".edit #other-channel 771562360594628608 {\"description\":\"hello\"}" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageMessages Channel Permission" + ] + }, + { + "Aliases": [ + ".delete", + ".del" + ], + "Description": "Deletes a single message given the channel and message ID. If channel is ommited, message will be searched for in the current channel. You can also specify time parameter after which the message will be deleted (up to 7 days). This timer won't persist through bot restarts.", + "Usage": [ + ".delete #chat 771562360594628608", + ".delete 771562360594628608", + ".delete 771562360594628608 5m" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageMessages Channel Permission" + ] + }, + { + "Aliases": [ + ".threadcreate", + ".thcr" + ], + "Description": "Create a public thread with the specified title. You may optionally reply to a message to have it as a starting point.", + "Usage": [ + ".threadcreate Q&A" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "CreatePublicThreads Channel Permission" + ] + }, + { + "Aliases": [ + ".threaddelete", + ".thdel", + ".thrm" + ], + "Description": "Delete a thread with the specified name in this channel. Case insensitive.", + "Usage": [ + ".threaddelete Q&A" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageThreads Channel Permission" + ] + }, + { + "Aliases": [ + ".autopublish" + ], + "Description": "Make the bot automatically publish all messages posted in the news channel this command was executed in.", + "Usage": [ + ".autopublish" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageMessages Channel Permission" + ] + }, + { + "Aliases": [ + ".setnick" + ], + "Description": "Changes the nickname of the bot on this server. You can also target other users to change their nickname.", + "Usage": [ + ".setnick BotNickname", + ".setnick @SomeUser New Nickname" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageNicknames Server Permission" + ] + }, + { + "Aliases": [ + ".setserverbanner", + ".serverbanner" + ], + "Description": "Sets a new banner image for the current server. Parameter is a direct link to an image.", + "Usage": [ + ".setserverbanner https://cdn.elliebot.net/Ellie.png" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".setservericon", + ".servericon" + ], + "Description": "Sets a new icon image for the current server. Parameter is a direct link to an image.", + "Usage": [ + ".setservericon https://cdn.elliebot.net/Ellie.png" + ], + "Submodule": "Administration", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".autoassignrole", + ".aar" + ], + "Description": "Toggles the role which will be assigned to every user who joins the server.\nYou can run this command multiple times to add multiple roles (up to 3).\nSpecifying the role that is already added will remove that role from the list.\nProvide no parameters to list current roles.", + "Usage": [ + ".autoassignrole", + ".autoassignrole RoleName" + ], + "Submodule": "AutoAssignRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".cleanupguilddata" + ], + "Description": "Deletes data for all servers bot is no longer a member of from the database.\nThis is a highly destructive and irreversible command.", + "Usage": [ + ".cleanupguilddata" + ], + "Submodule": "CleanupCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".keep" + ], + "Description": "The current serve, won't be deleted from Ellie's database during the purge.", + "Usage": [ + ".keep" + ], + "Submodule": "CleanupCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".sqlselect" + ], + "Description": "Executes provided sql query and returns the results. Dangerous.", + "Usage": [ + ".sqlselect SELECT * FROM DiscordUser LIMIT 5" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".sqlselectcsv" + ], + "Description": "Executes provided sql query and returns the results in a csv file. Dangerous.", + "Usage": [ + ".sqlselectcsv SELECT * FROM DiscordUser LIMIT 5" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".sqlexec" + ], + "Description": "Executes provided sql command and returns the number of affected rows. Dangerous.", + "Usage": [ + ".sqlexec UPDATE DiscordUser SET CurrencyAmount=CurrencyAmount+1234" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".purgeuser" + ], + "Description": "Purge user from the database completely. This includes currency, xp, clubs that user owns, waifu info", + "Usage": [ + ".purgeuser @Oblivion" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deletexp" + ], + "Description": "Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0.", + "Usage": [ + ".deletexp" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deletewaifus" + ], + "Description": "Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables.", + "Usage": [ + ".deletewaifus" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deletewaifu" + ], + "Description": "Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables for the specified user. Also makes specified user's waifus free.", + "Usage": [ + ".deletewaifu" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deletecurrency" + ], + "Description": "Deletes everything from Currency and CurrencyTransactions.", + "Usage": [ + ".deletecurrency" + ], + "Submodule": "DangerousCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".gamevoicechannel", + ".gvc" + ], + "Description": "Toggles game voice channel feature in the voice channel you're currently in. Users who join the game voice channel will get automatically redirected to the voice channel with the name of their current game, if it exists. Can't move users to channels that the bot has no connect permission for. One per server.", + "Usage": [ + ".gamevoicechannel" + ], + "Submodule": "GameVoiceChannelCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".boost" + ], + "Description": "Toggles announcements on the current channel when someone boosts the server.", + "Usage": [ + ".boost" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".boostdel" + ], + "Description": "Sets the time it takes (in seconds) for boost messages to be auto-deleted. Set it to `0` to disable automatic deletion.", + "Usage": [ + ".boostdel 0", + ".boostdel 30" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".boostmsg" + ], + "Description": "Sets a new boost announcement message which will be shown in the current channel. \nUsing this command with no message will show the current boost message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".boostmsg %user.mention% has boosted the server!!!" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greetdel", + ".grdel" + ], + "Description": "Sets the time it takes (in seconds) for greet messages to be auto-deleted. Set it to `0` to disable automatic deletion.", + "Usage": [ + ".greetdel 0", + ".greetdel 30" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greet" + ], + "Description": "Toggles announcements on the current channel when someone joins the server.", + "Usage": [ + ".greet" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greetmsg" + ], + "Description": "Sets a new join announcement message which will be shown in the current channel.\nUsing this command with no message will show the current greet message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".greetmsg Welcome, %user.mention%." + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greetdm" + ], + "Description": "Toggles whether greet messages will be sent in a DM (This is separate from `.greet` - you can have both, one or neither enabled).", + "Usage": [ + ".greetdm" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greetdmmsg" + ], + "Description": "Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded.", + "Usage": [ + ".greetdmmsg Welcome to the server, %user.mention%" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".bye" + ], + "Description": "Toggles announcements on the current channel when someone leaves the server.", + "Usage": [ + ".bye" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".byemsg" + ], + "Description": "Sets a new leave announcement message which will be shown in the current channel. \nUsing this command with no message will show the current bye message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".byemsg %user.name% has left." + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".byedel" + ], + "Description": "Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set it to `0` to disable automatic deletion.", + "Usage": [ + ".byedel 0", + ".byedel 30" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".byetest" + ], + "Description": "Sends the bye message in the current channel as if you just left the server. You can optionally specify a different user.", + "Usage": [ + ".byetest", + ".byetest @SomeoneElse" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greettest" + ], + "Description": "Sends the greet message in the current channel as if you just joined the server. You can optionally specify a different user.", + "Usage": [ + ".greettest", + ".greettest @SomeoneElse" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".greetdmtest" + ], + "Description": "Sends the greet direct message to you as if you just joined the server. You can optionally specify a different user.", + "Usage": [ + ".greetdmtest", + ".greetdmtest @SomeoneElse" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".boosttest" + ], + "Description": "Sends the boost message in the current channel as if you just boosted the server.\nYou can optionally specify a different user.", + "Usage": [ + ".boosttest", + ".boosttest @SomeoneElse" + ], + "Submodule": "GreetCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageServer Server Permission" + ] + }, + { + "Aliases": [ + ".honeypot" + ], + "Description": "Toggles honeypot on the current channel.\nAnyone sending a message in this channel will be soft banned. (Banned and then unbanned)\nThis is useful for automatically getting rid of spam bots.", + "Usage": [ + ".honeypot" + ], + "Submodule": "HoneypotCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".languageset", + ".langset" + ], + "Description": "Sets this server's response language. If bot's response strings have been translated to that language, bot will use that language in this server. Reset by using `default` as the locale name. Provide no parameters to see currently set language.", + "Usage": [ + ".languageset de-DE", + ".languageset default" + ], + "Submodule": "LocalizationCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".langsetdefault", + ".langsetd" + ], + "Description": "Sets the bot's default response language. All servers which use a default locale will use this one. Setting to `default` will use the host's current culture. Provide no parameters to see currently set language.", + "Usage": [ + ".langsetdefault en-US", + ".langsetdefault default" + ], + "Submodule": "LocalizationCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".languageslist", + ".langli" + ], + "Description": "List of languages for which translation (or part of it) exist atm.", + "Usage": [ + ".languageslist" + ], + "Submodule": "LocalizationCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".muterole", + ".setmuterole" + ], + "Description": "Sets a name of the role which will be assigned to people who should be muted. Provide no arguments to see currently set mute role. Default is ellie-mute.", + "Usage": [ + ".muterole", + ".muterole Silenced" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".mute" + ], + "Description": "Mutes a mentioned user both from speaking and chatting. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", + "Usage": [ + ".mute @Someone", + ".mute @Someone too noisy", + ".mute 1h30m @Someone", + ".mute 1h30m @Someone too noisy" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "MuteMembers, ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".unmute" + ], + "Description": "Unmutes a mentioned user previously muted with `.mute` command.", + "Usage": [ + ".unmute @Someone" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "MuteMembers, ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".chatmute" + ], + "Description": "Prevents a mentioned user from chatting in text channels. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", + "Usage": [ + ".chatmute @Someone", + ".chatmute @Someone stop writing", + ".chatmute 15m @Someone", + ".chatmute 1h30m @Someone", + ".chatmute 1h @Someone chill" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".chatunmute" + ], + "Description": "Removes a mute role previously set on a mentioned user with `.chatmute` which prevented him from chatting in text channels.", + "Usage": [ + ".chatunmute @Someone" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".voicemute" + ], + "Description": "Prevents a mentioned user from speaking in voice channels. User has to be in a voice channel in order for the command to have an effect. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", + "Usage": [ + ".voicemute @Someone", + ".voicemute @Someone stop talking", + ".voicemute 15m @Someone", + ".voicemute 1h30m @Someone", + ".voicemute 1h @Someone silence" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "MuteMembers Server Permission" + ] + }, + { + "Aliases": [ + ".voiceunmute" + ], + "Description": "Gives a previously voice-muted user a permission to speak.", + "Usage": [ + ".voiceunmute @Someguy" + ], + "Submodule": "MuteCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "MuteMembers Server Permission" + ] + }, + { + "Aliases": [ + ".dpo" + ], + "Description": "Overrides required user permissions that the command has with the specified ones. You can only use server-level permissions. This action will make the bot ignore user permission requirements which command has by default. Provide no permissions to reset to default.", + "Usage": [ + ".dpo .prune ManageMessages BanMembers", + ".dpo .prune" + ], + "Submodule": "DiscordPermOverrideCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".dpor" + ], + "Description": "Resets ALL currently set discord permission overrides on this server. This will make all commands have default discord permission requirements.", + "Usage": [ + ".dpor" + ], + "Submodule": "DiscordPermOverrideCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".dpol", + ".dpoli" + ], + "Description": "Lists all discord permission overrides on this server.", + "Usage": [ + ".dpol" + ], + "Submodule": "DiscordPermOverrideCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".rotateplaying", + ".ropl" + ], + "Description": "Toggles rotation of playing status of the dynamic strings you previously specified.", + "Usage": [ + ".rotateplaying" + ], + "Submodule": "PlayingRotateCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".addplaying", + ".adpl" + ], + "Description": "Adds a specified string to the list of playing strings to rotate. You have to pick either `Playing`, `Watching` or `Listening` as the first parameter.", + "Usage": [ + ".addplaying Playing with you", + ".addplaying Watching you sleep" + ], + "Submodule": "PlayingRotateCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".listplaying", + ".lipl" + ], + "Description": "Lists all playing statuses and their indexes.", + "Usage": [ + ".listplaying" + ], + "Submodule": "PlayingRotateCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".removeplaying", + ".rmpl" + ], + "Description": "Removes a playing status by index. Use `.lipl` to see indexes.", + "Usage": [ + ".removeplaying" + ], + "Submodule": "PlayingRotateCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".prefix" + ], + "Description": "Sets this server's prefix for all bot commands. Provide no parameters to see the current server prefix. **Setting prefix requires Administrator server permission.**", + "Usage": [ + ".prefix +" + ], + "Submodule": "PrefixCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".defprefix" + ], + "Description": "Sets bot's default prefix for all bot commands. Provide no parameters to see the current default prefix. This will not change this server's current prefix.", + "Usage": [ + ".defprefix +" + ], + "Submodule": "PrefixCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".antialt" + ], + "Description": "Applies a punishment action to any user whose account is younger than the specified threshold. Specify time after the punishment to have a timed punishment (not all punishments support timers).", + "Usage": [ + ".antialt 1h Ban", + ".antialt 3d Mute 1h" + ], + "Submodule": "ProtectionCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".antiraid" + ], + "Description": "Sets an anti-raid protection on the server. Provide no parameters to disable. First parameter is number of people which will trigger the protection. Second parameter is a time interval in which that number of people needs to join in order to trigger the protection, and third parameter is punishment for those people. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut", + "Usage": [ + ".antiraid 5 20 Kick", + ".antiraid 7 9 Ban", + ".antiraid 10 10 Ban 6h30m", + ".antiraid" + ], + "Submodule": "ProtectionCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".antispam" + ], + "Description": "Stops people from repeating same message X times in a row. Provide no parameters to disable. You can specify to either mute, kick or ban the offenders. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Max message count is 10. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles, Warn, TimeOut", + "Usage": [ + ".antispam 3 Mute", + ".antispam 5 Ban", + ".antispam 5 Ban 3h30m", + ".antispam" + ], + "Submodule": "ProtectionCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".antispamignore" + ], + "Description": "Toggles whether antispam ignores current channel. Antispam must be enabled.", + "Usage": [ + ".antispamignore" + ], + "Submodule": "ProtectionCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".antilist", + ".antilst" + ], + "Description": "Shows currently enabled protection features.", + "Usage": [ + ".antilist" + ], + "Submodule": "ProtectionCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".prune", + ".clear" + ], + "Description": "`.prune` removes all Ellie's messages in the last 100 messages. `.prune X` removes last `X` number of messages from the channel (up to 100). `.prune @Someone` removes all Someone's messages in the last 100 messages. `.prune @Someone X` removes last `X` number of 'Someone's' messages in the channel.", + "Usage": [ + ".prune", + ".prune -s", + ".prune 5", + ".prune 5 --safe", + ".prune @Someone", + ".prune @Someone --safe", + ".prune @Someone X", + ".prune @Someone X -s" + ], + "Submodule": "PruneCommands", + "Module": "Administration", + "Options": [ + "`--safe` (`-s`) Whether pinned messages should be deleted. ", + "`--after` (`-a`) Prune only messages after the specified message ID. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".prunecancel", + ".prunec" + ], + "Description": "Cancels an active prune if there is any.", + "Usage": [ + ".prunecancel" + ], + "Submodule": "PruneCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageMessages Channel Permission" + ] + }, + { + "Aliases": [ + ".reroadd", + ".reroa" + ], + "Description": "Specify a message id, emote and a role name to have the bot assign the specified role to the user who reacts to the specified message (in this channel) with the specified emoji.\nYou can optionally specify an exclusivity group. Default is group 0 which is non-exclusive. Other groups are exclusive. Exclusive groups will let the user only have one of the roles specified in that group.\nYou can optionally specify a level requirement after a group. Users who don't meet the level requirement will not receive the role.\nYou can have up to 50 reaction roles per server in total.", + "Usage": [ + ".reroadd 971276352684691466 😊 gamer", + ".reroadd 971276352684691466 😢 emo 1", + ".reroadd 971276352684691466 🤔 philosopher 5 20", + ".reroadd 971276352684691466 👨 normie 5 20" + ], + "Submodule": "ReactionRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rerolist", + ".reroli" + ], + "Description": "Lists all ReactionRole messages on this server with their message ids. Clicking/Tapping message ids will send you to that message.", + "Usage": [ + ".rerolist" + ], + "Submodule": "ReactionRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".reroremove", + ".rerorm" + ], + "Description": "Remove all reaction roles from message specified by the id", + "Usage": [ + ".reroremove 971276352684691466" + ], + "Submodule": "ReactionRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rerodeleteall", + ".rerodela" + ], + "Description": "Deletes all reaction roles on the server. This action is irreversible.", + "Usage": [ + ".rerodeleteall" + ], + "Submodule": "ReactionRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rerotransfer", + ".rerot" + ], + "Description": "Transfers reaction roles from one message to another by specifying their ids. If the target message has reaction roles specified already, the reaction roles will be MERGED, not overwritten.", + "Usage": [ + ".rerotransfer 971276352684691466 971427748448964628" + ], + "Submodule": "ReactionRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".setrole", + ".sr", + ".giverole" + ], + "Description": "Gives a role to a user. The role you specify has to be lower in the role hierarchy than your highest role.", + "Usage": [ + ".setrole @User Guest" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".removerole", + ".rr" + ], + "Description": "Removes a role from a user. The role you specify has to be lower in the role hierarchy than your highest role.", + "Usage": [ + ".removerole @User Admin" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".renamerole", + ".renr" + ], + "Description": "Renames a role. The role you specify has to be lower in the role hierarchy than your highest role.", + "Usage": [ + ".renamerole \"First role\" SecondRole" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".removeallroles", + ".rar" + ], + "Description": "Removes all roles which are lower than your highest role in the role hierarchy from the user you specify.", + "Usage": [ + ".removeallroles @User" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".createrole", + ".cr" + ], + "Description": "Creates a role with a given name.", + "Usage": [ + ".createrole Awesome Role" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".deleterole", + ".dr" + ], + "Description": "Deletes a role with a given name.", + "Usage": [ + ".deleterole Awesome Role" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rolehoist", + ".rh" + ], + "Description": "Toggles whether this role is displayed in the sidebar or not. The role you specify has to be lower in the role hierarchy than your highest role.", + "Usage": [ + ".rolehoist Guests", + ".rolehoist Space Wizards" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rolecolor", + ".roleclr" + ], + "Description": "Set a role's color using its hex value. Provide no color in order to see the hex value of the color of the specified role. The role you specify has to be lower in the role hierarchy than your highest role.", + "Usage": [ + ".rolecolor Admin", + ".rolecolor ffba55 Admin" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".stickyroles" + ], + "Description": "Toggles whether the bot will save the leaving users' roles, and reapply them once they re-join. The roles will be stored for up to 30 days.", + "Usage": [ + ".stickyroles" + ], + "Submodule": "RoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".adsarm" + ], + "Description": "Toggles the automatic deletion of the user's message and Ellie's confirmations for `.iam` and `.iamn` commands.", + "Usage": [ + ".adsarm" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".asar" + ], + "Description": "Adds a role to the list of self-assignable roles. You can also specify a group. If 'Exclusive self-assignable roles' feature is enabled (`.tesar`), users will be able to pick one role per group.", + "Usage": [ + ".asar Gamer", + ".asar 1 Alliance", + ".asar 1 Horde" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".sargn" + ], + "Description": "Sets a self assignable role group name. Provide no name to remove.", + "Usage": [ + ".sargn 1 Faction", + ".sargn 2" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rsar" + ], + "Description": "Removes a specified role from the list of self-assignable roles.", + "Usage": [ + ".rsar Gamer", + ".rsar Alliance", + ".rsar Horde" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".lsar" + ], + "Description": "Lists self-assignable roles. Shows 20 roles per page.", + "Usage": [ + ".lsar", + ".lsar 2" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".togglexclsar", + ".tesar" + ], + "Description": "Toggles whether self-assigned roles are exclusive. While enabled, users can only have one self-assignable role per group.", + "Usage": [ + ".togglexclsar" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".rolelevelreq", + ".rlr" + ], + "Description": "Set a level requirement on a self-assignable role.", + "Usage": [ + ".rolelevelreq 5 SomeRole" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".iam" + ], + "Description": "Adds a role to you that you choose. Role must be on the list of self-assignable roles.", + "Usage": [ + ".iam Gamer" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".iamnot", + ".iamn" + ], + "Description": "Removes a specified role from you. Role must be on the list of self-assignable roles.", + "Usage": [ + ".iamnot Gamer" + ], + "Submodule": "SelfAssignedRolesCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".cacheusers" + ], + "Description": "Caches users of a Discord server and saves them to the database.", + "Usage": [ + ".cacheusers", + ".cacheusers serverId" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".doas", + ".execas" + ], + "Description": "Execute the command as if you were the target user. Requires bot ownership and server administrator permission.", + "Usage": [ + ".doas @Thief .give all @Admin" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".scadd", + ".startcmdadd" + ], + "Description": "Adds a command to the list of commands which will be executed automatically in the current channel, in the order they were added in, by the bot when it startups up.", + "Usage": [ + ".scadd .stats" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".acadd", + ".autocmdadd" + ], + "Description": "Adds a command to the list of commands which will be executed automatically every X seconds.", + "Usage": [ + ".acadd 60 .prune 1000" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".sclist", + ".startcmdlist" + ], + "Description": "Lists all startup commands in the order they will be executed in.", + "Usage": [ + ".sclist" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".aclist", + ".autolist", + ".autocommands", + ".autocmdlist" + ], + "Description": "Lists all auto commands and the intervals in which they execute.", + "Usage": [ + ".aclist" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".wait" + ], + "Description": "Used only as a startup command. Waits a certain number of milliseconds before continuing the execution of the following startup commands.", + "Usage": [ + ".wait 3000" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".acrm", + ".autocmdrm" + ], + "Description": "Removes an auto command on the specified index.", + "Usage": [ + ".acrm 3" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".scrm", + ".startcmdrm" + ], + "Description": "Removes a startup command on the specified index.", + "Usage": [ + ".scrm 3" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".scclear", + ".scclr" + ], + "Description": "Removes all startup commands.", + "Usage": [ + ".scclear" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".forwardmessages", + ".fwmsgs" + ], + "Description": "Toggles forwarding of non-command messages sent to bot's DM to the bot owners", + "Usage": [ + ".forwardmessages" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".forwardtoall", + ".fwtoall" + ], + "Description": "Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the creds.yml file", + "Usage": [ + ".forwardtoall" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".forwardtochannel", + ".fwtoch", + ".fwtochannel" + ], + "Description": "Toggles forwarding of non-command messages sent to bot's DM to the current channel", + "Usage": [ + ".forwardtochannel" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".shardstats" + ], + "Description": "Stats for shards. Paginated with 25 shards per page.\nFormat: `[status] | # [shard_id] | [last_heartbeat] | [server_count]`", + "Usage": [ + ".shardstats", + ".shardstats 2" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".restartshard" + ], + "Description": "Try (re)connecting a shard with a certain shardid when it dies. No one knows will it work. Keep an eye on the console for errors.", + "Usage": [ + ".restartshard 2" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".leave" + ], + "Description": "Makes Ellie leave the server. Either server name or server ID is required.", + "Usage": [ + ".leave 123123123331" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".deleteemptyservers" + ], + "Description": "Deletes all servers in which the bot is the only member.", + "Usage": [ + ".deleteemptyservers" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".die" + ], + "Description": "Shuts the bot down.", + "Usage": [ + ".die" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".restart" + ], + "Description": "Restarts the bot. Might not work.", + "Usage": [ + ".restart" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setname", + ".newnm" + ], + "Description": "Gives the bot a new name.", + "Usage": [ + ".setname BotName" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setstatus" + ], + "Description": "Sets the bot's status. (Online/Idle/Dnd/Invisible)", + "Usage": [ + ".setstatus Idle" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setavatar", + ".setav" + ], + "Description": "Sets a new avatar image for the EllieBot. Parameter is a direct link to an image.", + "Usage": [ + ".setavatar https://cdn.elliebot.net/Ellie.png" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setbanner" + ], + "Description": "Sets a new banner image for the EllieBot. Parameter is a direct link to an image. Supports gifs.", + "Usage": [ + ".setbanner https://cdn.elliebot.net/Ellie.png" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setgame" + ], + "Description": "Sets the bots game status to either Playing, Listening, or Watching.", + "Usage": [ + ".setgame Playing with snakes.", + ".setgame Watching anime.", + ".setgame Listening music." + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".setstream" + ], + "Description": "Sets the bots stream. First parameter is the twitch link, second parameter is stream name.", + "Usage": [ + ".setstream TWITCHLINK Hello" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".send" + ], + "Description": "Sends a message to a channel or user.\nYou can write \"channel\" (literally word 'channel') first followed by the channel id or channel mention, or\nYou can write \"user\" (literally word 'user') first followed by the user id or user mention.\nAfter either one of those, specify the message to be sent.\nThis command can only be used by the Bot Owner.", + "Usage": [ + ".send channel 123123123132312 Stop spamming commands plz", + ".send user 1231231232132 I can see in the console what you're doing." + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".stringsreload" + ], + "Description": "Reloads localized bot strings.", + "Usage": [ + ".stringsreload" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".coordreload" + ], + "Description": "Reloads coordinator config", + "Usage": [ + ".coordreload" + ], + "Submodule": "SelfCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".logserver" + ], + "Description": "Enables or Disables ALL log events. If enabled, all log events will log to this channel.", + "Usage": [ + ".logserver enable", + ".logserver disable" + ], + "Submodule": "LogCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".logignore" + ], + "Description": "Toggles whether the `.log` and `.logserver` commands ignore the specified channel or user. Provide no arguments to see the list of currently ignored users and channels.", + "Usage": [ + ".logignore", + ".logignore @SomeUser", + ".logignore #some-channel" + ], + "Submodule": "LogCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".logevents" + ], + "Description": "Shows a list of all events you can subscribe to with `.log`", + "Usage": [ + ".logevents" + ], + "Submodule": "LogCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".log" + ], + "Description": "Toggles logging event. Disables it if it is active anywhere on the server. Enables if it isn't active. Use `.logevents` to see a list of all events you can subscribe to.", + "Usage": [ + ".log userpresence", + ".log userbanned" + ], + "Submodule": "LogCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".timezones" + ], + "Description": "Lists all timezones available on the system to be used with `.timezone`.", + "Usage": [ + ".timezones" + ], + "Submodule": "TimeZoneCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".timezone" + ], + "Description": "Sets this guilds timezone. This affects bot's time output in this server (logs, etc..) **Setting timezone requires Administrator server permission.**", + "Usage": [ + ".timezone", + ".timezone GMT Standard Time" + ], + "Submodule": "TimeZoneCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".warn" + ], + "Description": "Warns a user with an optional reason.\nYou can specify a warning weight integer before the user. For example, 3 would mean that this warning counts as 3 warnings.", + "Usage": [ + ".warn @Someone Very rude person", + ".warn 3 @Someone Very rude person" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".warnexpire", + ".warne" + ], + "Description": "Gets or sets the number of days after which the warnings will be cleared automatically. This setting works retroactively. If you want to delete the warnings instead of clearing them, you can set the `--delete` optional parameter. Provide no parameter to see currently set expiry", + "Usage": [ + ".warnexpire", + ".warnexpire 3", + ".warnexpire 6 --delete" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": [ + "`--delete` (`-d`) Delete warnings instead of clearing them. " + ], + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".warnlog" + ], + "Description": "See a list of warnings of a certain user.", + "Usage": [ + ".warnlog @Someone" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".warnlogall" + ], + "Description": "See a list of all warnings on the server. 15 users per page.", + "Usage": [ + ".warnlogall", + ".warnlogall 2" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".warndelete", + ".warnrm", + ".warnd" + ], + "Description": "Deletes a warning from a user by its index.", + "Usage": [ + ".warndelete 3" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".warnclear", + ".warnc" + ], + "Description": "Clears all warnings from a certain user. You can specify a number to clear a specific one.", + "Usage": [ + ".warnclear @PoorDude 3", + ".warnclear @PoorDude" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".warnpunish", + ".warnp" + ], + "Description": "Sets a punishment for a certain number of warnings. You can specify a time string after 'Ban' or *'Mute' punishments to make it a temporary mute/ban. Provide no punishment to remove. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles", + "Usage": [ + ".warnpunish 3", + ".warnpunish 5 Ban", + ".warnpunish 5 Mute 2d12h", + ".warnpunish 4 AddRole toxic 1h" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".warnpunishlist", + ".warnpl" + ], + "Description": "Lists punishments for warnings.", + "Usage": [ + ".warnpunishlist" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".ban", + ".b" + ], + "Description": "Bans a user by ID or name with an optional message. You can specify a time string before the user name to ban the user temporarily.", + "Usage": [ + ".ban @Someone Get out!", + ".ban \"Some Guy#1234\" Your behaviour is toxic.", + ".ban 1d12h @Someone Come back when u chill" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".banprune" + ], + "Description": "Sets how many days of messages will be deleted when a user is banned.\nOnly works if the user is banned via the .ban command or punishment.\nAllowed values: 0 - 7", + "Usage": [ + ".banprune 3" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".banmessage", + ".banmsg", + ".bantemplate", + ".bantemp" + ], + "Description": "Sets a ban message template which will be used when a user is banned from this server. You can use embed strings and ban-specific placeholders: %ban.mod%, %ban.user%, %ban.duration% and %ban.reason%. You can disable ban message with `.banmsg -`", + "Usage": [ + ".banmessage %ban.user%, you've been banned from %server.name%. Reason: %ban.reason%", + ".banmessage { \"description\": \"%ban.user% you have been banned from %server.name% by %ban.mod%\" }" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".banmsgreset" + ], + "Description": "Resets ban message to default. If you want to completely disable ban messages, use `.banmsg -`", + "Usage": [ + ".banmsgreset" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".banmsgtest" + ], + "Description": "If ban message is not disabled, bot will send you the message as if you were banned by yourself. Used for testing the ban message.", + "Usage": [ + ".banmsgtest No reason", + ".banmsgtest 1h Test 1 hour ban message" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".unban" + ], + "Description": "Unbans a user with the provided user#discrim or id.", + "Usage": [ + ".unban toastie_t0ast", + ".unban 123123123" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".softban", + ".sb" + ], + "Description": "Bans and then unbans a user by ID or name with an optional message.", + "Usage": [ + ".softban @Someone Get out!", + ".softban \"Some Guy#1234\" Your behaviour is toxic." + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "KickMembers, ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".kick", + ".k" + ], + "Description": "Kicks a mentioned user.", + "Usage": [ + ".kick @Someone Get out!", + ".kick \"Some Guy#1234\" Your behaviour is toxic." + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "KickMembers Server Permission" + ] + }, + { + "Aliases": [ + ".timeout" + ], + "Description": "Times the user out for the specified amount of time. You may optionally specify a reason, which will be sent to the user.", + "Usage": [ + ".timeout @Someone 3h Shut up!", + ".timeout @Someone 1h30m" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ModerateMembers Server Permission" + ] + }, + { + "Aliases": [ + ".massban" + ], + "Description": "Bans multiple users at once. Specify a space separated list of IDs of users who you wish to ban.", + "Usage": [ + ".massban 123123123 3333333333 444444444" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".masskill" + ], + "Description": "Specify a new-line separated list of `userid reason`. You can use Username#discrim instead of UserId. Specified users will be banned from the current server, blacklisted from the bot, and have all of their currency taken away.", + "Usage": [ + ".masskill BadPerson#1234 Toxic person" + ], + "Submodule": "UserPunishCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "BanMembers Server Permission" + ] + }, + { + "Aliases": [ + ".vcrolerm" + ], + "Description": "Removes any `.vcrole` associated with the specified channel ID. This is useful if your vcrole has been enabled on a VC which has been deleted.", + "Usage": [ + ".vcrolerm 123123123123123" + ], + "Submodule": "VcRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".vcrole" + ], + "Description": "Sets or resets a role which will be given to users who join the voice channel you're in when you run this command. Provide no role name to disable. You must be in a voice channel to run this command.", + "Usage": [ + ".vcrole SomeRole", + ".vcrole" + ], + "Submodule": "VcRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".vcrolelist" + ], + "Description": "Shows a list of currently set voice channel roles.", + "Usage": [ + ".vcrolelist" + ], + "Submodule": "VcRoleCommands", + "Module": "Administration", + "Options": null, + "Requirements": [] + } + ], + "Expressions": [ + { + "Aliases": [ + ".exprtoggleglobal", + ".extg" + ], + "Description": "Toggles whether global expressions are usable on this server.", + "Usage": [ + ".exprtoggleglobal" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".expradds", + ".exadds", + ".exas", + ".expraddserver" + ], + "Description": "Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `.dpo`. Guide [here]().", + "Usage": [ + ".expradds \"hello\" Hi there %user.mention%" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".expradd", + ".exadd", + ".exa", + ".acr" + ], + "Description": "Add an expression with a trigger and a response. Bot will post a response whenever someone types the trigger word. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only and adds a new global expression. Guide [here]()", + "Usage": [ + ".expradd \"hello\" Hi there %user.mention%" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".expredit", + ".exe", + ".exedit", + ".ecr" + ], + "Description": "Edits the expression's response given its ID.", + "Usage": [ + ".expredit 123 I'm a magical girl" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprlist", + ".exl", + ".exprli", + ".exlist", + ".exli", + ".lcr" + ], + "Description": "Lists global or server expressions (20 expressions per page).\nRunning the command in DM will list global expressions, while running it in a server will list server expressions.\nShows enabled settings, followed by id, followed by the trigger.\n**Settings:** \n• 🗯️ Triggered if trigger matches any phrase (`.h exca`)\n• ✉️ Response will be DMed (`.h exdm`)\n• ❌ Trigger message will be deleted (`.h exad`)", + "Usage": [ + ".exprlist 1" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprshow", + ".exs", + ".exshow", + ".scr" + ], + "Description": "Shows an expression's response on a given ID.", + "Usage": [ + ".exprshow 1" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprdelserv", + ".exds", + ".exdelserv" + ], + "Description": "Deletes an expression on a specific index on this server. This command is useful if you want to lower the permission requirement for managing expressions by using `.dpo`.", + "Usage": [ + ".exprdelserv 5c" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".exprdel", + ".exd", + ".exdel", + ".dcr" + ], + "Description": "Deletes an expression by index. If ran in DM, it is bot owner only and deletes a global expression. Running this command in a server requires the Administrator permission and deletes a server expression.", + "Usage": [ + ".exprdel 5" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exreact", + ".exr" + ], + "Description": "Sets or resets reactions (up to 3) which will be added to the response message of the Expression with the specified ID. Provide no emojis to reset.", + "Usage": [ + ".exreact 59 👍 👎", + ".exreact 59 ", + ".exreact 59" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprca", + ".exca" + ], + "Description": "Toggles whether the expression will trigger if the triggering message contains the keyword (instead of only starting with it).", + "Usage": [ + ".exprca 44" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprdm", + ".exdm" + ], + "Description": "Toggles whether the response message of the expression will be sent as a direct message.", + "Usage": [ + ".exprdm 44" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprad", + ".exad" + ], + "Description": "Toggles whether the message triggering the expression will be automatically deleted.", + "Usage": [ + ".exprad 59" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".exprat", + ".exat" + ], + "Description": "Toggles whether the expression will allow extra input after the trigger. For example, with this feature enabled, expression with trigger 'hi' will also be invoked when a user types 'hi there'. This feature is automatically enabled on expressions which have '%target%' in their response.", + "Usage": [ + ".exprat 59" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".expreload", + ".exrel" + ], + "Description": "Reloads all expressions on all shards. Use this if you've made changes to the database while the bot is running, or used `.deleteunusedcrnq`", + "Usage": [ + ".expreload" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".exprclear", + ".exc", + ".exclear" + ], + "Description": "Deletes all expression on this server.", + "Usage": [ + ".exprclear" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".exexport" + ], + "Description": "Exports expressions from the current server (or global expressions in DMs) into a .yml file", + "Usage": [ + ".exexport" + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".eximport" + ], + "Description": "Upload the file or send the raw .yml data with this command to import all expressions from the specified string or file into the current server (or as global expressions in dm)", + "Usage": [ + ".eximport " + ], + "Submodule": "Expressions", + "Module": "Expressions", + "Options": null, + "Requirements": [] + } + ], + "Gambling": [ + { + "Aliases": [ + ".betstats" + ], + "Description": "Shows the total stats of several gambling features.\nUpdates once an hour.", + "Usage": [ + ".betstats" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".timely" + ], + "Description": "Use to claim your timely currency.\nThis is usually set by the bot owners to be daily, hourly or once every 12 hours.\nBot owner has to specify the amount and the period on how often you can claim your currency.", + "Usage": [ + ".timely" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".timelyreset" + ], + "Description": "Resets all user timeouts on `.timely` command.", + "Usage": [ + ".timelyreset" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".timelyset" + ], + "Description": "Sets the 'timely' currency allowance amount for users. Second parameter is period in hours, default is 24 hours.", + "Usage": [ + ".timelyset 100", + ".timelyset 50 12" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".raffle" + ], + "Description": "Prints a name and ID of a random online user from the server, or from the online user in the specified role.", + "Usage": [ + ".raffle", + ".raffle RoleName" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".raffleany" + ], + "Description": "Prints a name and ID of a random user from the server, or from the specified role.", + "Usage": [ + ".raffleany", + ".raffleany RoleName" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".curtrs" + ], + "Description": "Shows your currency transactions on the specified page. Bot owner can see other people's transactions too.", + "Usage": [ + ".curtrs 2", + ".curtrs @SomeUser 2" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".curtr" + ], + "Description": "Shows full details about a currency transaction with the specified ID. You can only check your own transactions.", + "Usage": [ + ".curtr 3yvd" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".cash", + ".$", + ".currency", + ".$$", + ".$$$", + ".cur" + ], + "Description": "Check how much currency a person has.\nIf no argument is provided it will check your own balance.", + "Usage": [ + ".cash", + ".cash @Someone" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".give" + ], + "Description": "Give someone a certain amount of currency. You can specify the reason after the mention.", + "Usage": [ + ".give 1 @Someone", + ".give 5 @CootGurl Ur so pwetty" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".award" + ], + "Description": "Awards someone a certain amount of currency. You can specify the reason after the Username. You can also specify a role name to award currency to all users in a role.", + "Usage": [ + ".award 100 @person", + ".award 5 Role Of Gamblers" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".take", + ".seize" + ], + "Description": "Takes the specified amount of currency from someone. You can specify a role instead to take the specified amount of currency from all users in the role.", + "Usage": [ + ".take 1 @Someone", + ".take 50 SomeRole" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".betroll", + ".br" + ], + "Description": "Bets the specified amount of currency and rolls a dice.\nRolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".betroll 5" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".leaderboard", + ".lb" + ], + "Description": "Displays the bot's currency leaderboard, or in other words, the richest users.\nSpecifying -c flag will show only users who are in this server.\nPaginated with 10 users per page.", + "Usage": [ + ".leaderboard", + ".leaderboard -c" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": [ + "`--clean` (`-c`) Only show users who are on the server. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".rps" + ], + "Description": "Play a game of Rocket-Paperclip-Scissors with Ellie.\nYou can bet on it. Winning awards you 1.95x of the bet.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".rps r 100", + ".rps scissors" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".luckyladder", + ".lula", + ".wheel", + ".wof" + ], + "Description": "Bets the specified amount of currency on the lucky ladder. You can stop on one of many different multipliers. The won amount is rounded down to the nearest whole number. You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".luckyladder 10" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bettest" + ], + "Description": "Tests a betting command by specifying the name followed by the number of tests. Some have multiple variations.\nSee the list of all tests by specifying no parameters.", + "Usage": [ + ".bettest", + ".bettest betflip 1000", + ".bettest slot 2000" + ], + "Submodule": "Gambling", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".race" + ], + "Description": "Starts a new animal race.", + "Usage": [ + ".race" + ], + "Submodule": "AnimalRacingCommands", + "Module": "Gambling", + "Options": [ + "`--start-time` (`-s`) " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".joinrace", + ".jr" + ], + "Description": "Joins a new race. You can specify an amount of currency for betting (optional). You will get YourBet*(participants-1) back if you win.", + "Usage": [ + ".joinrace", + ".joinrace 5" + ], + "Submodule": "AnimalRacingCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bank deposit", + ".bank d", + ".bank dep" + ], + "Description": "Deposits the specified amount of currency into the bank for later use.", + "Usage": [ + ".bank deposit 50" + ], + "Submodule": "Bank", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bank withdraw", + ".bank w", + ".bank with" + ], + "Description": "Withdraws the specified amount of currency from the bank if available.", + "Usage": [ + ".bank withdraw 49" + ], + "Submodule": "Bank", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bank balance", + ".bank b", + ".bank bal" + ], + "Description": "Shows how much currency is in your bank account.\nThis differs from your cash amount, as the cash amount is publicly available, but only you have access to your bank balance.\nHowever, you have to withdraw it first in order to use it.\nBot Owner can also check another user's bank balance.", + "Usage": [ + ".bank balance", + ".bank balance @User" + ], + "Submodule": "Bank", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bank take", + ".bank seize" + ], + "Description": "Takes the specified amount of currency from a user's bank", + "Usage": [ + ".bank take 500 @MoniLaunder" + ], + "Submodule": "Bank", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".bank award" + ], + "Description": "Award the specified amount of currency to a user's bank", + "Usage": [ + ".bank award 99999 @Bestie" + ], + "Submodule": "Bank", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".blackjack", + ".bj" + ], + "Description": "Start or join a blackjack game by specifying the amount you're betting. \nYou must specify the amount you're betting. \nUse `.hit`, `.stand` and `.double` commands to play. \nGame is played with 4 decks. \nDealer hits on soft 17 and wins draws.", + "Usage": [ + ".blackjack 50" + ], + "Submodule": "BlackJackCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".hit" + ], + "Description": "In the blackjack game, ask the dealer for an extra card.", + "Usage": [ + ".hit" + ], + "Submodule": "BlackJackCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".stand" + ], + "Description": "Finish your turn in the blackjack game.", + "Usage": [ + ".stand" + ], + "Submodule": "BlackJackCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".double" + ], + "Description": "In the blackjack game, double your bet in order to receive exactly one more card, and your turn ends.", + "Usage": [ + ".double" + ], + "Submodule": "BlackJackCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".connect4", + ".con4" + ], + "Description": "Creates or joins an existing connect4 game. 2 players are required for the game. Objective of the game is to get 4 of your pieces next to each other in a vertical, horizontal or diagonal line. You can specify a bet when you create a game and only users who bet the same amount will be able to join your game.", + "Usage": [ + ".connect4" + ], + "Submodule": "Connect4Commands", + "Module": "Gambling", + "Options": [ + "`--turn-timer` (`-t`) Turn time in seconds. It has to be between 5 and 60. Default 15. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".roll" + ], + "Description": "Rolls 0-100. If you supply a number `X` it rolls up to 30 normal dice. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. `Y` can be a letter 'F' if you want to roll fate dice instead of dnd.", + "Usage": [ + ".roll", + ".roll 7", + ".roll 3d5", + ".roll 5dF" + ], + "Submodule": "DiceRollCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".rolluo" + ], + "Description": "Rolls `X` normal dice (up to 30) unordered. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`.", + "Usage": [ + ".rolluo", + ".rolluo 7", + ".rolluo 3d5" + ], + "Submodule": "DiceRollCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".nroll" + ], + "Description": "Rolls in a given range. If you specify just one number instead of the range, it will roll from 0 to that number.", + "Usage": [ + ".nroll 5", + ".nroll 5-15" + ], + "Submodule": "DiceRollCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".draw" + ], + "Description": "Draws a card from this server's deck. You can draw up to 10 cards by supplying a number of cards to draw.", + "Usage": [ + ".draw", + ".draw 5" + ], + "Submodule": "DrawCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".drawnew" + ], + "Description": "Draws a card from the NEW deck of cards. You can draw up to 10 cards by supplying a number of cards to draw.", + "Usage": [ + ".drawnew", + ".drawnew 5" + ], + "Submodule": "DrawCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".deckshuffle", + ".dsh" + ], + "Description": "Reshuffles all cards back into the deck.", + "Usage": [ + ".deckshuffle" + ], + "Submodule": "DrawCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".betdraw", + ".bd" + ], + "Description": "Bet on the card value and/or color. Specify the amount followed by your guess. \nYou can specify `r` or `b` for red or black, and `h` or `l` for high or low.\nYou can specify only h/l or only r/b or both.\nReturns are high but **7 always loses**.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".betdraw 50 r", + ".betdraw 200 b l", + ".betdraw 1000 h", + ".betdraw 38 hi black" + ], + "Submodule": "DrawCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".eventstart" + ], + "Description": "Starts one of the events seen on public Ellie.\nEvents: `reaction`, `gamestatus`", + "Usage": [ + ".eventstart reaction", + ".eventstart reaction -d 1 -a 50 --pot-size 1500" + ], + "Submodule": "CurrencyEventsCommands", + "Module": "Gambling", + "Options": [ + "`--amount` (`-a`) Amount of currency each user receives. ", + "`--pot-size` (`-p`) The maximum amount of currency that can be rewarded. 0 means no limit. ", + "`--duration` (`-d`) Number of hours the event should run for. Default 24. " + ], + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".flip" + ], + "Description": "Flips coin(s) - heads or tails, and shows an image.", + "Usage": [ + ".flip", + ".flip 3" + ], + "Submodule": "FlipCoinCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".betflip", + ".bf" + ], + "Description": "Bet on the coin flip.\nThe result can be heads or tails.\nGuessing correctly rewards you with 1.95x of the currency you've bet (rounded up).\nMultiplier can be changed by the bot owner.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".betflip 5 heads", + ".betflip 3 t" + ], + "Submodule": "FlipCoinCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".pick" + ], + "Description": "Picks the currency planted in this channel. If the plant has a password, you need to specify it.", + "Usage": [ + ".pick", + ".pick passwd" + ], + "Submodule": "PlantPickCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".plant" + ], + "Description": "Spend an amount of currency to plant it in this channel. Default is 1. You can specify the password after the amount. Password has to be alphanumeric and it will be trimmed down to 10 characters if it's longer.", + "Usage": [ + ".plant 5", + ".plant 10 meow" + ], + "Submodule": "PlantPickCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".gencurrency", + ".gc" + ], + "Description": "Toggles currency generation on this channel. Every posted message will have chance to spawn currency. Chance is specified by the Bot Owner. (default is 2%)", + "Usage": [ + ".gencurrency" + ], + "Submodule": "PlantPickCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".gencurlist", + ".gclist" + ], + "Description": "Shows the list of server and channel ids where gc is enabled. Paginated with 9 per page.", + "Usage": [ + ".gencurlist" + ], + "Submodule": "PlantPickCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".shop" + ], + "Description": "Lists this server's administrators' shop. Paginated.", + "Usage": [ + ".shop", + ".shop 2" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".shopbuy", + ".buy" + ], + "Description": "Buys an item from the shop on a given index. If buying items, make sure that the bot can DM you.", + "Usage": [ + ".shopbuy 2" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".shopadd" + ], + "Description": "Adds an item to the shop.\nFirst you begin by specifying the type of the item you wish to add.\nAvailable types are role, list and command.\nIf the item is a role, specify a role id or a role name.\nIn case you're selling a command, and you need user's name, id etc, you can use the following placeholders:\n- `%you%` - Buyer mention\n- `%you.id%` - Buyer's user ID\n- `%you.username%` - Buyer's username\n- `%you.name%` - Buyer's global name\n- `%you.nick%` - Buyer's display name\n90% of currency from each purchase will be received by the user who added the item to the shop. This is configurable by the bot owner", + "Usage": [ + ".shopadd role 1000 Rich", + ".shopadd cmd 1000 .setrole %user% Rich" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shoplistadd" + ], + "Description": "Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked.", + "Usage": [ + ".shoplistadd 1 Uni-que-Steam-Key" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopremove", + ".shoprm" + ], + "Description": "Removes an item from the shop by its ID.", + "Usage": [ + ".shopremove 1" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopchangeprice", + ".shopprice" + ], + "Description": "Change the price of a shop entry at the specified index. Specify the index of the entry, followed by the price", + "Usage": [ + ".shopchangeprice 1 500" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopchangename", + ".shopname" + ], + "Description": "Change the name of a shop entry at the specified index. Only works for non-role items", + "Usage": [ + ".shopchangename 3 Cool stuff" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopswap" + ], + "Description": "Swap the index of two shop entries", + "Usage": [ + ".shopswap 1 5" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopmove" + ], + "Description": "Moves the shop entry from the current index to a new one", + "Usage": [ + ".shopmove 2 4" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".shopreq" + ], + "Description": "Sets a role which will be required to buy the item on the specified index. Specify only index to remove the requirement.", + "Usage": [ + ".shopreq 2 Gamers", + ".shopreq 2" + ], + "Submodule": "ShopCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".slot", + ".slots" + ], + "Description": "Play Ellie slots by placing your bet.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", + "Usage": [ + ".slot 5", + ".slot all" + ], + "Submodule": "SlotCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifureset" + ], + "Description": "Resets your waifu stats, except current waifus.", + "Usage": [ + ".waifureset" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifuclaim", + ".claim" + ], + "Description": "Claim a waifu for yourself by spending currency. You must spend at least 10% more than her current value unless she set `.affinity` towards you.", + "Usage": [ + ".waifuclaim 50 @Himesama" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifutransfer" + ], + "Description": "Transfer the ownership of one of your waifus to another user. You must pay 10% of your waifu's value unless that waifu has affinity towards you, in which case you must pay 60% fee. Transferred waifu's price will be reduced by the fee amount.", + "Usage": [ + ".waifutransfer @ExWaifu @NewOwner" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".divorce" + ], + "Description": "Releases your claim on a specific waifu. You will get 50% of that waifu's value back, unless that waifu has an affinity towards you, in which case they will be reimbursed instead. 6 hours cooldown.", + "Usage": [ + ".divorce @CheatingSloot" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".affinity", + ".waifuaff" + ], + "Description": "Sets your affinity towards someone you want to be claimed by. Setting affinity will reduce their `.claim` on you by 20%. Provide no parameters to clear your affinity. 30 minutes cooldown.", + "Usage": [ + ".affinity @MyHusband", + ".affinity" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifulb", + ".waifus" + ], + "Description": "Shows top 9 waifus. You can specify another page to show other waifus.", + "Usage": [ + ".waifulb", + ".waifulb 3" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifuinfo", + ".waifustats" + ], + "Description": "Shows waifu stats for a target person. Defaults to you if no user is provided.", + "Usage": [ + ".waifuinfo @MyCrush", + ".waifuinfo" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".waifugift", + ".gift", + ".gifts" + ], + "Description": "Gift an item to a waifu user.\nThe waifu's value will be increased by the percentage of the gift's value.\nYou can optionally prefix the gift with a multiplier to gift the item that many times.\nFor example, 3xRose will give the waifu 3 roses, 10xBread will give the waifu 10 breads. Do not use plural forms.\nNegative gifts will not show up in waifuinfo. \nProvide no parameters to see a list of items that you can gift.", + "Usage": [ + ".waifugift", + ".waifugift Rose @Himesama" + ], + "Submodule": "WaifuClaimCommands", + "Module": "Gambling", + "Options": null, + "Requirements": [] + } + ], + "Games": [ + { + "Aliases": [ + ".choose" + ], + "Description": "Chooses a thing from a list of things", + "Usage": [ + ".choose Get up;Sleep;Sleep more" + ], + "Submodule": "Games", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".eightball", + ".8ball" + ], + "Description": "Ask the 8ball a yes/no question.", + "Usage": [ + ".eightball Is b1nzy a nice guy?" + ], + "Submodule": "Games", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".acrophobia", + ".acro" + ], + "Description": "Starts an Acrophobia game.", + "Usage": [ + ".acrophobia", + ".acrophobia -s 30" + ], + "Submodule": "AcropobiaCommands", + "Module": "Games", + "Options": [ + "`--submission-time` (`-s`) Time after which the submissions are closed and voting starts. ", + "`--vote-time` (`-v`) Time after which the voting is closed and the winner is declared. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".cleverbot", + ".chatbot", + ".chatgpt" + ], + "Description": "Toggles cleverbot/chatgpt session.\nWhen enabled, the bot will reply to messages starting with bot mention in the server.\nExpressions starting with %bot.mention% won't work if cleverbot/chatgpt is enabled.", + "Usage": [ + ".cleverbot" + ], + "Submodule": "ChatterBotCommands", + "Module": "Games", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".hangmanlist" + ], + "Description": "Shows a list of hangman question categories.", + "Usage": [ + ".hangmanlist" + ], + "Submodule": "HangmanCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".hangman" + ], + "Description": "Starts a game of hangman in the channel. You can optionally select a category `.hangmanlist` to see a list of available categories.", + "Usage": [ + ".hangman", + ".hangman movies" + ], + "Submodule": "HangmanCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".hangmanstop" + ], + "Description": "Stops the active hangman game on this channel if it exists.", + "Usage": [ + ".hangmanstop" + ], + "Submodule": "HangmanCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".nunchi" + ], + "Description": "Creates or joins an existing nunchi game. Users have to count up by 1 from the starting number shown by the bot. If someone makes a mistake (types an incorrect number, or repeats the same number) they are out of the game and a new round starts without them. Minimum 3 users required.", + "Usage": [ + ".nunchi" + ], + "Submodule": "NunchiCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".typestart" + ], + "Description": "Starts a typing contest.", + "Usage": [ + ".typestart" + ], + "Submodule": "SpeedTypingCommands", + "Module": "Games", + "Options": [ + "`--start-time` (`-s`) How long does it take for the race to start. Default 5. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".typestop" + ], + "Description": "Stops a typing contest on the current channel.", + "Usage": [ + ".typestop" + ], + "Submodule": "SpeedTypingCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".typeadd" + ], + "Description": "Adds a new article to the typing contest.", + "Usage": [ + ".typeadd wordswords" + ], + "Submodule": "SpeedTypingCommands", + "Module": "Games", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".typelist" + ], + "Description": "Lists added typing articles with their IDs. 15 per page.", + "Usage": [ + ".typelist", + ".typelist 3" + ], + "Submodule": "SpeedTypingCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".typedel" + ], + "Description": "Deletes a typing article given the ID.", + "Usage": [ + ".typedel 3" + ], + "Submodule": "SpeedTypingCommands", + "Module": "Games", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".tictactoe", + ".ttt" + ], + "Description": "Starts a game of tic tac toe.\nAnother user must run the command in the same channel in order to accept the challenge.\nUse numbers 1-9 to play.", + "Usage": [ + ".tictactoe" + ], + "Submodule": "TicTacToeCommands", + "Module": "Games", + "Options": [ + "`--turn-timer` (`-t`) Turn time in seconds. Default 15. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".trivia", + ".t" + ], + "Description": "Starts a game of trivia.\nFirst player to get to 10 points wins by default.\n30 seconds per question.", + "Usage": [ + ".trivia", + ".trivia --timeout 5 -p -w 3 -q 10" + ], + "Submodule": "TriviaCommands", + "Module": "Games", + "Options": [ + "`--pokemon` (`-p`) Whether it's 'Who's that pokemon?' trivia. ", + "`--nohint` Don't show any hints. ", + "`--win-req` (`-w`) Winning requirement. Set 0 for an infinite game. Default 10. ", + "`--question-timer` (`-q`) How long until the question ends. Default 30. ", + "`--timeout` (`-t`) Number of questions of inactivity in order stop. Set 0 for never. Default 10. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".tl" + ], + "Description": "Shows a current trivia leaderboard.", + "Usage": [ + ".tl" + ], + "Submodule": "TriviaCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".tq" + ], + "Description": "Quits current trivia after current question.", + "Usage": [ + ".tq" + ], + "Submodule": "TriviaCommands", + "Module": "Games", + "Options": null, + "Requirements": [] + } + ], + "Help": [ + { + "Aliases": [ + ".modules", + ".mdls" + ], + "Description": "List all of the bot's modules.\nEach module contains commands that you can use.", + "Usage": [ + ".modules" + ], + "Submodule": "Help", + "Module": "Help", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".commands", + ".cmds" + ], + "Description": "List all of the bot's commands in the specified module.\nYou can either specify the full name or only the first few letters of the module name.\nSpecifying no module will show the list of modules instead.", + "Usage": [ + ".commands Admin", + ".commands Admin --view 1", + ".commands" + ], + "Submodule": "Help", + "Module": "Help", + "Options": [ + "`--view` (`-v`) Specifies how to output the list of commands. 0 - Hide commands which you can't use, 1 - Cross out commands which you can't use, 2 - Show all. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".h", + ".help" + ], + "Description": "Shows help for a single command.\nCommand help contains instructions on how to use the command with examples and a list of parameters.\nDMs you helpful links if no parameters are specified.", + "Usage": [ + ".h .cmds", + ".h" + ], + "Submodule": "Help", + "Module": "Help", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".gencmdlist" + ], + "Description": "Generates a json of the commands list and sends it to the chat.", + "Usage": [ + ".gencmdlist" + ], + "Submodule": "Help", + "Module": "Help", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".guide", + ".readme" + ], + "Description": "Sends a readme and a guide links to the channel.", + "Usage": [ + ".guide" + ], + "Submodule": "Help", + "Module": "Help", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".donate" + ], + "Description": "Provides instructions for helping the project financially.", + "Usage": [ + ".donate" + ], + "Submodule": "Help", + "Module": "Help", + "Options": null, + "Requirements": [ + "Only Public Bot" + ] + }, + { + "Aliases": [ + ".patron" + ], + "Description": "Check your patronage status and command usage quota. Bot owners can check targeted user's patronage status.", + "Usage": [ + ".patron" + ], + "Submodule": "Patronage", + "Module": "Help", + "Options": null, + "Requirements": [ + "Only Public Bot" + ] + }, + { + "Aliases": [ + ".patronmessage", + ".patronmsg" + ], + "Description": "Sends a message to all patrons of the specified tier and higher.\nSupports [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".patronmessage x hello" + ], + "Submodule": "Patronage", + "Module": "Help", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Only Public Bot" + ] + } + ], + "Marmalade": [ + { + "Aliases": [ + ".marmaladeload", + ".maload" + ], + "Description": "Loads a marmalade with the specified name from the data/marmalades/ folder.\nProvide no name to see the list of loadable marmalades.\nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", + "Usage": [ + ".marmaladeload mycoolmarmalade", + ".marmaladeload" + ], + "Submodule": "Marmalade", + "Module": "Marmalade", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".marmaladeunload", + ".maunload" + ], + "Description": "Unloads the previously loaded marmalade.\nProvide no name to see the list of unloadable marmalades. \nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", + "Usage": [ + ".marmaladeunload mycoolmarmalade", + ".marmaladeunload" + ], + "Submodule": "Marmalade", + "Module": "Marmalade", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".marmaladelist", + ".malist" + ], + "Description": "Lists all loaded and unloaded marmalades.\nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", + "Usage": [ + ".marmaladelist" + ], + "Submodule": "Marmalade", + "Module": "Marmalade", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".marmaladeinfo", + ".mainfo" + ], + "Description": "Shows information about the specified marmalade such as the author, name, description, list of canaries, number of commands etc.\nProvide no name to see the basic information about all loaded marmalades. \nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", + "Usage": [ + ".marmaladeinfo mycoolmarmalade", + ".marmaladeinfo" + ], + "Submodule": "Marmalade", + "Module": "Marmalade", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".marmaladesearch", + ".masearchw" + ], + "Description": "Searches for marmalades online given the search term", + "Usage": [ + ".marmaladesearch shrine" + ], + "Submodule": "Marmalade", + "Module": "Marmalade", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + } + ], + "Music": [ + { + "Aliases": [ + ".join", + ".j", + ".move", + ".mv" + ], + "Description": "Makes the bot join your voice channel.", + "Usage": [ + ".join" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".destroy", + ".d" + ], + "Description": "Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour)", + "Usage": [ + ".destroy" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".play", + ".p", + ".start" + ], + "Description": "Queues up and plays a song or video based on a search query, song name, artist name or youtube link.\nIf no parameters are specified, it will skip the current song.\nIf you specify a song number, it will jump to that song.\nIf you specify a search query, acts as a `.q` command\n**You must be in a voice channel**.", + "Usage": [ + ".play", + ".play 5", + ".play Dream Of Venice" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".queue", + ".q", + ".yq", + ".enqueue" + ], + "Description": "Queues up and plays a song or video based on a search query, song name, artist name, search query or youtube link.\nBot will join your voice channel. \n**You must be in a voice channel**.", + "Usage": [ + ".queue Dream Of Venice" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".queuenext", + ".qn" + ], + "Description": "Works the same as `.queue` command, except it enqueues the new song after the current one. **You must be in a voice channel**.", + "Usage": [ + ".queuenext Dream Of Venice" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".volume", + ".vol", + ".defvol" + ], + "Description": "Sets the music playback volume (0-100%). Persistent server setting. Default 100", + "Usage": [ + ".volume 50" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".next", + ".n" + ], + "Description": "Goes to the next song in the queue. You have to be in the same voice channel as the bot", + "Usage": [ + ".next" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".listqueue", + ".lq" + ], + "Description": "Lists 10 currently queued songs per page. Default page is 1.", + "Usage": [ + ".listqueue", + ".listqueue 2" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".queuesearch", + ".qs", + ".yqs" + ], + "Description": "Search for top 5 youtube song result using keywords, and type the index of the song to play that song. Bot will join your voice channel. **You must be in a voice channel**.", + "Usage": [ + ".queuesearch Dream Of Venice" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".songremove", + ".srm", + ".trackremove", + ".trm" + ], + "Description": "Remove a song by its # in the queue, or 'all' (or provide no parameter) to remove all songs from the queue.", + "Usage": [ + ".songremove 5", + ".songremove all", + ".songremove" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".stop", + ".s" + ], + "Description": "Stops the music and preserves the current song index. Stays in the channel.", + "Usage": [ + ".stop" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".queuerepeat", + ".qrp", + ".rpl" + ], + "Description": "Sets music player repeat strategy for this server.\n- `n` / `no` - player will stop once it reaches the end of the queue\n- `s` / `song` - player will repeat current song\n- `q` / `queue` or empty - player will repeat entire music queue", + "Usage": [ + ".queuerepeat", + ".queuerepeat n", + ".queuerepeat song" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".pause" + ], + "Description": "Pauses or Unpauses the song.", + "Usage": [ + ".pause" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".radio", + ".ra" + ], + "Description": "Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf (Usage Video: )", + "Usage": [ + ".radio radio link here" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".local", + ".lo" + ], + "Description": "Queues a local file by specifying a full path.", + "Usage": [ + ".local C:/music/mysong.mp3" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".localplaylist", + ".lopl" + ], + "Description": "Queues all songs from a directory.", + "Usage": [ + ".localplaylist C:/music/classical" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".trackmove", + ".tm", + ".movesong", + ".ms" + ], + "Description": "Moves a song from one position to another.", + "Usage": [ + ".trackmove 5 3" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".playlist", + ".pl" + ], + "Description": "Queues up to 500 songs from a youtube playlist specified by a link, or keywords.", + "Usage": [ + ".playlist " + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".nowplaying", + ".np" + ], + "Description": "Shows the song that the bot is currently playing.", + "Usage": [ + ".nowplaying" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".playlistshuffle", + ".shuffle", + ".sh", + ".plsh" + ], + "Description": "Shuffles the current playlist.", + "Usage": [ + ".playlistshuffle" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".setmusicchannel", + ".smch" + ], + "Description": "Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. Persistent server setting.", + "Usage": [ + ".setmusicchannel" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot", + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".unsetmusicchannel", + ".usmch" + ], + "Description": "Bot will output playing, finished, paused and removed songs to the channel where the first song was queued in. Persistent server setting.", + "Usage": [ + ".unsetmusicchannel" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot", + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".autodisconnect", + ".autodc" + ], + "Description": "Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`.", + "Usage": [ + ".autodisconnect" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".musicquality", + ".mquality" + ], + "Description": "Gets or sets the default music player quality. Available settings: Highest, High, Medium, Low. Default is **Highest**. Provide no argument to see current setting.", + "Usage": [ + ".musicquality", + ".musicquality High", + ".musicquality Low" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".queueautoplay", + ".qap" + ], + "Description": "Toggles autoplay - When the song is finished, automatically queue a related Youtube song. (Works only for Youtube songs)", + "Usage": [ + ".queueautoplay" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".qfp" + ], + "Description": "Triggers fairplay. The song queue will be re-ordered in a fair manner. No effect on newly added songs.", + "Usage": [ + ".qfp" + ], + "Submodule": "Music", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".playlists", + ".pls" + ], + "Description": "Lists all playlists. Paginated, 20 per page.", + "Usage": [ + ".playlists 1" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deleteplaylist", + ".delpls" + ], + "Description": "Deletes a saved playlist using its id. Works only if you made it or if you are the bot owner.", + "Usage": [ + ".deleteplaylist 5" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".playlistshow", + ".plshow" + ], + "Description": "Lists all songs in a playlist specified by its id. Paginated, 20 per page.", + "Usage": [ + ".playlistshow 1" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".save" + ], + "Description": "Saves a playlist under a certain name. Playlist name must be no longer than 20 characters and must not contain dashes.", + "Usage": [ + ".save classical1" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".load" + ], + "Description": "Loads a saved playlist using its ID. Use `.pls` to list all saved playlists and `.save` to save new ones.", + "Usage": [ + ".load 5" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "No Public Bot" + ] + }, + { + "Aliases": [ + ".deleteplaylists" + ], + "Description": "Deletes everything from MusicPlaylists.", + "Usage": [ + ".deleteplaylists" + ], + "Submodule": "PlaylistCommands", + "Module": "Music", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + } + ], + "Permissions": [ + { + "Aliases": [ + ".verbose", + ".v" + ], + "Description": "Toggles or sets whether to show when a command/module is blocked.", + "Usage": [ + ".verbose", + ".verbose true" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".permrole", + ".pr" + ], + "Description": "Sets a role which can change permissions. Supply no parameters to see the current one. Type 'reset' instead of the role name to reset the currently set permission role. Users with the Administrator server permissions can use permission commands regardless of whether they have the specified role. There is no default permission role.", + "Usage": [ + ".permrole Some Role", + ".permrole reset" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".listperms", + ".lp" + ], + "Description": "Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions.", + "Usage": [ + ".listperms", + ".listperms 3" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".removeperm", + ".rp" + ], + "Description": "Removes a permission from a given position in the Permissions list.", + "Usage": [ + ".removeperm 1" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".moveperm", + ".mp" + ], + "Description": "Moves permission from one position to another in the Permissions list.", + "Usage": [ + ".moveperm 2 4" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".srvrcmd", + ".sc" + ], + "Description": "Sets a command's permission at the server level.", + "Usage": [ + ".srvrcmd \"command name\" disable" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".srvrmdl", + ".sm" + ], + "Description": "Sets a module's permission at the server level.", + "Usage": [ + ".srvrmdl ModuleName enable" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".usrcmd", + ".uc" + ], + "Description": "Sets a command's permission at the user level.", + "Usage": [ + ".usrcmd \"command name\" enable SomeUsername" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".usrmdl", + ".um" + ], + "Description": "Sets a module's permission at the user level.", + "Usage": [ + ".usrmdl ModuleName enable SomeUsername" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".rolecmd", + ".rc" + ], + "Description": "Sets a command's permission at the role level.", + "Usage": [ + ".rolecmd \"command name\" disable MyRole" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".rolemdl", + ".rm" + ], + "Description": "Sets a module's permission at the role level.", + "Usage": [ + ".rolemdl ModuleName enable MyRole" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chnlcmd", + ".cc" + ], + "Description": "Sets a command's permission at the channel level.", + "Usage": [ + ".chnlcmd \"command name\" enable SomeChannel" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chnlmdl", + ".cm" + ], + "Description": "Sets a module's permission at the channel level.", + "Usage": [ + ".chnlmdl ModuleName enable SomeChannel" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".allchnlmdls", + ".acm" + ], + "Description": "Enable or disable all modules in a specified channel.", + "Usage": [ + ".allchnlmdls enable #SomeChannel" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".allrolemdls", + ".arm" + ], + "Description": "Enable or disable all modules for a specific role.", + "Usage": [ + ".allrolemdls [enable/disable] MyRole" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".allusrmdls", + ".aum" + ], + "Description": "Enable or disable all modules for a specific user.", + "Usage": [ + ".allusrmdls enable @Someone" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".allsrvrmdls", + ".asm" + ], + "Description": "Enable or disable all modules for your server.", + "Usage": [ + ".allsrvrmdls [enable/disable]" + ], + "Submodule": "Permissions", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".userblacklist", + ".ubl" + ], + "Description": "Either [add]s or [rem]oves a user or users specified by a Mention or an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted users.", + "Usage": [ + ".userblacklist add @SomeUser @SomeUser2 @SomeUser3", + ".userblacklist rem 12312312313", + ".userblacklist", + ".userblacklist 4" + ], + "Submodule": "BlacklistCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".channelblacklist", + ".cbl" + ], + "Description": "Either [add]s or [rem]oves a channel or channels specified an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted channels.", + "Usage": [ + ".channelblacklist add 12312312312 66666666666", + ".channelblacklist rem 12312312312", + ".channelblacklist", + ".channelblacklist 3" + ], + "Submodule": "BlacklistCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".serverblacklist", + ".sbl" + ], + "Description": "Either [add]s or [rem]oves a server, or servers specified by an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted servers.", + "Usage": [ + ".serverblacklist add 12312321312", + ".serverblacklist rem 12312321312", + ".serverblacklist", + ".serverblacklist 2" + ], + "Submodule": "BlacklistCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".cmdcooldown", + ".cmdcd" + ], + "Description": "Sets a cooldown, in seconds, for a command or an expression which will be applied per user. Set it to 0 to remove the cooldown. Supports a special command `cleverbot:response` which can be used limit how often users can talk to cleverbot", + "Usage": [ + ".cmdcooldown .h 5", + ".cmdcooldown .pat 30" + ], + "Submodule": "CmdCdsCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".allcmdcooldowns", + ".cmdcds" + ], + "Description": "Shows a list of all commands and their respective cooldowns.", + "Usage": [ + ".allcmdcooldowns" + ], + "Submodule": "CmdCdsCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".fwclear" + ], + "Description": "Deletes all filtered words on this server.", + "Usage": [ + ".fwclear" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".filterlist", + ".fl" + ], + "Description": "Lists invite and link filter channels and status.", + "Usage": [ + ".filterlist" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".srvrfilterinv", + ".sfi" + ], + "Description": "Toggles automatic deletion of invites posted in the server. Does not affect users with the Administrator permission.", + "Usage": [ + ".srvrfilterinv" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chnlfilterinv", + ".cfi" + ], + "Description": "Toggles automatic deletion of invites posted in the channel. Does not negate the `.srvrfilterinv` enabled setting. Does not affect users with the Administrator permission.", + "Usage": [ + ".chnlfilterinv" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".srvrfilterlin", + ".sfl" + ], + "Description": "Toggles automatic deletion of links posted in the server. Does not affect users with the Administrator permission.", + "Usage": [ + ".srvrfilterlin" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chnlfilterlin", + ".cfl" + ], + "Description": "Toggles automatic deletion of links posted in the channel. Does not negate the `.srvrfilterlin` enabled setting. Does not affect users with the Administrator permission.", + "Usage": [ + ".chnlfilterlin" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".srvrfilterwords", + ".sfw" + ], + "Description": "Toggles automatic deletion of messages containing filtered words on the server. Does not affect users with the Administrator permission.", + "Usage": [ + ".srvrfilterwords" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chnlfilterwords", + ".cfw" + ], + "Description": "Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `.srvrfilterwords` enabled setting. Does not affect users with the Administrator permission.", + "Usage": [ + ".chnlfilterwords" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".filterword", + ".fw" + ], + "Description": "Adds or removes (if it exists) a word from the list of filtered words. Use`.sfw` or `.cfw` to toggle filtering.", + "Usage": [ + ".filterword poop" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".lstfilterwords", + ".lfw" + ], + "Description": "Shows a list of filtered words.", + "Usage": [ + ".lstfilterwords" + ], + "Submodule": "FilterCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".globalpermlist", + ".gpl", + ".lgp", + ".globalperms", + ".listglobalperms" + ], + "Description": "Lists global permissions set by the bot owner.", + "Usage": [ + ".globalpermlist" + ], + "Submodule": "GlobalPermissionCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".globalmodule", + ".gmod" + ], + "Description": "Toggles whether a module can be used on any server.", + "Usage": [ + ".globalmodule nsfw" + ], + "Submodule": "GlobalPermissionCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".globalcommand", + ".gcmd" + ], + "Description": "Toggles whether a command can be used on any server.", + "Usage": [ + ".globalcommand .stats" + ], + "Submodule": "GlobalPermissionCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".resetperms" + ], + "Description": "Resets the bot's permissions module on this server to the default value.", + "Usage": [ + ".resetperms" + ], + "Submodule": "ResetPermissionsCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".resetglobalperms" + ], + "Description": "Resets global permissions set by bot owner.", + "Usage": [ + ".resetglobalperms" + ], + "Submodule": "ResetPermissionsCommands", + "Module": "Permissions", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + } + ], + "Searches": [ + { + "Aliases": [ + ".weather", + ".we" + ], + "Description": "Shows current weather data for the specified city.", + "Usage": [ + ".weather Auckland, NZ" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".time" + ], + "Description": "Shows the current time and timezone in the specified location.", + "Usage": [ + ".time London, UK" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".movie", + ".omdb", + ".imdb" + ], + "Description": "Queries omdb for movies or series, show first result.", + "Usage": [ + ".movie Batman vs Superman" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".randomcat", + ".meow" + ], + "Description": "Shows a random cat image.", + "Usage": [ + ".randomcat" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".randomdog", + ".woof" + ], + "Description": "Shows a random dog image.", + "Usage": [ + ".randomdog" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".randomfood", + ".yum" + ], + "Description": "Shows a random food image.", + "Usage": [ + ".randomfood" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".randombird", + ".birb", + ".bird" + ], + "Description": "Shows a random bird image.", + "Usage": [ + ".randombird" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".lmgtfy" + ], + "Description": "Google something for a baka.", + "Usage": [ + ".lmgtfy How to eat a banana" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".shorten" + ], + "Description": "Attempts to shorten an URL, if it fails, returns the input URL.", + "Usage": [ + ".shorten https://google.com" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".magicthegathering", + ".mtg" + ], + "Description": "Searches for a Magic The Gathering card.", + "Usage": [ + ".magicthegathering about face" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".hearthstone", + ".hs" + ], + "Description": "Searches for a Hearthstone card and shows its image. Takes a while to complete.", + "Usage": [ + ".hearthstone Ysera" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".urbandict", + ".ud" + ], + "Description": "Searches Urban Dictionary for a word.", + "Usage": [ + ".urbandict Pineapple" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".define", + ".def" + ], + "Description": "Finds a definition of a word.", + "Usage": [ + ".define heresy" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".catfact" + ], + "Description": "Shows a random catfact from ", + "Usage": [ + ".catfact" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".wiki", + ".wikipedia" + ], + "Description": "Gives you back a wikipedia link", + "Usage": [ + ".wiki query" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".color", + ".clr" + ], + "Description": "Shows you pictures of colors which correspond to the inputted hex values. Max 10.", + "Usage": [ + ".color 00ff00", + ".color f00 0f0 00f" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".avatar", + ".av" + ], + "Description": "Shows a mentioned person's avatar.", + "Usage": [ + ".avatar @Someone" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".wikia", + ".fandom" + ], + "Description": "Gives you back a fandom link", + "Usage": [ + ".wikia mtg Vigilance", + ".wikia mlp Dashy" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".steam" + ], + "Description": "Returns a store link for a steam game with the specified name. It doesn't work very well because bundles.", + "Usage": [ + ".steam Sakura Agent" + ], + "Submodule": "Searches", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".anime", + ".ani", + ".aq" + ], + "Description": "Queries anilist for an anime and shows the first result.", + "Usage": [ + ".anime aquarion evol" + ], + "Submodule": "AnimeSearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".manga", + ".mang", + ".mq" + ], + "Description": "Queries anilist for a manga and shows the first result.", + "Usage": [ + ".manga Shingeki no kyojin" + ], + "Submodule": "AnimeSearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".stock" + ], + "Description": "Shows basic information about a stock. You can use a symbol or company name", + "Usage": [ + ".stock tsla", + ".stock advanced micro devices", + ".stock amd" + ], + "Submodule": "FinanceCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".crypto", + ".c" + ], + "Description": "Shows basic stats about a cryptocurrency from coinmarketcap.com. You can use either a name or an abbreviation of the currency.", + "Usage": [ + ".crypto btc", + ".crypto bitcoin" + ], + "Submodule": "FinanceCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".coins", + ".crypto", + ".cryptos" + ], + "Description": "Shows a list of 10 crypto currencies ordered by market cap.\nShows their price, change in the last24h, market cap and circulating and total supply.\nPaginated with 10 per page.", + "Usage": [ + ".coins", + ".coins 2" + ], + "Submodule": "FinanceCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".ytuploadnotif", + ".yun" + ], + "Description": "Subscribe to a youtube channel's upload rss feed.\nShortcut for `.feed https://www.youtube.com/feeds/videos.xml?channel_id=%3Cyoutube_channel_id`\nYou can optionally specify a message which will be posted with an update.", + "Usage": [ + ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow", + ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted" + ], + "Submodule": "FeedCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".feed", + ".feedadd" + ], + "Description": "Subscribes to a feed.\nBot will post an update up to once every 10 seconds.\nYou can have up to 10 feeds on one server.\nAll feeds must have unique URLs.\nSet a channel as a second optional parameter to specify where to send the updates.\nYou can optionally specify a message after the channel name which will be posted with an update.", + "Usage": [ + ".feed https://blog.playstation.com/feed/", + ".feed https://blog.playstation.com/feed/ #updates", + ".feed https://blog.playstation.com/feed/ #updates New playstation rss feed post!" + ], + "Submodule": "FeedCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".feedremove", + ".feedrm", + ".feeddel" + ], + "Description": "Stops tracking a feed on the given index. Use `.feeds` command to see a list of feeds and their indexes.", + "Usage": [ + ".feedremove 3" + ], + "Submodule": "FeedCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".feedlist", + ".feeds" + ], + "Description": "Shows the list of feeds you've subscribed to on this server.", + "Usage": [ + ".feedlist" + ], + "Submodule": "FeedCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".yomama", + ".ym" + ], + "Description": "Shows a random joke from ", + "Usage": [ + ".yomama" + ], + "Submodule": "JokeCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".randjoke", + ".rj" + ], + "Description": "Shows a random joke.", + "Usage": [ + ".randjoke" + ], + "Submodule": "JokeCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".chucknorris", + ".cn" + ], + "Description": "Shows a random Chuck Norris joke.", + "Usage": [ + ".chucknorris" + ], + "Submodule": "JokeCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".wowjoke" + ], + "Description": "Get one of penultimate WoW jokes.", + "Usage": [ + ".wowjoke" + ], + "Submodule": "JokeCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".magicitem", + ".mi" + ], + "Description": "Shows a random magic item from ", + "Usage": [ + ".magicitem" + ], + "Submodule": "JokeCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".osu" + ], + "Description": "Shows osu! stats for a player.", + "Usage": [ + ".osu Name", + ".osu Name taiko" + ], + "Submodule": "OsuCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".gatari" + ], + "Description": "Shows osu!gatari stats for a player.", + "Usage": [ + ".gatari Name", + ".gatari Name ctb" + ], + "Submodule": "OsuCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".osu5" + ], + "Description": "Displays a user's top 5 plays.", + "Usage": [ + ".osu5 Name" + ], + "Submodule": "OsuCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".pokemon", + ".poke" + ], + "Description": "Searches for a pokemon.", + "Usage": [ + ".pokemon Sylveon" + ], + "Submodule": "PokemonSearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".pokemonability", + ".pokeab" + ], + "Description": "Searches for a pokemon ability.", + "Usage": [ + ".pokemonability overgrow" + ], + "Submodule": "PokemonSearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".bible" + ], + "Description": "Shows bible verse. You need to supply book name and chapter:verse", + "Usage": [ + ".bible genesis 3:19" + ], + "Submodule": "ReligiousCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quran" + ], + "Description": "Shows the text of an ayah of the Quran, as well as the recitation by Alafasy.\nSupply surah:ayah, or ayah number. For instance, 262 or 2:255 will both get you Ayat Al Kursi", + "Usage": [ + ".quran 2:255", + ".quran 262" + ], + "Submodule": "ReligiousCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".google", + ".search", + ".g", + ".s" + ], + "Description": "Get a Google search link for some terms.", + "Usage": [ + ".google query" + ], + "Submodule": "SearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".image", + ".img", + ".rimg" + ], + "Description": "Pulls a random image using a search parameter.", + "Usage": [ + ".image cute kitten" + ], + "Submodule": "SearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".youtube", + ".yt" + ], + "Description": "Searches youtubes and shows the first result", + "Usage": [ + ".youtube query" + ], + "Submodule": "SearchCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".streamadd", + ".sta", + ".stadd" + ], + "Description": "Notifies this channel when the stream on the specified URL goes online or offline. Offline notifications will only show if you enable `.streamoff`. Maximum 10 per server.", + "Usage": [ + ".streamadd twitch.tv/someguy" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streamremove", + ".strm" + ], + "Description": "Stops following the stream on the specified index. (use `.stl` to see indexes)", + "Usage": [ + ".streamremove 2" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streamsclear", + ".stclear" + ], + "Description": "Removes all followed streams on this server.", + "Usage": [ + ".streamsclear" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".streamlist", + ".stl", + ".streamslist" + ], + "Description": "Lists all streams you are following on this server and their respective indexes.", + "Usage": [ + ".streamlist" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".streamoffline", + ".sto", + ".stoff" + ], + "Description": "Toggles whether the bot will also notify when added streams go offline.", + "Usage": [ + ".streamoffline" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streamonlinedelete", + ".stondel" + ], + "Description": "Toggles whether the bot will delete stream online message when the stream goes offline.", + "Usage": [ + ".streamonlinedelete" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streammsg", + ".stm", + ".stmsg" + ], + "Description": "Sets the message which will show when the stream on the specified index comes online. You can use %user% and %platform% placeholders.", + "Usage": [ + ".streammsg 1 Hey @erryone %user% is back online on %platform%!1!!" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streammsgall", + ".stma", + ".stmsga" + ], + "Description": "Sets the message which will show when any of the currently followed streams comes online. This does not apply to the streams which get added afterwards. You can use %user% and %platform% placeholders.", + "Usage": [ + ".streammsgall Hey @erryone %user% is back online!1!!" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streamcheck", + ".stc" + ], + "Description": "Retrieves information about a stream.", + "Usage": [ + ".streamcheck https://twitch.tv/somedude" + ], + "Submodule": "StreamNotificationCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".translate", + ".trans" + ], + "Description": "Translates text from the given language to the destination language.", + "Usage": [ + ".translate en fr Hello" + ], + "Submodule": "TranslateCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".autotranslate", + ".at", + ".autotrans" + ], + "Description": "Starts automatic translation of all messages by users who set their `.atl` in this channel. You can set \"del\" parameter to automatically delete all translated user messages.", + "Usage": [ + ".autotranslate", + ".autotranslate del" + ], + "Submodule": "TranslateCommands", + "Module": "Searches", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".autotranslang", + ".atl" + ], + "Description": "Sets your source and target language to be used with `.at`. Specify no parameters to remove previously set value.", + "Usage": [ + ".autotranslang en fr" + ], + "Submodule": "TranslateCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".translangs" + ], + "Description": "Lists the valid languages for translation.", + "Usage": [ + ".translangs" + ], + "Submodule": "TranslateCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xkcd" + ], + "Description": "Shows a XKCD comic. Specify no parameters to retrieve a random one. Number parameter will retrieve a specific comic, and \"latest\" will get the latest one.", + "Usage": [ + ".xkcd", + ".xkcd 1400", + ".xkcd latest" + ], + "Submodule": "XkcdCommands", + "Module": "Searches", + "Options": null, + "Requirements": [] + } + ], + "Utility": [ + { + "Aliases": [ + ".say" + ], + "Description": "Make the bot say something, or in other words, make the bot send the message.\nYou can optionally specify the channel where the bot will send the message.\nIf you omit the channel name, it will send the message in the current channel.\nSupports [embeds](https://eb.elliebot.net/)", + "Usage": [ + ".say hi", + ".say #chat hi" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".whosplaying", + ".whpl" + ], + "Description": "Shows a list of users who are playing the specified game.", + "Usage": [ + ".whosplaying Overwatch" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".inrole" + ], + "Description": "Lists every person from the specified role on this server. You can specify a page before the role to jump to that page. Provide no role to list users who have no roles", + "Usage": [ + ".inrole RoleName", + ".inrole 5 RoleName", + ".inrole" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".checkperms" + ], + "Description": "Checks yours or bot's user-specific permissions on this channel.", + "Usage": [ + ".checkperms me", + ".checkperms bot" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".userid", + ".uid" + ], + "Description": "Shows user ID.", + "Usage": [ + ".userid", + ".userid @Someone" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".roleid", + ".rid" + ], + "Description": "Shows the id of the specified role.", + "Usage": [ + ".roleid Some Role" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".channelid", + ".cid" + ], + "Description": "Shows current channel ID.", + "Usage": [ + ".channelid" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".serverid", + ".sid" + ], + "Description": "Shows current server ID.", + "Usage": [ + ".serverid" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".roles" + ], + "Description": "List roles on this server or roles of a user if specified. Paginated, 20 roles per page.", + "Usage": [ + ".roles 2", + ".roles @Someone" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".channeltopic", + ".ct" + ], + "Description": "Sends current channel's topic as a message.", + "Usage": [ + ".channeltopic" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".stats" + ], + "Description": "Shows some basic stats for Ellie.", + "Usage": [ + ".stats" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".showemojis", + ".se" + ], + "Description": "Shows a name and a link to every SPECIAL emoji in the message.", + "Usage": [ + ".showemojis A message full of SPECIAL emojis" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".emojiadd", + ".ea" + ], + "Description": "Adds the specified emoji to this server.\nYou can specify a name before the emoji to add it under a different name.\nYou can specify a name followed by an image link to add a new emoji from an image.\nYou can omit imageUrl and instead upload the image as an attachment. \nImage size has to be below 256KB.", + "Usage": [ + ".emojiadd :someonesCustomEmoji:", + ".emojiadd MyEmojiName :someonesCustomEmoji:", + ".emojiadd owoNice https://cdn.discordapp.com/emojis/587930873811173386.png?size=128" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageEmojisAndStickers Server Permission" + ] + }, + { + "Aliases": [ + ".emojiremove", + ".emojirm", + ".er", + ".ed", + ".emojidel", + ".emojidelete" + ], + "Description": "Removes the specified emoji or emojis from this server.", + "Usage": [ + ".emojiremove :eagleWarrior: :plumedArcher:" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageEmojisAndStickers Server Permission" + ] + }, + { + "Aliases": [ + ".stickeradd", + ".sa" + ], + "Description": "Adds the sticker from your message to this server.\nSend the sticker along with this command (in the same message).\nAlternatively you can upload an image along with this command but you have to specify the name.\nThe image must be 300x300 in .png or .apng format and up to 512KB in size.", + "Usage": [ + ".stickeradd", + ".stickeradd name \"description\" tag1 tag2 tagN" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageEmojisAndStickers Server Permission" + ] + }, + { + "Aliases": [ + ".listservers" + ], + "Description": "Lists servers the bot is on with some basic info. 15 per page.", + "Usage": [ + ".listservers 3" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".showembed" + ], + "Description": "Prints the json equivalent of the embed of the message specified by its Id.", + "Usage": [ + ".showembed 820022733172121600", + ".showembed #some-channel 820022733172121600" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".savechat" + ], + "Description": "Saves a number of messages to a text file and sends it to you.", + "Usage": [ + ".savechat 150" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".ping" + ], + "Description": "Ping the bot to see if there are latency issues.", + "Usage": [ + ".ping" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".verboseerror", + ".ve" + ], + "Description": "Toggles or sets whether the bot should print command errors when a command is incorrectly used.", + "Usage": [ + ".verboseerror", + ".verboseerror false" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".afk" + ], + "Description": "Toggles AFK status for yourself with the specified message. \nIf you don't provide a message it default to a generic one.\nAnyone @ mentioning you in any server will receive the afk message.\nThis will only work if the other user's message starts with the mention.", + "Usage": [ + ".afk" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".eval" + ], + "Description": "Execute arbitrary C# code and (optionally) return a result. Several namespaces are included by default.\nSpecial variables available: \n`self` - Instance of the command group executing the command (this)\n`guild` - Server in which the command is executed\n`channel` - Channel in which the command is executed\n`user` - User executing the command\n`ctx` - Discord.Net command context\n`services` - Ellie's IServiceProvider", + "Usage": [ + ".eval 123 / 4.5f", + ".eval await ctx.OkAsync();", + ".eval await ctx.Response().Confirm(\"uwu\").SendAsync();" + ], + "Submodule": "Utility", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only", + "No Public Bot" + ] + }, + { + "Aliases": [ + ".prompt" + ], + "Description": "Ask the bot to do something for you.\nThis will fall back to the chatbot service in case of an error.", + "Usage": [ + ".prompt What's the weather like today?" + ], + "Submodule": "PromptCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".aliasesclear", + ".aliasclear" + ], + "Description": "Deletes all aliases on this server.", + "Usage": [ + ".aliasesclear" + ], + "Submodule": "CommandMapCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".alias", + ".cmdmap" + ], + "Description": "Create a custom alias for a certain Ellie command. Provide no alias to remove the existing one.", + "Usage": [ + ".alias allin .bf all h" + ], + "Submodule": "CommandMapCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".aliaslist", + ".cmdmaplist", + ".aliases" + ], + "Description": "Shows the list of currently set aliases. Paginated.", + "Usage": [ + ".aliaslist", + ".aliaslist 3" + ], + "Submodule": "CommandMapCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".calculate", + ".calc" + ], + "Description": "Evaluate a mathematical expression.", + "Usage": [ + ".calculate 1+1" + ], + "Submodule": "CalcCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".calcops" + ], + "Description": "Shows all available operations in the `.calc` command", + "Usage": [ + ".calcops" + ], + "Submodule": "CalcCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".configreload", + ".creload", + ".confreload", + ".crel" + ], + "Description": "Reloads specified configuration", + "Usage": [ + ".configreload bot", + ".configreload gambling" + ], + "Submodule": "ConfigCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".config", + ".conf" + ], + "Description": "Gets or sets configuration values.\nProvide no arguments to see the list of configs you can edit/view.\nProvide config name to see all properties in that configuration and their values.\nProvide config name and property name to see that property's description and value.\nProvide config name, property name and value to set that property to the new value.", + "Usage": [ + ".config", + ".config bot", + ".config bot color.ok", + ".config bot color.ok ff0000" + ], + "Submodule": "ConfigCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".ga start" + ], + "Description": "Starts a giveaway. Specify the duration (between 1 minute and 30 days) followed by the prize.", + "Usage": [ + ".ga start 12h We are giving away one copy of our latest album!", + ".ga start 15m Quick giveaway for a free course!", + ".ga start 1d Join to win 1000$!" + ], + "Submodule": "Giveaways", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".ga end" + ], + "Description": "Prematurely ends a giveaway and selects a winner. Specify the ID of the giveaway to end.", + "Usage": [ + ".ga end ab3" + ], + "Submodule": "Giveaways", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".ga reroll" + ], + "Description": "Rerolls a giveaway. Specify the ID of the giveaway to reroll. This is only active within 24h after the giveaway has ended or until the bot restarts.", + "Usage": [ + ".ga reroll cd3" + ], + "Submodule": "Giveaways", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".ga cancel" + ], + "Description": "Cancels a giveaway. Specify the ID of the giveaway to cancel. The winner will not be chosen.", + "Usage": [ + ".ga cancel ab3" + ], + "Submodule": "Giveaways", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".ga list" + ], + "Description": "Lists all active giveaways.", + "Usage": [ + ".ga list" + ], + "Submodule": "Giveaways", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".serverinfo", + ".sinfo" + ], + "Description": "Shows info about the server with the specified ID. The bot has to be on that server. If no server is supplied, it defaults to current one.", + "Usage": [ + ".serverinfo 123123132233" + ], + "Submodule": "InfoCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".channelinfo", + ".cinfo" + ], + "Description": "Shows info about the channel. If no channel is supplied, it defaults to current one.", + "Usage": [ + ".channelinfo #some-channel" + ], + "Submodule": "InfoCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".roleinfo", + ".rinfo" + ], + "Description": "Shows info about the specified role.", + "Usage": [ + ".roleinfo Gamers" + ], + "Submodule": "InfoCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".userinfo", + ".uinfo" + ], + "Description": "Shows info about the user. If no user is supplied, it defaults a user running the command.", + "Usage": [ + ".userinfo @SomeUser" + ], + "Submodule": "InfoCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".invitecreate", + ".invcr" + ], + "Description": "Creates a new invite which has infinite max uses and never expires.", + "Usage": [ + ".invitecreate" + ], + "Submodule": "InviteCommands", + "Module": "Utility", + "Options": [ + "`--max-uses` (`-m`) Maximum number of times the invite can be used. Default 0 (never). ", + "`--unique` (`-u`) Not setting this flag will result in bot getting the existing invite with the same settings if it exists, instead of creating a new one. ", + "`--temporary` (`-t`) If this flag is set, the user will be kicked from the guild once they close their client. ", + "`--expire` (`-e`) Time in seconds to expire the invite. Default 0 (no expiry). " + ], + "Requirements": [ + "CreateInstantInvite Channel Permission" + ] + }, + { + "Aliases": [ + ".invitelist", + ".invlist", + ".invlst" + ], + "Description": "Lists all invites for this channel. Paginated with 9 per page.", + "Usage": [ + ".invitelist", + ".invitelist 3" + ], + "Submodule": "InviteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageChannels Channel Permission" + ] + }, + { + "Aliases": [ + ".invitedelete", + ".invrm", + ".invdel" + ], + "Description": "Deletes an invite on the specified index. Use `.invitelist` to see the list of invites.", + "Usage": [ + ".invitedelete 2" + ], + "Submodule": "InviteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageChannels Channel Permission" + ] + }, + { + "Aliases": [ + ".listquotes", + ".liqu" + ], + "Description": "Lists all quotes on the server ordered alphabetically or by ID. 15 Per page.", + "Usage": [ + ".listquotes 3", + ".listquotes 3 id" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quoteprint", + "..." + ], + "Description": "Prints a random quote with a specified name.", + "Usage": [ + ".quoteprint abc" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quoteshow", + ".qshow" + ], + "Description": "Shows information about a quote with the specified ID.", + "Usage": [ + ".quoteshow 123" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quotesearch", + ".qsearch" + ], + "Description": "Shows a random quote given a search query. Partially matches in several ways: 1) Only content of any quote, 2) only by author, 3) keyword and content, 3) or keyword and author", + "Usage": [ + ".quotesearch \"find this long text\"", + ".quotesearch AuthorName", + ".quotesearch keyword some text", + ".quotesearch keyword AuthorName" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quoteid", + ".qid" + ], + "Description": "Displays the quote with the specified ID number. Quote ID numbers can be found by typing `.liqu [num]` where `[num]` is a number of a page which contains 15 quotes.", + "Usage": [ + ".quoteid 123456" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quoteadd", + ".." + ], + "Description": "Adds a new quote with the specified name and message.", + "Usage": [ + ".quoteadd sayhi Hi" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quoteedit", + ".qedit" + ], + "Description": "Edits a quote with the specified ID.", + "Usage": [ + ".quoteedit 55 This is the new response." + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quotedelete", + ".qdel" + ], + "Description": "Deletes a quote with the specified ID. You have to either have the Manage Messages permission or be the creator of the quote to delete it.", + "Usage": [ + ".quotedelete 123456" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".quotedeleteauthor", + ".qdelauth" + ], + "Description": "Deletes all quotes by the specified author. If the author is not you, then ManageMessage server permission is required.", + "Usage": [ + ".quotedeleteauthor @QuoteSpammer" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".delallquotes", + ".daq", + ".delallq" + ], + "Description": "Deletes all quotes on a specified keyword.", + "Usage": [ + ".delallquotes kek" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".quotesexport", + ".qexport" + ], + "Description": "Exports quotes from the current server into a .yml file", + "Usage": [ + ".quotesexport" + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".quotesimport", + ".qimport" + ], + "Description": "Upload the file or send the raw .yml data with this command to import all quotes from the specified string or file into the current server.", + "Usage": [ + ".quotesimport " + ], + "Submodule": "QuoteCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".remind" + ], + "Description": "Sets a reminder which will be sent to you or to the targeted channel after certain amount of time (max 2 months).\nFirst parameter is `me` / `here` / 'channelname'\nSecond parameter is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m.\nThird parameter is a (multiword) message.\nRequires ManageMessages server permission if you're targeting a different channel.", + "Usage": [ + ".remind me 1d5h Do something", + ".remind #general 1m Start now!" + ], + "Submodule": "RemindCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".remindlist", + ".remindl", + ".remindlst" + ], + "Description": "Lists all reminders you created. You can specify 'server' option if you're an Administrator to list all reminders created on this server. Paginated.", + "Usage": [ + ".remindlist 1", + ".remindlist server 2" + ], + "Submodule": "RemindCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".reminddelete", + ".remindrm", + ".reminddel" + ], + "Description": "Deletes a reminder on the specified index. You can specify 'server' option if you're an Administrator, and you want to delete a reminder on this server created by someone else. ", + "Usage": [ + ".reminddelete 3", + ".reminddelete server 2" + ], + "Submodule": "RemindCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".repeatskip", + ".repski" + ], + "Description": "Specify a repeater's ID to toggle whether the next trigger of the repeater will be skipped.\nThis setting is not stored in the database and will get reset if the bot is restarted.", + "Usage": [ + ".repeatskip 3" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".repeatinvoke", + ".repinv" + ], + "Description": "Immediately post the repeat message on a certain index and restarts its timer.", + "Usage": [ + ".repeatinvoke 1" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".repeatremove", + ".reprm" + ], + "Description": "Removes a repeating message by index. Use `.replst` to see indexes.", + "Usage": [ + ".repeatremove 2" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".repeatredun", + ".repred" + ], + "Description": "Specify repeater's index (Use `.replst` to see indexes) to toggle whether the message should be reposted if the last message in the channel is the same repeater's message.\nThis is useful if you want to remind everyone to be nice every so often, but don't want to have the bot spam the channel. This is NOT useful if you want to periodically ping someone.", + "Usage": [ + ".repeatredun 1" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".repeat" + ], + "Description": "Repeat a message once per specified time increment in the current channel. \nYou can specify a different channel as the first argument instead.\nYou can also specify time of day for the message to be repeated daily (make sure you've set your server's `.timezone`). \nIf you specify time of day, you can still override the default daily interval with your own interval. \nYou can have up to 5 repeating messages on one server in total.", + "Usage": [ + ".repeat Hello there", + ".repeat #other-channel hello there", + ".repeat 1h5m Hello @erryone", + ".repeat 10:00 Daily have a nice day! This will execute once every 24h.", + ".repeat #other-channel 10:00 Daily have a nice day! This will execute once every 24h.", + ".repeat 21:00 30m Starting at 21 and every 30 minutes after that i will send this message!" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".repeatlist", + ".replst", + ".replist", + ".repli" + ], + "Description": "Lists currently repeating messages and their indexes.", + "Usage": [ + ".repeatlist" + ], + "Submodule": "RepeatCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageMessages Server Permission" + ] + }, + { + "Aliases": [ + ".streamrole" + ], + "Description": "Sets a role which is monitored for streamers (FromRole), and a role to add if a user from 'FromRole' is streaming (AddRole). When a user from 'FromRole' starts streaming, they will receive an 'AddRole'. You can only have 1 Stream Role per server. Provide no parameters to disable", + "Usage": [ + ".streamrole \"Eligible Streamers\" \"Featured Streams\"" + ], + "Submodule": "StreamRoleCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".streamrolekeyword", + ".srkw" + ], + "Description": "Sets keyword which is required in the stream's title in order for the streamrole to apply. Provide no keyword in order to reset.", + "Usage": [ + ".streamrolekeyword", + ".streamrolekeyword PUBG" + ], + "Submodule": "StreamRoleCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".streamroleblacklist", + ".srbl" + ], + "Description": "Adds or removes a blacklisted user. Blacklisted users will never receive the stream role.", + "Usage": [ + ".streamroleblacklist add @Someone#1234", + ".streamroleblacklist rem @Someone#1234" + ], + "Submodule": "StreamRoleCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".streamrolewhitelist", + ".srwl" + ], + "Description": "Adds or removes a whitelisted user. Whitelisted users will receive the stream role even if they don't have the specified keyword in their stream title.", + "Usage": [ + ".streamrolewhitelist add @Someone#1234", + ".streamrolewhitelist rem @Someone#1234" + ], + "Submodule": "StreamRoleCommands", + "Module": "Utility", + "Options": null, + "Requirements": [ + "ManageRoles Server Permission" + ] + }, + { + "Aliases": [ + ".todo add", + ".todo a" + ], + "Description": "Adds a new todo.", + "Usage": [ + ".todo add I need to do this" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo edit", + ".todo change" + ], + "Description": "Edits a todo with the specified ID.", + "Usage": [ + ".todo edit abc This is an updated entry" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo list", + ".todo ls" + ], + "Description": "Lists all todos.", + "Usage": [ + ".todo list" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo show", + ".todo sh", + ".todo see" + ], + "Description": "Shows the text of the todo with the specified ID.", + "Usage": [ + ".todo show 4a" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo complete", + ".todo done", + ".todo finish" + ], + "Description": "Marks a todo with the specified ID as done.", + "Usage": [ + ".todo complete 4a" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo delete", + ".todo del", + ".todo remove", + ".todo rm" + ], + "Description": "Deletes a todo with the specified ID.", + "Usage": [ + ".todo delete abc" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo clear", + ".todo clr", + ".todo cls" + ], + "Description": "Deletes all unarchived todos.", + "Usage": [ + ".todo clear" + ], + "Submodule": "todo", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo archive add", + ".todo archive create", + ".todo archive new" + ], + "Description": "Creates a new archive with the specified name using current todos.", + "Usage": [ + ".todo archive add Day 1" + ], + "Submodule": "archive", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo archive list", + ".todo archive ls" + ], + "Description": "Lists all archived todo lists.", + "Usage": [ + ".todo archive list" + ], + "Submodule": "archive", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo archive show" + ], + "Description": "Shows the archived todo list with the specified ID.", + "Usage": [ + ".todo archive show 3c" + ], + "Submodule": "archive", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".todo archive delete", + ".todo archive del", + ".todo archive remove", + ".todo archive rm" + ], + "Description": "Deletes the archived todo list with the specified ID.", + "Usage": [ + ".todo archive delete 99" + ], + "Submodule": "archive", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".convertlist" + ], + "Description": "List of the convertible dimensions and currencies.", + "Usage": [ + ".convertlist" + ], + "Submodule": "UnitConverterCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".convert" + ], + "Description": "Convert quantities. Use `.convertlist` to see supported dimensions and currencies.", + "Usage": [ + ".convert m km 1000" + ], + "Submodule": "UnitConverterCommands", + "Module": "Utility", + "Options": null, + "Requirements": [] + } + ], + "Xp": [ + { + "Aliases": [ + ".experience", + ".xp" + ], + "Description": "Shows your xp stats. Specify the user to show that user's stats instead.", + "Usage": [ + ".experience", + ".experience @someguy" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpnotify", + ".xpn" + ], + "Description": "Sets how the bot should notify you when you get a `server` or `global` level. This is a personal setting and affects only how you receive Global or Server level-up notifications. You can set `dm` (for the bot to send you a direct message), `channel` (to get notified in the channel you sent the last message in) or `none` to disable.", + "Usage": [ + ".xpnotify global dm", + ".xpnotify server channel" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpexclude", + ".xpex" + ], + "Description": "Exclude a channel, role or current server from the xp system.", + "Usage": [ + ".xpexclude Role Excluded-Role", + ".xpexclude Server" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".xpexclusionlist", + ".xpexl" + ], + "Description": "Shows the roles and channels excluded from the XP system on this server, as well as whether the whole server is excluded.", + "Usage": [ + ".xpexclusionlist" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpleaderboard", + ".xplb" + ], + "Description": "Shows current server's xp leaderboard.", + "Usage": [ + ".xpleaderboard" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": [ + "`--clean` (`-c`) Only show users who are on the server. " + ], + "Requirements": [] + }, + { + "Aliases": [ + ".xpgleaderboard", + ".xpglb" + ], + "Description": "Shows the global xp leaderboard.", + "Usage": [ + ".xpgleaderboard" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpadd" + ], + "Description": "Adds server XP to a single user or all users role on this server. This does not affect their global ranking. You can use negative values.", + "Usage": [ + ".xpadd 100 @Someone", + ".xpadd 500 SomeRoleName" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".xptempreload", + ".xptr" + ], + "Description": "Reloads the xp template file. Xp template file allows you to customize the position and color of elements on the `.xp` card.", + "Usage": [ + ".xptempreload" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + }, + { + "Aliases": [ + ".xpreset" + ], + "Description": "Resets specified user's XP, or the XP of all users in the server. You can't reverse this action.", + "Usage": [ + ".xpreset @Someone", + ".xpreset" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".xpshop" + ], + "Description": "Access the xp shop (if enabled). You can purchase either xp card frames or backgrounds. You can optionally provide a page number", + "Usage": [ + ".xpshop bgs", + ".xpshop frames", + ".xpshop bgs 3" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpshopbuy" + ], + "Description": "Buy an item from the xp shop by specifying the type and the key of the item.", + "Usage": [ + ".xpshopbuy bg open_sea", + ".xpshopbuy fr gold" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xpshopuse" + ], + "Description": "Use a previously purchased item from the xp shop by specifying the type and the key of the item.", + "Usage": [ + ".xpshopuse bg synth", + ".xpshopuse fr default" + ], + "Submodule": "Xp", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubtransfer" + ], + "Description": "Transfers the ownership of the club to another member of the club.", + "Usage": [ + ".clubtransfer @Someone" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubadmin" + ], + "Description": "Assigns (or unassigns) staff role to the member of the club. Admins can ban, kick and accept applications.", + "Usage": [ + ".clubadmin @Someone" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubcreate" + ], + "Description": "Creates a club. You must be at least level 5 and not be in the club already.", + "Usage": [ + ".clubcreate My Brand New Club" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubicon" + ], + "Description": "Sets the club icon.", + "Usage": [ + ".clubicon https://i.imgur.com/htfDMfU.png" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubinfo" + ], + "Description": "Shows information about the club.", + "Usage": [ + ".clubinfo My Brand New Club#23" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubbans" + ], + "Description": "Shows the list of users who have banned from your club. Paginated. You must be club owner to use this command.", + "Usage": [ + ".clubbans 2" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubapps" + ], + "Description": "Shows the list of users who have applied to your club. Paginated. You must be club owner to use this command.", + "Usage": [ + ".clubapps 2" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubapply" + ], + "Description": "Apply to join a club. You must meet that club's minimum level requirement, and not be on its ban list.", + "Usage": [ + ".clubapply My Brand New Club#23" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubaccept" + ], + "Description": "Accept a user who applied to your club.", + "Usage": [ + ".clubaccept user#1337" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubreject" + ], + "Description": "Reject a user who applied to your club.", + "Usage": [ + ".clubreject user#1337" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubleave" + ], + "Description": "Leaves the club you're currently in.", + "Usage": [ + ".clubleave" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubkick" + ], + "Description": "Kicks the user from the club. You must be the club owner. They will be able to apply again.", + "Usage": [ + ".clubkick user#1337" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubban" + ], + "Description": "Bans the user from the club. You must be the club owner. They will not be able to apply again.", + "Usage": [ + ".clubban user#1337" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubunban" + ], + "Description": "Unbans the previously banned user from the club. You must be the club owner.", + "Usage": [ + ".clubunban user#1337" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubdesc" + ], + "Description": "Sets the club description. Maximum 150 characters. Club owner only.", + "Usage": [ + ".clubdesc This is the best club please join." + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubdisband" + ], + "Description": "Disbands the club you're the owner of. This action is irreversible.", + "Usage": [ + ".clubdisband" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clublb", + ".clubs" + ], + "Description": "Shows club rankings on the specified page.", + "Usage": [ + ".clublb 2" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".clubrename" + ], + "Description": "Renames your club. Requires you club ownership or club-admin status.", + "Usage": [ + ".clubrename New cool club name" + ], + "Submodule": "Club", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xprewsreset" + ], + "Description": "Resets all currently set xp level up rewards.", + "Usage": [ + ".xprewsreset" + ], + "Submodule": "XpRewards", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".xplvluprewards", + ".xprews", + ".xpcrs", + ".xprrs", + ".xprolerewards", + ".xpcurrewards" + ], + "Description": "Shows currently set level up rewards.", + "Usage": [ + ".xplvluprewards" + ], + "Submodule": "XpRewards", + "Module": "Xp", + "Options": null, + "Requirements": [] + }, + { + "Aliases": [ + ".xprolereward", + ".xprr" + ], + "Description": "Add or remove a role from the user who reaches the specified level.\nProvide no action and role name in order to remove the role reward.", + "Usage": [ + ".xprolereward 1 rm Newbie", + ".xprolereward 3 add Social", + ".xprolereward 5 add Member", + ".xprolereward 5" + ], + "Submodule": "XpRewards", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Administrator Server Permission" + ] + }, + { + "Aliases": [ + ".xpcurreward", + ".xpcr" + ], + "Description": "Sets a currency reward on a specified level. Provide no amount in order to remove the reward.", + "Usage": [ + ".xpcurreward 3 50" + ], + "Submodule": "XpRewards", + "Module": "Xp", + "Options": null, + "Requirements": [ + "Bot Owner Only" + ] + } + ] +} \ No newline at end of file -- 2.43.0 From f10c49ec6131a708efc5341f5dbbc67944778165 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 11 Aug 2024 19:26:03 +1200 Subject: [PATCH 088/253] Simplified some command strings --- src/EllieBot/data/strings/commands/commands.en-US.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 817d774..027754e 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -2085,13 +2085,13 @@ urbandict: - query: desc: "The term being searched for in the dictionary." catfact: - desc: Shows a random catfact from + desc: Shows a random fact about cats. ex: - '' params: - {} yomama: - desc: Shows a random joke from + desc: Shows a random yomama joke. ex: - '' params: @@ -2109,7 +2109,7 @@ chucknorris: params: - {} magicitem: - desc: Shows a random magic item from + desc: Shows a random magic item with its description. ex: - '' params: @@ -3679,8 +3679,8 @@ eightball: ytuploadnotif: desc: |- Subscribe to a youtube channel's upload rss feed. - Shortcut for `.feed https://www.youtube.com/feeds/videos.xml?channel_id=%3Cyoutube_channel_id` You can optionally specify a message which will be posted with an update. + This is just a shortcut for `.feed` with a url of the youtube channel's rss feed. ex: - https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow - https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted -- 2.43.0 From 1256562ad9390e2f86277d70731249ca80282b01 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 11 Aug 2024 19:27:30 +1200 Subject: [PATCH 089/253] Upped games.yml to v5 This should have happened 2 updates ago --- src/EllieBot/data/games.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EllieBot/data/games.yml b/src/EllieBot/data/games.yml index b5fa9c1..01f0261 100644 --- a/src/EllieBot/data/games.yml +++ b/src/EllieBot/data/games.yml @@ -1,5 +1,5 @@ -# DO NOT CHANGE -version: 4 +# DO NOT CHANGE +version: 5 # Hangman related settings (.hangman command) hangman: # The amount of currency awarded to the winner of a hangman game @@ -56,7 +56,7 @@ raceAnimals: name: Unicorn # Which chatbot API should bot use. # 'cleverbot' - bot will use Cleverbot API. -# 'gpt' - bot will use GPT API +# 'openai' - bot will use OpenAi API chatBot: OpenAi chatGpt: # Url to any openai api compatible url. -- 2.43.0 From 53b7ba640de951d44e4a034a7448ac925144e36c Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 11 Aug 2024 19:28:16 +1200 Subject: [PATCH 090/253] Updated commandlist --- src/EllieBot/data/commandlist.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EllieBot/data/commandlist.json b/src/EllieBot/data/commandlist.json index c549ef0..5691f14 100644 --- a/src/EllieBot/data/commandlist.json +++ b/src/EllieBot/data/commandlist.json @@ -5413,7 +5413,7 @@ "Aliases": [ ".catfact" ], - "Description": "Shows a random catfact from ", + "Description": "Shows a random fact about cats.", "Usage": [ ".catfact" ], @@ -5574,7 +5574,7 @@ ".ytuploadnotif", ".yun" ], - "Description": "Subscribe to a youtube channel's upload rss feed.\nShortcut for `.feed https://www.youtube.com/feeds/videos.xml?channel_id=%3Cyoutube_channel_id`\nYou can optionally specify a message which will be posted with an update.", + "Description": "Subscribe to a youtube channel's upload rss feed.\nYou can optionally specify a message which will be posted with an update.\nThis is just a shortcut for `.feed` with a url of the youtube channel's rss feed.", "Usage": [ ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow", ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted" @@ -5642,7 +5642,7 @@ ".yomama", ".ym" ], - "Description": "Shows a random joke from ", + "Description": "Shows a random yomama joke.", "Usage": [ ".yomama" ], @@ -5697,7 +5697,7 @@ ".magicitem", ".mi" ], - "Description": "Shows a random magic item from ", + "Description": "Shows a random magic item with its description.", "Usage": [ ".magicitem" ], -- 2.43.0 From cd92577095febb5716ae7fe488a9ab0d3d7b9ea3 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 11 Aug 2024 20:00:01 +1200 Subject: [PATCH 091/253] Moved streamlist logic to the service file --- .../StreamNotificationCommands.cs | 17 +--------- .../StreamNotificationService.cs | 33 +++++++++++++++---- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs index 0710956..ed260ae 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs @@ -69,22 +69,7 @@ public partial class Searches if (page-- < 1) return; - var allStreams = new List(); - await using (var uow = _db.GetDbContext()) - { - var all = uow.GuildConfigsForId(ctx.Guild.Id, set => set.Include(gc => gc.FollowedStreams)) - .FollowedStreams.OrderBy(x => x.Id) - .ToList(); - - for (var index = all.Count - 1; index >= 0; index--) - { - var fs = all[index]; - if (((SocketGuild)ctx.Guild).GetTextChannel(fs.ChannelId) is null) - await _service.UnfollowStreamAsync(fs.GuildId, index); - else - allStreams.Insert(0, fs); - } - } + var allStreams = await _service.GetAllStreamsAsync((SocketGuild)ctx.Guild); await Response() .Paginated() diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs index 5d40000..03bcb13 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs @@ -253,7 +253,7 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor { var ch = _client.GetGuild(fs.GuildId) ?.GetTextChannel(fs.ChannelId); - + if (ch is null) return Task.CompletedTask; @@ -492,10 +492,10 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor public EmbedBuilder GetEmbed(ulong guildId, StreamData status, bool showViewers = true) { var embed = _sender.CreateEmbed() - .WithTitle(status.Name) - .WithUrl(status.StreamUrl) - .WithDescription(status.StreamUrl) - .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true); + .WithTitle(status.Name) + .WithUrl(status.StreamUrl) + .WithDescription(status.StreamUrl) + .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true); if (showViewers) { @@ -625,7 +625,7 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor all.ForEach(x => x.Message = message); uow.SaveChanges(); - + lock (_shardLock) { foreach (var fs in all) @@ -647,4 +647,25 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor public StreamDataKey Key { get; init; } public ulong GuildId { get; init; } } + + public async Task> GetAllStreamsAsync(SocketGuild guild) + { + var allStreams = new List(); + await using var uow = _db.GetDbContext(); + var all = uow.GuildConfigsForId(guild.Id, set => set.Include(gc => gc.FollowedStreams)) + .FollowedStreams + .OrderBy(x => x.Id) + .ToList(); + + for (var index = all.Count - 1; index >= 0; index--) + { + var fs = all[index]; + if (guild.GetTextChannel(fs.ChannelId) is null) + await UnfollowStreamAsync(fs.GuildId, index); + else + allStreams.Insert(0, fs); + } + + return allStreams; + } } \ No newline at end of file -- 2.43.0 From 6128703bcc20d9cc02094d850c477346200f5ebf Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 13 Aug 2024 13:56:33 +1200 Subject: [PATCH 092/253] Started cleaning the .osu command --- src/EllieBot/Modules/Searches/OsuCommands.cs | 72 +++++++++---------- src/EllieBot/Modules/Searches/OsuService.cs | 60 ++++++++++++++++ .../Modules/Searches/_common/OsuUserData.cs | 3 + 3 files changed, 95 insertions(+), 40 deletions(-) create mode 100644 src/EllieBot/Modules/Searches/OsuService.cs diff --git a/src/EllieBot/Modules/Searches/OsuCommands.cs b/src/EllieBot/Modules/Searches/OsuCommands.cs index 599df2d..2217419 100644 --- a/src/EllieBot/Modules/Searches/OsuCommands.cs +++ b/src/EllieBot/Modules/Searches/OsuCommands.cs @@ -7,7 +7,7 @@ namespace EllieBot.Modules.Searches; public partial class Searches { [Group] - public partial class OsuCommands : EllieModule + public partial class OsuCommands : EllieModule { private readonly IBotCredentials _creds; private readonly IHttpClientFactory _httpFactory; @@ -24,9 +24,6 @@ public partial class Searches if (string.IsNullOrWhiteSpace(user)) return; - using var http = _httpFactory.CreateClient(); - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - try { if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) @@ -35,37 +32,32 @@ public partial class Searches return; } - var smode = ResolveGameMode(modeNumber); - var userReq = $"https://osu.ppy.sh/api/get_user?k={_creds.OsuApiKey}&u={user}&m={modeNumber}"; - var userResString = await http.GetStringAsync(userReq); - var objs = JsonConvert.DeserializeObject>(userResString); - - if (objs.Count == 0) + var obj = await _service.GetOsuData(user, mode); + if (obj is null) { await Response().Error(strs.osu_user_not_found).SendAsync(); return; } - var obj = objs[0]; var userId = obj.UserId; + var smode = ResolveGameMode(obj.ModeNumber); - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu! {smode} profile for {user}") - .WithThumbnailUrl($"https://a.ppy.sh/{userId}") - .WithDescription($"https://osu.ppy.sh/u/{userId}") - .AddField("Official Rank", $"#{obj.PpRank}", true) - .AddField("Country Rank", - $"#{obj.PpCountryRank} :flag_{obj.Country.ToLower()}:", - true) - .AddField("Total PP", Math.Round(obj.PpRaw, 2), true) - .AddField("Accuracy", Math.Round(obj.Accuracy, 2) + "%", true) - .AddField("Playcount", obj.Playcount, true) - .AddField("Level", Math.Round(obj.Level), true)).SendAsync(); - } - catch (ArgumentOutOfRangeException) - { - await Response().Error(strs.osu_user_not_found).SendAsync(); + + await Response() + .Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle($"osu! {smode} profile for {user}") + .WithThumbnailUrl($"https://a.ppy.sh/{userId}") + .WithDescription($"https://osu.ppy.sh/u/{userId}") + .AddField("Official Rank", $"#{obj.PpRank}", true) + .AddField("Country Rank", + $"#{obj.PpCountryRank} :flag_{obj.Country.ToLower()}:", + true) + .AddField("Total PP", Math.Round(obj.PpRaw, 2), true) + .AddField("Accuracy", Math.Round(obj.Accuracy, 2) + "%", true) + .AddField("Playcount", obj.Playcount, true) + .AddField("Level", Math.Round(obj.Level), true)) + .SendAsync(); } catch (Exception ex) { @@ -96,18 +88,18 @@ public partial class Searches var userStats = statsResponse.Stats; var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu!Gatari {modeStr} profile for {user}") - .WithThumbnailUrl($"https://a.gatari.pw/{userStats.Id}") - .WithDescription($"https://osu.gatari.pw/u/{userStats.Id}") - .AddField("Official Rank", $"#{userStats.Rank}", true) - .AddField("Country Rank", - $"#{userStats.CountryRank} :flag_{userData.Country.ToLower()}:", - true) - .AddField("Total PP", userStats.Pp, true) - .AddField("Accuracy", $"{Math.Round(userStats.AvgAccuracy, 2)}%", true) - .AddField("Playcount", userStats.Playcount, true) - .AddField("Level", userStats.Level, true); + .WithOkColor() + .WithTitle($"osu!Gatari {modeStr} profile for {user}") + .WithThumbnailUrl($"https://a.gatari.pw/{userStats.Id}") + .WithDescription($"https://osu.gatari.pw/u/{userStats.Id}") + .AddField("Official Rank", $"#{userStats.Rank}", true) + .AddField("Country Rank", + $"#{userStats.CountryRank} :flag_{userData.Country.ToLower()}:", + true) + .AddField("Total PP", userStats.Pp, true) + .AddField("Accuracy", $"{Math.Round(userStats.AvgAccuracy, 2)}%", true) + .AddField("Playcount", userStats.Playcount, true) + .AddField("Level", userStats.Level, true); await Response().Embed(embed).SendAsync(); } diff --git a/src/EllieBot/Modules/Searches/OsuService.cs b/src/EllieBot/Modules/Searches/OsuService.cs new file mode 100644 index 0000000..3c20bcd --- /dev/null +++ b/src/EllieBot/Modules/Searches/OsuService.cs @@ -0,0 +1,60 @@ +#nullable disable +using EllieBot.Modules.Searches.Common; +using Newtonsoft.Json; + +namespace EllieBot.Modules.Searches; + +public sealed class OsuService : IEService +{ + private readonly IHttpClientFactory _httpFactory; + private readonly IBotCredentials _creds; + + public OsuService(IHttpClientFactory httpFactory, IBotCredentials creds) + { + _httpFactory = httpFactory; + _creds = creds; + } + + public async Task GetOsuData(string username, string mode) + { + using var http = _httpFactory.CreateClient(); + + var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); + var userReq = $"https://osu.ppy.sh/api/get_user?k={_creds.OsuApiKey}&u={username}&m={modeNumber}"; + var userResString = await http.GetStringAsync(userReq); + + if (string.IsNullOrWhiteSpace(userResString)) + return null; + var objs = JsonConvert.DeserializeObject>(userResString); + + if (objs.Count == 0) + { + return null; + } + + var obj = objs[0]; + + obj.ModeNumber = modeNumber; + return obj; + } + + private static int ResolveGameMode(string mode) + { + switch (mode.ToUpperInvariant()) + { + case "STD": + case "STANDARD": + return 0; + case "TAIKO": + return 1; + case "CTB": + case "CATCHTHEBEAT": + return 2; + case "MANIA": + case "OSU!MANIA": + return 3; + default: + return 0; + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/OsuUserData.cs b/src/EllieBot/Modules/Searches/_common/OsuUserData.cs index a59bf30..a0a1be0 100644 --- a/src/EllieBot/Modules/Searches/_common/OsuUserData.cs +++ b/src/EllieBot/Modules/Searches/_common/OsuUserData.cs @@ -67,4 +67,7 @@ public class OsuUserData [JsonProperty("pp_country_rank")] public string PpCountryRank { get; set; } + + [JsonIgnore] + public int ModeNumber { get; set; } } \ No newline at end of file -- 2.43.0 From 97f9a4e6098be4c1e970984c2140aee0d51f05c0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 13 Aug 2024 13:56:59 +1200 Subject: [PATCH 093/253] Fixed xpcurrew breaking xp gain if user gains 0 xp from being in a voice channel while voice xp is enabled --- src/EllieBot/Modules/Xp/XpService.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/EllieBot/Modules/Xp/XpService.cs b/src/EllieBot/Modules/Xp/XpService.cs index ea034a7..f32c7a5 100644 --- a/src/EllieBot/Modules/Xp/XpService.cs +++ b/src/EllieBot/Modules/Xp/XpService.cs @@ -178,8 +178,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand { foreach (var user in globalToAdd) { - var amount = user.Value.XpAmount * conf.CurrencyPerXp; - await _cs.AddAsync(user.Key, (long)(amount), null); + var amount = (long)(user.Value.XpAmount * conf.CurrencyPerXp); + if (amount > 0) + await _cs.AddAsync(user.Key, amount, null); } } @@ -422,8 +423,8 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand await _sender.Response(chan) .Confirm(_strings.GetText(strs.level_up_global(user.Mention, - Format.Bold(newLevel.ToString())), - guild.Id)) + Format.Bold(newLevel.ToString())), + guild.Id)) .SendAsync(); } } @@ -770,8 +771,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand { var channelId = channel.Id; - if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && (chans.Contains(channelId) - || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) + if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) + && (chans.Contains(channelId) + || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) return false; if (_excludedServers.Contains(user.Guild.Id)) -- 2.43.0 From a39204b4a99424fad081c998e66f763cf6da4ef1 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 13 Aug 2024 14:21:31 +1200 Subject: [PATCH 094/253] Further cleanup of osu commands --- src/EllieBot/Modules/Searches/OsuCommands.cs | 57 ++----------------- src/EllieBot/Modules/Searches/OsuService.cs | 42 +++++++++++++- .../Searches/_common/GatariUserResponse.cs | 4 +- .../_common/GatariUserStatsResponse.cs | 4 +- 4 files changed, 51 insertions(+), 56 deletions(-) diff --git a/src/EllieBot/Modules/Searches/OsuCommands.cs b/src/EllieBot/Modules/Searches/OsuCommands.cs index 2217419..8a702e9 100644 --- a/src/EllieBot/Modules/Searches/OsuCommands.cs +++ b/src/EllieBot/Modules/Searches/OsuCommands.cs @@ -40,7 +40,7 @@ public partial class Searches } var userId = obj.UserId; - var smode = ResolveGameMode(obj.ModeNumber); + var smode = OsuService.ResolveGameMode(obj.ModeNumber); await Response() @@ -69,24 +69,15 @@ public partial class Searches [Cmd] public async Task Gatari(string user, [Leftover] string mode = null) { - using var http = _httpFactory.CreateClient(); - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - - var modeStr = ResolveGameMode(modeNumber); - var resString = await http.GetStringAsync($"https://api.gatari.pw/user/stats?u={user}&mode={modeNumber}"); - - var statsResponse = JsonConvert.DeserializeObject(resString); - if (statsResponse.Code != 200 || statsResponse.Stats.Id == 0) + var modeNumber = OsuService.ResolveGameMode(mode); + var modeStr = OsuService.ResolveGameMode(modeNumber); + var (userData, userStats) = await _service.GetGatariDataAsync(user, mode); + if (userStats is null) { await Response().Error(strs.osu_user_not_found).SendAsync(); return; } - var usrResString = await http.GetStringAsync($"https://api.gatari.pw/users/get?u={user}"); - - var userData = JsonConvert.DeserializeObject(usrResString).Users[0]; - var userStats = statsResponse.Stats; - var embed = _sender.CreateEmbed() .WithOkColor() .WithTitle($"osu!Gatari {modeStr} profile for {user}") @@ -122,7 +113,7 @@ public partial class Searches using var http = _httpFactory.CreateClient(); var m = 0; if (!string.IsNullOrWhiteSpace(mode)) - m = ResolveGameMode(mode); + m = OsuService.ResolveGameMode(mode); var reqString = "https://osu.ppy.sh/api/get_user_best" + $"?k={_creds.OsuApiKey}" @@ -209,42 +200,6 @@ public partial class Searches return Math.Round(hitPoints / totalHits * 100, 2); } - private static int ResolveGameMode(string mode) - { - switch (mode.ToUpperInvariant()) - { - case "STD": - case "STANDARD": - return 0; - case "TAIKO": - return 1; - case "CTB": - case "CATCHTHEBEAT": - return 2; - case "MANIA": - case "OSU!MANIA": - return 3; - default: - return 0; - } - } - - private static string ResolveGameMode(int mode) - { - switch (mode) - { - case 0: - return "Standard"; - case 1: - return "Taiko"; - case 2: - return "Catch"; - case 3: - return "Mania"; - default: - return "Standard"; - } - } //https://github.com/ppy/osu-api/wiki#mods private static string ResolveMods(int mods) diff --git a/src/EllieBot/Modules/Searches/OsuService.cs b/src/EllieBot/Modules/Searches/OsuService.cs index 3c20bcd..66d287f 100644 --- a/src/EllieBot/Modules/Searches/OsuService.cs +++ b/src/EllieBot/Modules/Searches/OsuService.cs @@ -38,7 +38,7 @@ public sealed class OsuService : IEService return obj; } - private static int ResolveGameMode(string mode) + public static int ResolveGameMode(string mode) { switch (mode.ToUpperInvariant()) { @@ -57,4 +57,44 @@ public sealed class OsuService : IEService return 0; } } + + public static string ResolveGameMode(int mode) + { + switch (mode) + { + case 0: + return "Standard"; + case 1: + return "Taiko"; + case 2: + return "Catch"; + case 3: + return "Mania"; + default: + return "Standard"; + } + } + + public async Task<(GatariUserData userData, GatariUserStats userStats)> GetGatariDataAsync( + string user, + string mode) + { + using var http = _httpFactory.CreateClient(); + var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); + + var resString = await http.GetStringAsync($"https://api.gatari.pw/user/stats?u={user}&mode={modeNumber}"); + + var statsResponse = JsonConvert.DeserializeObject(resString); + if (statsResponse.Code != 200 || statsResponse.Stats.Id == 0) + { + return default; + } + + var usrResString = await http.GetStringAsync($"https://api.gatari.pw/users/get?u={user}"); + + var userData = JsonConvert.DeserializeObject(usrResString).Users[0]; + var userStats = statsResponse.Stats; + + return (userData, userStats); + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs b/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs index 412522a..63114ab 100644 --- a/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs +++ b/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Searches.Common; -public class UserData +public class GatariUserData { [JsonProperty("abbr")] public object Abbr { get; set; } @@ -48,5 +48,5 @@ public class GatariUserResponse public int Code { get; set; } [JsonProperty("users")] - public List Users { get; set; } + public List Users { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs index 97fee69..5e17737 100644 --- a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs +++ b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Searches.Common; -public class UserStats +public class GatariUserStats { [JsonProperty("a_count")] public int ACount { get; set; } @@ -72,5 +72,5 @@ public class GatariUserStatsResponse public int Code { get; set; } [JsonProperty("stats")] - public UserStats Stats { get; set; } + public GatariUserStats Stats { get; set; } } \ No newline at end of file -- 2.43.0 From 79bc4e75caa09aee6bdd80ebcc1344a8e0008af5 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 14 Aug 2024 17:50:58 +1200 Subject: [PATCH 095/253] fixed an issue in .gatari fully cleaned osu related commands and moved to a service --- src/EllieBot/Modules/Searches/OsuCommands.cs | 124 +---------------- src/EllieBot/Modules/Searches/OsuService.cs | 129 +++++++++++++++++- .../_common/GatariUserStatsResponse.cs | 2 +- 3 files changed, 131 insertions(+), 124 deletions(-) diff --git a/src/EllieBot/Modules/Searches/OsuCommands.cs b/src/EllieBot/Modules/Searches/OsuCommands.cs index 8a702e9..22c4a82 100644 --- a/src/EllieBot/Modules/Searches/OsuCommands.cs +++ b/src/EllieBot/Modules/Searches/OsuCommands.cs @@ -110,135 +110,15 @@ public partial class Searches return; } - using var http = _httpFactory.CreateClient(); - var m = 0; - if (!string.IsNullOrWhiteSpace(mode)) - m = OsuService.ResolveGameMode(mode); + var plays = await _service.GetOsuPlay(user, mode); - var reqString = "https://osu.ppy.sh/api/get_user_best" - + $"?k={_creds.OsuApiKey}" - + $"&u={Uri.EscapeDataString(user)}" - + "&type=string" - + "&limit=5" - + $"&m={m}"; - - var resString = await http.GetStringAsync(reqString); - var obj = JsonConvert.DeserializeObject>(resString); - - var mapTasks = obj.Select(async item => - { - var mapReqString = "https://osu.ppy.sh/api/get_beatmaps" - + $"?k={_creds.OsuApiKey}" - + $"&b={item.BeatmapId}"; - - var mapResString = await http.GetStringAsync(mapReqString); - var map = JsonConvert.DeserializeObject>(mapResString).FirstOrDefault(); - if (map is null) - return default; - var pp = Math.Round(item.Pp, 2); - var acc = CalculateAcc(item, m); - var mods = ResolveMods(item.EnabledMods); - - var title = $"{map.Artist}-{map.Title} ({map.Version})"; - var desc = $@"[/b/{item.BeatmapId}](https://osu.ppy.sh/b/{item.BeatmapId}) -{pp + "pp",-7} | {acc + "%",-7} -"; - if (mods != "+") - desc += Format.Bold(mods); - - return (title, desc); - }); var eb = _sender.CreateEmbed().WithOkColor().WithTitle($"Top 5 plays for {user}"); - var mapData = await mapTasks.WhenAll(); - foreach (var (title, desc) in mapData.Where(x => x != default)) + foreach (var (title, desc) in plays) eb.AddField(title, desc); await Response().Embed(eb).SendAsync(); } - - //https://osu.ppy.sh/wiki/Accuracy - private static double CalculateAcc(OsuUserBests play, int mode) - { - double hitPoints; - double totalHits; - if (mode == 0) - { - hitPoints = (play.Count50 * 50) + (play.Count100 * 100) + (play.Count300 * 300); - totalHits = play.Count50 + play.Count100 + play.Count300 + play.Countmiss; - totalHits *= 300; - } - else if (mode == 1) - { - hitPoints = (play.Countmiss * 0) + (play.Count100 * 0.5) + play.Count300; - totalHits = (play.Countmiss + play.Count100 + play.Count300) * 300; - hitPoints *= 300; - } - else if (mode == 2) - { - hitPoints = play.Count50 + play.Count100 + play.Count300; - totalHits = play.Countmiss + play.Count50 + play.Count100 + play.Count300 + play.Countkatu; - } - else - { - hitPoints = (play.Count50 * 50) - + (play.Count100 * 100) - + (play.Countkatu * 200) - + ((play.Count300 + play.Countgeki) * 300); - - totalHits = (play.Countmiss - + play.Count50 - + play.Count100 - + play.Countkatu - + play.Count300 - + play.Countgeki) - * 300; - } - - - return Math.Round(hitPoints / totalHits * 100, 2); - } - - - //https://github.com/ppy/osu-api/wiki#mods - private static string ResolveMods(int mods) - { - var modString = "+"; - - if (IsBitSet(mods, 0)) - modString += "NF"; - if (IsBitSet(mods, 1)) - modString += "EZ"; - if (IsBitSet(mods, 8)) - modString += "HT"; - - if (IsBitSet(mods, 3)) - modString += "HD"; - if (IsBitSet(mods, 4)) - modString += "HR"; - if (IsBitSet(mods, 6) && !IsBitSet(mods, 9)) - modString += "DT"; - if (IsBitSet(mods, 9)) - modString += "NC"; - if (IsBitSet(mods, 10)) - modString += "FL"; - - if (IsBitSet(mods, 5)) - modString += "SD"; - if (IsBitSet(mods, 14)) - modString += "PF"; - - if (IsBitSet(mods, 7)) - modString += "RX"; - if (IsBitSet(mods, 11)) - modString += "AT"; - if (IsBitSet(mods, 12)) - modString += "SO"; - return modString; - } - - private static bool IsBitSet(int mods, int pos) - => (mods & (1 << pos)) != 0; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/OsuService.cs b/src/EllieBot/Modules/Searches/OsuService.cs index 66d287f..18327c9 100644 --- a/src/EllieBot/Modules/Searches/OsuService.cs +++ b/src/EllieBot/Modules/Searches/OsuService.cs @@ -40,7 +40,7 @@ public sealed class OsuService : IEService public static int ResolveGameMode(string mode) { - switch (mode.ToUpperInvariant()) + switch (mode?.ToUpperInvariant()) { case "STD": case "STANDARD": @@ -97,4 +97,131 @@ public sealed class OsuService : IEService return (userData, userStats); } + + public async Task<(string title, string desc)[]> GetOsuPlay(string user, string mode) + { + using var http = _httpFactory.CreateClient(); + var m = 0; + if (!string.IsNullOrWhiteSpace(mode)) + m = OsuService.ResolveGameMode(mode); + + var reqString = "https://osu.ppy.sh/api/get_user_best" + + $"?k={_creds.OsuApiKey}" + + $"&u={Uri.EscapeDataString(user)}" + + "&type=string" + + "&limit=5" + + $"&m={m}"; + + var resString = await http.GetStringAsync(reqString); + var obj = JsonConvert.DeserializeObject>(resString); + + var mapTasks = obj.Select(async item => + { + var mapReqString = "https://osu.ppy.sh/api/get_beatmaps" + + $"?k={_creds.OsuApiKey}" + + $"&b={item.BeatmapId}"; + + var mapResString = await http.GetStringAsync(mapReqString); + var map = JsonConvert.DeserializeObject>(mapResString).FirstOrDefault(); + if (map is null) + return default; + var pp = Math.Round(item.Pp, 2); + var acc = CalculateAcc(item, m); + var mods = ResolveMods(item.EnabledMods); + + var title = $"{map.Artist}-{map.Title} ({map.Version})"; + var desc = $@"[/b/{item.BeatmapId}](https://osu.ppy.sh/b/{item.BeatmapId}) + {pp + "pp",-7} | {acc + "%",-7} + "; + if (mods != "+") + desc += Format.Bold(mods); + + return (title, desc); + }); + + return await Task.WhenAll(mapTasks); + } + + //https://osu.ppy.sh/wiki/Accuracy + private static double CalculateAcc(OsuUserBests play, int mode) + { + double hitPoints; + double totalHits; + if (mode == 0) + { + hitPoints = (play.Count50 * 50) + (play.Count100 * 100) + (play.Count300 * 300); + totalHits = play.Count50 + play.Count100 + play.Count300 + play.Countmiss; + totalHits *= 300; + } + else if (mode == 1) + { + hitPoints = (play.Countmiss * 0) + (play.Count100 * 0.5) + play.Count300; + totalHits = (play.Countmiss + play.Count100 + play.Count300) * 300; + hitPoints *= 300; + } + else if (mode == 2) + { + hitPoints = play.Count50 + play.Count100 + play.Count300; + totalHits = play.Countmiss + play.Count50 + play.Count100 + play.Count300 + play.Countkatu; + } + else + { + hitPoints = (play.Count50 * 50) + + (play.Count100 * 100) + + (play.Countkatu * 200) + + ((play.Count300 + play.Countgeki) * 300); + + totalHits = (play.Countmiss + + play.Count50 + + play.Count100 + + play.Countkatu + + play.Count300 + + play.Countgeki) + * 300; + } + + + return Math.Round(hitPoints / totalHits * 100, 2); + } + + + //https://github.com/ppy/osu-api/wiki#mods + private static string ResolveMods(int mods) + { + var modString = "+"; + + if (IsBitSet(mods, 0)) + modString += "NF"; + if (IsBitSet(mods, 1)) + modString += "EZ"; + if (IsBitSet(mods, 8)) + modString += "HT"; + + if (IsBitSet(mods, 3)) + modString += "HD"; + if (IsBitSet(mods, 4)) + modString += "HR"; + if (IsBitSet(mods, 6) && !IsBitSet(mods, 9)) + modString += "DT"; + if (IsBitSet(mods, 9)) + modString += "NC"; + if (IsBitSet(mods, 10)) + modString += "FL"; + + if (IsBitSet(mods, 5)) + modString += "SD"; + if (IsBitSet(mods, 14)) + modString += "PF"; + + if (IsBitSet(mods, 7)) + modString += "RX"; + if (IsBitSet(mods, 11)) + modString += "AT"; + if (IsBitSet(mods, 12)) + modString += "SO"; + return modString; + } + + private static bool IsBitSet(int mods, int pos) + => (mods & (1 << pos)) != 0; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs index 5e17737..a2f6f89 100644 --- a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs +++ b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs @@ -39,7 +39,7 @@ public class GatariUserStats public int Pp { get; set; } [JsonProperty("rank")] - public int Rank { get; set; } + public int? Rank { get; set; } [JsonProperty("ranked_score")] public int RankedScore { get; set; } -- 2.43.0 From 3e9d3d9655888ea50bc3a5fa773025c2060c4702 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 14 Aug 2024 18:53:35 +1200 Subject: [PATCH 096/253] Fixed .serverlist not working --- src/EllieBot/Modules/Utility/Utility.cs | 4 ++-- src/EllieBot/data/aliases.yml | 2 +- src/EllieBot/data/strings/commands/commands.en-US.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index ac76f93..26f3426 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -565,8 +565,8 @@ public partial class Utility : EllieModule return; var allGuilds = _client.Guilds - .OrderBy(g => g.Name) - .ToList(); + .OrderBy(g => g.Name) + .ToList(); await Response() .Paginated() diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index ff53850..4752882 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -768,7 +768,7 @@ typedel: typelist: - typelist serverlist: - - listservers + - serverlist cleverbot: - cleverbot - chatbot diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 027754e..bd5f4a4 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -78,7 +78,7 @@ bye: - {} byemsg: desc: |- - Sets a new leave announcement message which will be shown in the current channel. + Sets a new leave announcement message which will be shown in the current channel. Using this command with no message will show the current bye message. Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) ex: @@ -3079,7 +3079,7 @@ banmessage: - '{{ "description": "%ban.user% you have been banned from %server.name% by %ban.mod%" }}' params: - message: - desc: "The custom message to be displayed when a user is banned from the server." + desc: "The custom message to be displayed when a user is banned." banmessagetest: desc: If ban message is not disabled, bot will send you the message as if you were banned by yourself. Used for testing the ban message. ex: -- 2.43.0 From 1c9c8af2c5b110533debbcdc55fc6bf5be6d40d4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 18:45:31 +1200 Subject: [PATCH 097/253] cleaned up inrole and whosplaying commands a little --- .../Modules/Searches/{ => Osu}/OsuCommands.cs | 0 .../Modules/Searches/{ => Osu}/OsuService.cs | 0 .../Modules/Searches/SearchesService.cs | 6 --- src/EllieBot/Modules/Utility/Utility.cs | 48 +++++++++---------- 4 files changed, 23 insertions(+), 31 deletions(-) rename src/EllieBot/Modules/Searches/{ => Osu}/OsuCommands.cs (100%) rename src/EllieBot/Modules/Searches/{ => Osu}/OsuService.cs (100%) diff --git a/src/EllieBot/Modules/Searches/OsuCommands.cs b/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs similarity index 100% rename from src/EllieBot/Modules/Searches/OsuCommands.cs rename to src/EllieBot/Modules/Searches/Osu/OsuCommands.cs diff --git a/src/EllieBot/Modules/Searches/OsuService.cs b/src/EllieBot/Modules/Searches/Osu/OsuService.cs similarity index 100% rename from src/EllieBot/Modules/Searches/OsuService.cs rename to src/EllieBot/Modules/Searches/Osu/OsuService.cs diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index b8dd2e5..05f2d90 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -21,9 +21,7 @@ public class SearchesService : IEService public List MagicItems { get; } = []; private readonly IHttpClientFactory _httpFactory; private readonly IGoogleApiService _google; - private readonly IImageCache _imgs; private readonly IBotCache _c; - private readonly FontProvider _fonts; private readonly IBotCredsProvider _creds; private readonly EllieRandom _rng; private readonly List _yomamaJokes; @@ -34,17 +32,13 @@ public class SearchesService : IEService public SearchesService( IGoogleApiService google, - IImageCache images, IBotCache c, IHttpClientFactory factory, - FontProvider fonts, IBotCredsProvider creds) { _httpFactory = factory; _google = google; - _imgs = images; _c = c; - _fonts = fonts; _creds = creds; _rng = new(); diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 26f3426..d670707 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -31,7 +31,6 @@ public partial class Utility : EllieModule PropertyNamingPolicy = LowerCaseNamingPolicy.Default }; - private static SemaphoreSlim sem = new(1, 1); private readonly DiscordSocketClient _client; private readonly ICoordinator _coord; private readonly IStatsService _stats; @@ -115,10 +114,8 @@ public partial class Utility : EllieModule var rng = new EllieRandom(); var arr = await Task.Run(() => socketGuild.Users - .Where(u => u.Activities.FirstOrDefault() - ?.Name?.Trim() - .ToUpperInvariant() - == game) + .Where(u => u.Activities.Any(x + => x.Name is not null && x.Name.ToUpperInvariant() == game)) .Select(u => u.Username) .OrderBy(_ => rng.Next()) .Take(60) @@ -154,9 +151,16 @@ public partial class Utility : EllieModule CacheMode.CacheOnly ); - var roleUsers = users.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id)) - .Select(u => $"{u.Mention} {Format.Spoiler(Format.Code(u.Username))}") - .ToArray(); + users = role is null + ? users + : users.Where(u => u.RoleIds.Contains(role.Id)).ToList(); + + + var roleUsers = new List(users.Count); + foreach (var u in users) + { + roleUsers.Add($"{u.Mention} {Format.Spoiler(Format.Code(u.Username))}"); + } await Response() .Paginated() @@ -168,10 +172,11 @@ public partial class Utility : EllieModule if (pageUsers.Count == 0) return _sender.CreateEmbed().WithOkColor().WithDescription(GetText(strs.no_user_on_this_page)); + var roleName = Format.Bold(role?.Name ?? "No Role"); + return _sender.CreateEmbed() .WithOkColor() - .WithTitle(GetText(strs.inrole_list(Format.Bold(role?.Name ?? "No Role"), - roleUsers.Length))) + .WithTitle(GetText(strs.inrole_list(roleName, roleUsers.Count))) .WithDescription(string.Join("\n", pageUsers)); }) .SendAsync(); @@ -674,24 +679,17 @@ public partial class Utility : EllieModule } [Cmd] + [Ratelimit(3)] public async Task Ping() { - await sem.WaitAsync(5000); - try - { - var sw = Stopwatch.StartNew(); - var msg = await Response().Text("🏓").SendAsync(); - sw.Stop(); - msg.DeleteAfter(0); + var sw = Stopwatch.StartNew(); + var msg = await Response().Text("🏓").SendAsync(); + sw.Stop(); + msg.DeleteAfter(0); - await Response() - .Confirm($"{Format.Bold(ctx.User.ToString())} 🏓 {(int)sw.Elapsed.TotalMilliseconds}ms") - .SendAsync(); - } - finally - { - sem.Release(); - } + await Response() + .Confirm($"{Format.Bold(ctx.User.ToString())} 🏓 {(int)sw.Elapsed.TotalMilliseconds}ms") + .SendAsync(); } [Cmd] -- 2.43.0 From 58e59a208fbfb7c9ccaed0917b4763e6b06df7cb Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 18:51:32 +1200 Subject: [PATCH 098/253] Small cleanup of gamestatusevent --- .../Modules/Gambling/Events/GameStatusEvent.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs b/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs index aeb23c0..1c461d6 100644 --- a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs +++ b/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs @@ -27,17 +27,13 @@ public class GameStatusEvent : ICurrencyEvent private readonly string _code; - private readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) - .Concat(Enumerable.Range(65, 26)) - .Concat(Enumerable.Range(97, 26)) - .Select(x => (char)x) - .ToArray(); - private readonly object _stopLock = new(); private readonly object _potLock = new(); private readonly IMessageSenderService _sender; + private static readonly EllieRandom _rng = new EllieRandom(); + public GameStatusEvent( DiscordSocketClient client, ICurrencyService cs, @@ -58,7 +54,7 @@ public class GameStatusEvent : ICurrencyEvent _opts = opt; _sender = sender; // generate code - _code = new(_sneakyGameStatusChars.Shuffle().Take(5).ToArray()); + _code = new kwum(_rng.Next(1_000_000, 10_000_000)).ToString(); _t = new(OnTimerTick, null, Timeout.InfiniteTimeSpan, TimeSpan.FromSeconds(2)); if (_opts.Hours > 0) @@ -88,9 +84,9 @@ public class GameStatusEvent : ICurrencyEvent if (_isPotLimited) { await msg.ModifyAsync(m => - { - m.Embed = GetEmbed(PotSize).Build(); - }); + { + m.Embed = GetEmbed(PotSize).Build(); + }); } Log.Information("Game status event awarded {Count} users {Amount} currency.{Remaining}", -- 2.43.0 From ba993a1bab51c5bf8bb2c07f8f4b763c1deb38c7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 19:02:58 +1200 Subject: [PATCH 099/253] .whosplaying code cleanup --- src/EllieBot/Db/Models/xp/UserXpStats.cs | 4 +- .../Db/Models/xp/XpNotificationLocation.cs | 7 ++++ src/EllieBot/Modules/Utility/Utility.cs | 42 ++++++++++--------- 3 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 src/EllieBot/Db/Models/xp/XpNotificationLocation.cs diff --git a/src/EllieBot/Db/Models/xp/UserXpStats.cs b/src/EllieBot/Db/Models/xp/UserXpStats.cs index d603360..f34ab26 100644 --- a/src/EllieBot/Db/Models/xp/UserXpStats.cs +++ b/src/EllieBot/Db/Models/xp/UserXpStats.cs @@ -8,6 +8,4 @@ public class UserXpStats : DbEntity public long Xp { get; set; } public long AwardedXp { get; set; } public XpNotificationLocation NotifyOnLevelUp { get; set; } -} - -public enum XpNotificationLocation { None, Dm, Channel } \ No newline at end of file +} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs new file mode 100644 index 0000000..0a9356f --- /dev/null +++ b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs @@ -0,0 +1,7 @@ +namespace EllieBot.Db.Models; + +public enum XpNotificationLocation +{ + None, + Dm, +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index d670707..154daba 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -112,28 +112,32 @@ public partial class Utility : EllieModule return; } - var rng = new EllieRandom(); - var arr = await Task.Run(() => socketGuild.Users - .Where(u => u.Activities.Any(x - => x.Name is not null && x.Name.ToUpperInvariant() == game)) - .Select(u => u.Username) - .OrderBy(_ => rng.Next()) - .Take(60) - .ToArray()); - var i = 0; - if (arr.Length == 0) - await Response().Error(strs.nobody_playing_game).SendAsync(); - else + var userNames = new List(socketGuild.Users.Count / 100); + foreach (var user in socketGuild.Users) { - await Response() - .Confirm("```css\n" - + string.Join("\n", - arr.GroupBy(_ => i++ / 2) - .Select(ig => string.Concat(ig.Select(el => $"• {el,-27}")))) - + "\n```") - .SendAsync(); + if (user.Activities.Any(x => x.Name is not null && x.Name.ToUpperInvariant() == game)) + { + userNames.Add(user); + } } + + userNames.Shuffle(); + + var i = 0; + if (userNames.Count == 0) + { + await Response().Error(strs.nobody_playing_game).SendAsync(); + return; + } + + var users = userNames.GroupBy(_ => i++ / 2) + .Select(ig => string.Concat(ig.Select(el => $"• {el,-27}"))) + .Join('\n'); + + await Response() + .Confirm(Format.Code(users)) + .SendAsync(); } [Cmd] -- 2.43.0 From da48250ad49e4351678cd03da7d77f47e7dcff98 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 19:05:33 +1200 Subject: [PATCH 100/253] moved xpnotificationlocation to its own file --- src/EllieBot/Db/Models/xp/XpNotificationLocation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs index 0a9356f..e5c24c7 100644 --- a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs +++ b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs @@ -4,4 +4,5 @@ public enum XpNotificationLocation { None, Dm, + Channel } \ No newline at end of file -- 2.43.0 From 51bfe8d206814b969183da470ec0ca1f619b1a71 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 19:09:01 +1200 Subject: [PATCH 101/253] .whosplaying is now properly paginated --- src/EllieBot/Modules/Utility/Utility.cs | 34 +++++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 154daba..dffad00 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -122,21 +122,27 @@ public partial class Utility : EllieModule } } - userNames.Shuffle(); - - var i = 0; - if (userNames.Count == 0) - { - await Response().Error(strs.nobody_playing_game).SendAsync(); - return; - } - - var users = userNames.GroupBy(_ => i++ / 2) - .Select(ig => string.Concat(ig.Select(el => $"• {el,-27}"))) - .Join('\n'); - await Response() - .Confirm(Format.Code(users)) + .Sanitize() + .Paginated() + .Items(userNames) + .PageSize(20) + .Page((names, _) => + { + if (names.Count == 0) + { + return _sender.CreateEmbed() + .WithErrorColor() + .WithDescription(GetText(strs.nobody_playing_game)); + } + + var eb = _sender.CreateEmbed() + .WithOkColor(); + + var users = names.Join('\n'); + + return eb.WithDescription(users); + }) .SendAsync(); } -- 2.43.0 From 05c03248c4c480f07e10f7fc1949a29be76d57b5 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 19:21:49 +1200 Subject: [PATCH 102/253] small cleanup of utility.cs --- src/EllieBot/Modules/Utility/Utility.cs | 62 +++++++++++-------------- 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index dffad00..f84cd43 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -222,17 +222,7 @@ public partial class Utility : EllieModule builder.AppendLine($"{p.Name} : {p.GetValue(perms, null)}"); await Response().Confirm(builder.ToString()).SendAsync(); } - - // [Cmd] - // [RequireContext(ContextType.Guild)] - // [RequireUserPermission(GuildPermission.ManageRoles)] - // public async Task CheckPerms(SocketRole role, string perm = null) - // { - // ChannelPermissions. - // var perms = ((ITextChannel)ctx.Channel); - // await SendPerms(perms) - // } - + [Cmd] [RequireContext(ContextType.Guild)] public async Task UserId([Leftover] IGuildUser? target = null) @@ -337,31 +327,33 @@ public partial class Utility : EllieModule if (string.IsNullOrWhiteSpace(ownerIds)) ownerIds = "-"; + var eb = _sender.CreateEmbed() + .WithOkColor() + .WithAuthor($"EllieBot v{StatsService.BotVersion}", + "https://cdn.elliebot.net/Ellie.png", + "https://docs.elliebot.net/") + .AddField(GetText(strs.author), _stats.Author, true) + .AddField(GetText(strs.botid), _client.CurrentUser.Id.ToString(), true) + .AddField(GetText(strs.shard), + $"#{_client.ShardId} / {_creds.TotalShards}", + true) + .AddField(GetText(strs.commands_ran), _stats.CommandsRan.ToString(), true) + .AddField(GetText(strs.messages), + $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)", + true) + .AddField(GetText(strs.memory), + FormattableString.Invariant($"{_stats.GetPrivateMemoryMegabytes():F2} MB"), + true) + .AddField(GetText(strs.owner_ids), ownerIds, true) + .AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true) + .AddField(GetText(strs.presence), + GetText(strs.presence_txt(_coord.GetGuildCount(), + _stats.TextChannels, + _stats.VoiceChannels)), + true); + await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithAuthor($"EllieBot v{StatsService.BotVersion}", - "https://cdn.elliebot.net/Ellie.png", - "https://docs.elliebot.net/") - .AddField(GetText(strs.author), _stats.Author, true) - .AddField(GetText(strs.botid), _client.CurrentUser.Id.ToString(), true) - .AddField(GetText(strs.shard), - $"#{_client.ShardId} / {_creds.TotalShards}", - true) - .AddField(GetText(strs.commands_ran), _stats.CommandsRan.ToString(), true) - .AddField(GetText(strs.messages), - $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)", - true) - .AddField(GetText(strs.memory), - FormattableString.Invariant($"{_stats.GetPrivateMemoryMegabytes():F2} MB"), - true) - .AddField(GetText(strs.owner_ids), ownerIds, true) - .AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true) - .AddField(GetText(strs.presence), - GetText(strs.presence_txt(_coord.GetGuildCount(), - _stats.TextChannels, - _stats.VoiceChannels)), - true)) + .Embed(eb) .SendAsync(); } -- 2.43.0 From 2605351f5cf1aa91be4d5071c03f42988940f93d Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 17 Aug 2024 22:46:31 +1200 Subject: [PATCH 103/253] .setgame renamed to .setactivity and now supports custom activities (with no playing in front of the text) --- .../PlayingRotate/PlayingRotateService.cs | 2 +- .../Administration/Self/SelfCommands.cs | 23 +++-- .../Administration/Self/SelfService.cs | 99 ++++++++++--------- src/EllieBot/data/aliases.yml | 3 +- .../data/strings/commands/commands.en-US.yml | 10 +- .../strings/responses/responses.en-US.json | 2 +- 6 files changed, 80 insertions(+), 59 deletions(-) diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs index edf6843..0c9afff 100644 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs +++ b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs @@ -58,7 +58,7 @@ public sealed class PlayingRotateService : IEService, IReadyExecutor : rotatingStatuses[index++]; var statusText = await _repService.ReplaceAsync(playingStatus.Status, new (client: _client)); - await _selfService.SetGameAsync(statusText, (ActivityType)playingStatus.Type); + await _selfService.SetActivityAsync(statusText, (ActivityType)playingStatus.Type); } catch (Exception ex) { diff --git a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs index b8842cd..57f5765 100644 --- a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs +++ b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs @@ -459,7 +459,7 @@ public partial class Administration await Response().Confirm(strs.bot_name(Format.Bold(newName))).SendAsync(); } - + [Cmd] [OwnerOnly] public async Task SetStatus([Leftover] SettableUserStatus status) @@ -491,14 +491,25 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task SetGame(ActivityType type, [Leftover] string game = null) + public async Task SetActivity(ActivityType? type, [Leftover] string game = null) { // var rep = new ReplacementBuilder().WithDefault(Context).Build(); var repCtx = new ReplacementContext(ctx); - await _service.SetGameAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type); + await _service.SetActivityAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type); - await Response().Confirm(strs.set_game).SendAsync(); + await Response().Confirm(strs.set_activity).SendAsync(); + } + + [Cmd] + [OwnerOnly] + public Task SetActivity([Leftover] string game = null) + => SetActivity(null, game); + + public class SetActivityOptions + { + public ActivityType? Type { get; set; } + public string Game { get; set; } } [Cmd] @@ -541,11 +552,11 @@ public partial class Administration return; } - + var repCtx = new ReplacementContext(ctx); text = await repSvc.ReplaceAsync(text, repCtx); await Response().Channel(ch).Text(text).SendAsync(); - + await ctx.OkAsync(); } diff --git a/src/EllieBot/Modules/Administration/Self/SelfService.cs b/src/EllieBot/Modules/Administration/Self/SelfService.cs index 82eb68c..bbed3f7 100644 --- a/src/EllieBot/Modules/Administration/Self/SelfService.cs +++ b/src/EllieBot/Modules/Administration/Self/SelfService.cs @@ -85,13 +85,14 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { await using var uow = _db.GetDbContext(); - autoCommands = uow.Set().AsNoTracking() - .Where(x => x.Interval >= 5) - .AsEnumerable() - .GroupBy(x => x.GuildId) - .ToDictionary(x => x.Key, - y => y.ToDictionary(x => x.Id, TimerFromAutoCommand).ToConcurrent()) - .ToConcurrent(); + autoCommands = uow.Set() + .AsNoTracking() + .Where(x => x.Interval >= 5) + .AsEnumerable() + .GroupBy(x => x.GuildId) + .ToDictionary(x => x.Key, + y => y.ToDictionary(x => x.Id, TimerFromAutoCommand).ToConcurrent()) + .ToConcurrent(); var startupCommands = uow.Set().AsNoTracking().Where(x => x.Interval == 0); foreach (var cmd in startupCommands) @@ -170,18 +171,18 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService private async Task LoadOwnerChannels() { var channels = await _creds.OwnerIds.Select(id => - { - var user = _client.GetUser(id); - if (user is null) - return Task.FromResult(null); + { + var user = _client.GetUser(id); + if (user is null) + return Task.FromResult(null); - return user.CreateDMChannelAsync(); - }) - .WhenAll(); + return user.CreateDMChannelAsync(); + }) + .WhenAll(); ownerChannels = channels.Where(x => x is not null) - .ToDictionary(x => x.Recipient.Id, x => x) - .ToImmutableDictionary(); + .ToDictionary(x => x.Recipient.Id, x => x) + .ToImmutableDictionary(); if (!ownerChannels.Any()) { @@ -400,7 +401,10 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { try { - await _client.SetGameAsync(data.Name, data.Link, data.Type); + if (data.Type is { } activityType) + await _client.SetGameAsync(data.Name, data.Link, activityType); + else + await _client.SetCustomStatusAsync(data.Name); } catch (Exception ex) { @@ -408,7 +412,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService } }); - public Task SetGameAsync(string game, ActivityType type) + public Task SetActivityAsync(string game, ActivityType? type) => _pubSub.Pub(_activitySetKey, new() { @@ -430,10 +434,10 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { public string Name { get; init; } public string Link { get; init; } - public ActivityType Type { get; init; } + public ActivityType? Type { get; init; } } - - + + /// /// Adds the specified to the database. If a database user with placeholder name /// and discriminator is present in , their name and discriminator get updated accordingly. @@ -443,41 +447,46 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService /// A tuple with the amount of new users added and old users updated. public async Task<(long UsersAdded, long UsersUpdated)> RefreshUsersAsync(List users) { - await using var ctx = _db.GetDbContext(); + await using var ctx = _db.GetDbContext(); var presentDbUsers = await ctx.GetTable() - .Select(x => new { x.UserId, x.Username, x.Discriminator }) - .Where(x => users.Select(y => y.Id).Contains(x.UserId)) - .ToArrayAsyncEF(); + .Select(x => new + { + x.UserId, + x.Username, + x.Discriminator + }) + .Where(x => users.Select(y => y.Id).Contains(x.UserId)) + .ToArrayAsyncEF(); var usersToAdd = users - .Where(x => !presentDbUsers.Select(x => x.UserId).Contains(x.Id)) - .Select(x => new DiscordUser() - { - UserId = x.Id, - AvatarId = x.AvatarId, - Username = x.Username, - Discriminator = x.Discriminator - }); + .Where(x => !presentDbUsers.Select(x => x.UserId).Contains(x.Id)) + .Select(x => new DiscordUser() + { + UserId = x.Id, + AvatarId = x.AvatarId, + Username = x.Username, + Discriminator = x.Discriminator + }); var added = (await ctx.BulkCopyAsync(usersToAdd)).RowsCopied; var toUpdateUserIds = presentDbUsers - .Where(x => x.Username == "Unknown" && x.Discriminator == "????") - .Select(x => x.UserId) - .ToArray(); + .Where(x => x.Username == "Unknown" && x.Discriminator == "????") + .Select(x => x.UserId) + .ToArray(); foreach (var user in users.Where(x => toUpdateUserIds.Contains(x.Id))) { await ctx.GetTable() - .Where(x => x.UserId == user.Id) - .UpdateAsync(x => new DiscordUser() - { - Username = user.Username, - Discriminator = user.Discriminator, + .Where(x => x.UserId == user.Id) + .UpdateAsync(x => new DiscordUser() + { + Username = user.Username, + Discriminator = user.Discriminator, - // .award tends to set AvatarId and DateAdded to NULL, so account for that. - AvatarId = user.AvatarId, - DateAdded = x.DateAdded ?? DateTime.UtcNow - }); + // .award tends to set AvatarId and DateAdded to NULL, so account for that. + AvatarId = user.AvatarId, + DateAdded = x.DateAdded ?? DateTime.UtcNow + }); } return (added, toUpdateUserIds.Length); diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 4752882..b6f5924 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -208,7 +208,8 @@ setavatar: - setav setbanner: - setbanner -setgame: +setactivity: + - setactivity - setgame send: - send diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index bd5f4a4..3f96439 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -813,12 +813,12 @@ setbanner: params: - img: desc: "The URL of the image file to be displayed as the bot's banner." -setgame: - desc: Sets the bots game status to either Playing, Listening, or Watching. +setactivity: + desc: Sets the bots game status to a Custom, Playing, Listening, or Watching status. ex: - - Playing with snakes. - - Watching anime. - - Listening music. + - Just chilling + - Playing with canaries. + - Listening music params: - type: desc: "The activity type determines whether the bot is engaged in a game, listening to audio, or watching a video." diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index fe495bb..31ee64f 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -195,7 +195,7 @@ "srvr_banner_too_large": "Specified image is too large! Maximum size is 8MB.", "srvr_banner_invalid_url": "Specified url is not valid. Make sure you're specifying a direct image url.", "set_channel_name": "New channel name set.", - "set_game": "New game set!", + "set_activity": "New activity set!", "set_stream": "New stream set!", "set_topic": "New channel topic set.", "shard_reconnecting": "Shard {0} reconnecting.", -- 2.43.0 From 3ca832090e4a8e0c7d7fb943c71aaccc99b7312c Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 18 Aug 2024 16:22:43 +1200 Subject: [PATCH 104/253] some cleanup of remind command. Moved some logic to the service --- .../Modules/Utility/Remind/RemindCommands.cs | 71 ++++++++++--------- .../Modules/Utility/Remind/RemindService.cs | 27 +++++-- 2 files changed, 57 insertions(+), 41 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs index 9667384..b568ada 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs @@ -44,11 +44,14 @@ public partial class Utility ulong target; target = meorhere == MeOrHere.Me ? ctx.User.Id : ctx.Channel.Id; - if (!await RemindInternal(target, - meorhere == MeOrHere.Me || ctx.Guild is null, - remindData.Time, - remindData.What, - ReminderType.User)) + + var success = await RemindInternal(target, + meorhere == MeOrHere.Me || ctx.Guild is null, + remindData.Time, + remindData.What, + ReminderType.User); + + if (!success) await Response().Error(strs.remind_too_long).SendAsync(); } @@ -72,7 +75,8 @@ public partial class Utility } - if (!await RemindInternal(channel.Id, false, remindData.Time, remindData.What, ReminderType.User)) + var success = await RemindInternal(channel.Id, false, remindData.Time, remindData.What, ReminderType.User); + if (!success) await Response().Error(strs.remind_too_long).SendAsync(); } @@ -81,32 +85,32 @@ public partial class Utility [UserPerm(GuildPerm.Administrator)] [Priority(0)] public Task RemindList(Server _, int page = 1) - => RemindListInternal(page, true); + => RemindListInternal(page, ctx.Guild.Id); [Cmd] [Priority(1)] public Task RemindList(int page = 1) - => RemindListInternal(page, false); + => RemindListInternal(page, null); - private async Task RemindListInternal(int page, bool isServer) + private async Task RemindListInternal(int page, ulong? guildId) { if (--page < 0) return; var embed = _sender.CreateEmbed() .WithOkColor() - .WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list)); + .WithTitle(GetText(guildId is not null + ? strs.reminder_server_list + : strs.reminder_list)); List rems; - await using (var uow = _db.GetDbContext()) - { - if (isServer) - rems = uow.Set().RemindersForServer(ctx.Guild.Id, page).ToList(); - else - rems = uow.Set().RemindersFor(ctx.User.Id, page).ToList(); - } + if (guildId is { } gid) + rems = await _service.GetServerReminders(page, gid); + else + rems = await _service.GetUserReminders(page, ctx.User.Id); - if (rems.Any()) + + if (rems.Count > 0) { var i = 0; foreach (var rem in rems) @@ -114,18 +118,23 @@ public partial class Utility var when = rem.When; embed.AddField( $"#{++i + (page * 10)}", - $@"`When:` {TimestampTag.FromDateTime(when, TimestampTagStyles.ShortDateTime)} -`Target:` {(rem.IsPrivate ? "DM" : "Channel")} [`{rem.ChannelId}`] -`Message:` {rem.Message?.TrimTo(50)}"); + $""" + `When:` {TimestampTag.FromDateTime(when, TimestampTagStyles.ShortDateTime)} + `Target:` {(rem.IsPrivate ? "DM" : "Channel")} [`{rem.ChannelId}`] + `Message:` {rem.Message?.TrimTo(50)} + """); } } else + { embed.WithDescription(GetText(strs.reminders_none)); + } embed.AddPaginatedFooter(page + 1, null); await Response().Embed(embed).SendAsync(); } + [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] @@ -201,19 +210,13 @@ public partial class Utility } // var gTime = ctx.Guild is null ? time : TimeZoneInfo.ConvertTime(time, _tz.GetTimeZoneOrUtc(ctx.Guild.Id)); - try - { - await Response() - .Confirm($"\u23f0 {GetText(strs.remind2( - Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username), - Format.Bold(message), - TimestampTag.FromDateTime(DateTime.UtcNow.Add(ts), TimestampTagStyles.Relative), - TimestampTag.FormatFromDateTime(time, TimestampTagStyles.ShortDateTime)))}") - .SendAsync(); - } - catch - { - } + await Response() + .Confirm($"\u23f0 {GetText(strs.remind2( + Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username), + Format.Bold(message), + TimestampTag.FromDateTime(DateTime.UtcNow.Add(ts), TimestampTagStyles.Relative), + TimestampTag.FormatFromDateTime(time, TimestampTagStyles.ShortDateTime)))}") + .SendAsync(); return true; } diff --git a/src/EllieBot/Modules/Utility/Remind/RemindService.cs b/src/EllieBot/Modules/Utility/Remind/RemindService.cs index dad22d2..78981d7 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindService.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindService.cs @@ -11,7 +11,8 @@ namespace EllieBot.Modules.Utility.Services; public class RemindService : IEService, IReadyExecutor, IRemindService { private readonly Regex _regex = - new(@"^(?:(?:at|on(?:\sthe)?)?\s*(?(?:\d{2}:\d{2}\s)?\d{1,2}\.\d{1,2}(?:\.\d{2,4})?)|(?:in\s?)?\s*(?:(?\d+)(?:\s?(?:months?|mos?),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:weeks?|w),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:days?|d),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:hours?|h),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:minutes?|mins?|m),?))?)\s+(?:to:?\s+)?(?(?:\r\n|[\r\n]|.)+)", + new( + @"^(?:(?:at|on(?:\sthe)?)?\s*(?(?:\d{2}:\d{2}\s)?\d{1,2}\.\d{1,2}(?:\.\d{2,4})?)|(?:in\s?)?\s*(?:(?\d+)(?:\s?(?:months?|mos?),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:weeks?|w),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:days?|d),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:hours?|h),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:minutes?|mins?|m),?))?)\s+(?:to:?\s+)?(?(?:\r\n|[\r\n]|.)+)", RegexOptions.Compiled | RegexOptions.Multiline); private readonly DiscordSocketClient _client; @@ -208,12 +209,12 @@ public class RemindService : IEService, IReadyExecutor, IRemindService { await _sender.Response(ch) .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("Reminder") - .AddField("Created At", - r.DateAdded.HasValue ? r.DateAdded.Value.ToLongDateString() : "?") - .AddField("By", - (await ch.GetUserAsync(r.UserId))?.ToString() ?? r.UserId.ToString())) + .WithOkColor() + .WithTitle("Reminder") + .AddField("Created At", + r.DateAdded.HasValue ? r.DateAdded.Value.ToLongDateString() : "?") + .AddField("By", + (await ch.GetUserAsync(r.UserId))?.ToString() ?? r.UserId.ToString())) .Text(r.Message) .SendAsync(); } @@ -255,4 +256,16 @@ public class RemindService : IEService, IReadyExecutor, IRemindService .AddAsync(rem); await ctx.SaveChangesAsync(); } + + public async Task> GetServerReminders(int page, ulong guildId) + { + await using var uow = _db.GetDbContext(); + return uow.Set().RemindersForServer(guildId, page).ToList(); + } + + public async Task> GetUserReminders(int page, ulong userId) + { + await using var uow = _db.GetDbContext(); + return uow.Set().RemindersFor(userId, page).ToList(); + } } \ No newline at end of file -- 2.43.0 From afd5be89d12211231141672f38fdf9c746a0c790 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 19 Aug 2024 23:09:13 +1200 Subject: [PATCH 105/253] Started cleanup of quote commands. Moving logic to the service --- src/EllieBot/Db/Extensions/QuoteExtensions.cs | 20 ++--------- .../Modules/Utility/Quote/QuoteCommands.cs | 33 ++++++++--------- .../Modules/Utility/Quote/QuoteService.cs | 36 +++++++++++++++++-- 3 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/EllieBot/Db/Extensions/QuoteExtensions.cs b/src/EllieBot/Db/Extensions/QuoteExtensions.cs index a213e6d..afd3509 100644 --- a/src/EllieBot/Db/Extensions/QuoteExtensions.cs +++ b/src/EllieBot/Db/Extensions/QuoteExtensions.cs @@ -1,4 +1,5 @@ #nullable disable +using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Db.Models; @@ -8,22 +9,7 @@ public static class QuoteExtensions { public static IEnumerable GetForGuild(this DbSet quotes, ulong guildId) => quotes.AsQueryable().Where(x => x.GuildId == guildId); - - public static IReadOnlyCollection GetGroup( - this DbSet quotes, - ulong guildId, - int page, - OrderType order) - { - var q = quotes.AsQueryable().Where(x => x.GuildId == guildId); - if (order == OrderType.Keyword) - q = q.OrderBy(x => x.Keyword); - else - q = q.OrderBy(x => x.Id); - - return q.Skip(15 * page).Take(15).ToArray(); - } - + public static async Task GetRandomQuoteByKeywordAsync( this DbSet quotes, ulong guildId, @@ -45,7 +31,7 @@ public static class QuoteExtensions && (EF.Functions.Like(q.Text.ToUpper(), $"%{text.ToUpper()}%") || EF.Functions.Like(q.AuthorName, text))) .ToArrayAsync()) - .RandomOrDefault(); + .RandomOrDefault(); } public static void RemoveAllByKeyword(this DbSet quotes, ulong guildId, string keyword) diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index d0ff339..1fe50c3 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -11,7 +11,7 @@ namespace EllieBot.Modules.Utility; public partial class Utility { [Group] - public partial class QuoteCommands : EllieModule + public partial class QuoteCommands : EllieModule { private const string PREPEND_EXPORT = """ @@ -60,23 +60,20 @@ public partial class Utility if (page < 0) return; - IEnumerable quotes; - await using (var uow = _db.GetDbContext()) + var quotes = await _service.GetAllQuotesAsync(ctx.Guild.Id, page, order); + + if (quotes.Count == 0) { - quotes = uow.Set().GetGroup(ctx.Guild.Id, page, order); + await Response().Error(strs.quotes_page_none).SendAsync(); + return; } - if (quotes.Any()) - { - await Response() - .Confirm(GetText(strs.quotes_page(page + 1)), - string.Join("\n", - quotes.Select(q - => $"`{new kwum(q.Id)}` {Format.Bold(q.Keyword.SanitizeAllMentions()),-20} by {q.AuthorName.SanitizeAllMentions()}"))) - .SendAsync(); - } - else - await Response().Error(strs.quotes_page_none).SendAsync(); + var list = quotes.Select(q => $"`{new kwum(q.Id)}` {Format.Bold(q.Keyword),-20} by {q.AuthorName}") + .Join("\n"); + + await Response() + .Confirm(GetText(strs.quotes_page(page + 1)), list) + .SendAsync(); } [Cmd] @@ -156,8 +153,8 @@ public partial class Utility async (sm) => { var msg = sm.Data.Components.FirstOrDefault()?.Value; - - if(!string.IsNullOrWhiteSpace(msg)) + + if (!string.IsNullOrWhiteSpace(msg)) await QuoteEdit(id, msg); } ); @@ -306,7 +303,7 @@ public partial class Utility .UpdateWithOutputAsync((del, ins) => ins); q = result.FirstOrDefault(); - + await uow.SaveChangesAsync(); } diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index db49648..7c44a15 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -13,7 +13,7 @@ public sealed class QuoteService : IQuoteService, IEService { _db = db; } - + /// /// Delete all quotes created by the author in a guild /// @@ -24,9 +24,39 @@ public sealed class QuoteService : IQuoteService, IEService { await using var ctx = _db.GetDbContext(); var deleted = await ctx.GetTable() - .Where(x => x.GuildId == guildId && x.AuthorId == userId) - .DeleteAsync(); + .Where(x => x.GuildId == guildId && x.AuthorId == userId) + .DeleteAsync(); return deleted; } + + /// + /// Delete all quotes in a guild + /// + /// ID of the guild + /// Number of deleted qutoes + public async Task DeleteAllQuotesAsync(ulong guildId) + { + await using var ctx = _db.GetDbContext(); + var deleted = await ctx.GetTable() + .Where(x => x.GuildId == guildId) + .DeleteAsync(); + + return deleted; + } + + public async Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order) + { + await using var uow = _db.GetDbContext(); + var q = uow.Set() + .ToLinqToDBTable() + .Where(x => x.GuildId == guildId); + + if (order == OrderType.Keyword) + q = q.OrderBy(x => x.Keyword); + else + q = q.OrderBy(x => x.Id); + + return await q.Skip(15 * page).Take(15).ToArrayAsync(); + } } \ No newline at end of file -- 2.43.0 From b78f9dfd8c111d629af1ea8f8455aac96ac6ebaf Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 20 Aug 2024 14:24:14 +1200 Subject: [PATCH 106/253] Most cleanup logic moved to the service, improved some commands, possible bugs --- src/EllieBot/Db/Extensions/QuoteExtensions.cs | 39 ----------- .../Modules/Utility/Quote/QuoteCommands.cs | 66 ++++++++----------- .../Modules/Utility/Quote/QuoteService.cs | 64 ++++++++++++++++++ 3 files changed, 90 insertions(+), 79 deletions(-) delete mode 100644 src/EllieBot/Db/Extensions/QuoteExtensions.cs diff --git a/src/EllieBot/Db/Extensions/QuoteExtensions.cs b/src/EllieBot/Db/Extensions/QuoteExtensions.cs deleted file mode 100644 index afd3509..0000000 --- a/src/EllieBot/Db/Extensions/QuoteExtensions.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable disable -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class QuoteExtensions -{ - public static IEnumerable GetForGuild(this DbSet quotes, ulong guildId) - => quotes.AsQueryable().Where(x => x.GuildId == guildId); - - public static async Task GetRandomQuoteByKeywordAsync( - this DbSet quotes, - ulong guildId, - string keyword) - { - return (await quotes.AsQueryable().Where(q => q.GuildId == guildId && q.Keyword == keyword).ToArrayAsync()) - .RandomOrDefault(); - } - - public static async Task SearchQuoteKeywordTextAsync( - this DbSet quotes, - ulong guildId, - string keyword, - string text) - { - return (await quotes.AsQueryable() - .Where(q => q.GuildId == guildId - && (keyword == null || q.Keyword == keyword) - && (EF.Functions.Like(q.Text.ToUpper(), $"%{text.ToUpper()}%") - || EF.Functions.Like(q.AuthorName, text))) - .ToArrayAsync()) - .RandomOrDefault(); - } - - public static void RemoveAllByKeyword(this DbSet quotes, ulong guildId, string keyword) - => quotes.RemoveRange(quotes.AsQueryable().Where(x => x.GuildId == guildId && x.Keyword.ToUpper() == keyword)); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index 1fe50c3..09218c2 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -85,16 +85,7 @@ public partial class Utility keyword = keyword.ToUpperInvariant(); - Quote quote; - await using (var uow = _db.GetDbContext()) - { - quote = await uow.Set().GetRandomQuoteByKeywordAsync(ctx.Guild.Id, keyword); - //if (quote is not null) - //{ - // quote.UseCount += 1; - // uow.Complete(); - //} - } + var quote = await _service.GetQuoteByKeywordAsync(ctx.Guild.Id, keyword); if (quote is null) return; @@ -110,6 +101,7 @@ public partial class Utility .SendAsync(); } + [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteShow(kwum quoteId) @@ -154,7 +146,7 @@ public partial class Utility { var msg = sm.Data.Components.FirstOrDefault()?.Value; - if (!string.IsNullOrWhiteSpace(msg)) + if (!string.IsNullOrWhiteSpace(msg)) await QuoteEdit(id, msg); } ); @@ -186,27 +178,30 @@ public partial class Utility .SendAsync(); } - private async Task QuoteSearchinternalAsync(string? keyword, string textOrAuthor) + private async Task QuoteSearchInternalAsync(string? keyword, string textOrAuthor) { if (string.IsNullOrWhiteSpace(textOrAuthor)) return; keyword = keyword?.ToUpperInvariant(); - Quote quote; - await using (var uow = _db.GetDbContext()) - { - quote = await uow.Set().SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); - } - - if (quote is null) - return; + var quotes = await _service.SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); await Response() - .Confirm($"`{new kwum(quote.Id)}` 💬 ", - quote.Keyword.ToLowerInvariant() - + ": " - + quote.Text.SanitizeAllMentions()) + .Paginated() + .Items(quotes) + .PageSize(1) + .Page((pageQuotes, _) => + { + var quote = pageQuotes[0]; + + var text = quote.Keyword.ToLowerInvariant() + ": " + quote.Text; + + return _sender.CreateEmbed() + .WithOkColor() + .WithTitle($"{new kwum(quote.Id)} 💬 ") + .WithDescription(text); + }) .SendAsync(); } @@ -214,13 +209,13 @@ public partial class Utility [RequireContext(ContextType.Guild)] [Priority(0)] public Task QuoteSearch(string textOrAuthor) - => QuoteSearchinternalAsync(null, textOrAuthor); + => QuoteSearchInternalAsync(null, textOrAuthor); [Cmd] [RequireContext(ContextType.Guild)] [Priority(1)] public Task QuoteSearch(string keyword, [Leftover] string textOrAuthor) - => QuoteSearchinternalAsync(keyword, textOrAuthor); + => QuoteSearchInternalAsync(keyword, textOrAuthor); [Cmd] [RequireContext(ContextType.Guild)] @@ -229,14 +224,7 @@ public partial class Utility if (quoteId < 0) return; - Quote quote; - - var repCtx = new ReplacementContext(Context); - - await using (var uow = _db.GetDbContext()) - { - quote = uow.Set().GetById(quoteId); - } + var quote = await _service.GetQuoteByIdAsync(quoteId); if (quote is null || quote.GuildId != ctx.Guild.Id) { @@ -249,6 +237,7 @@ public partial class Utility + ":\n"; + var repCtx = new ReplacementContext(Context); var text = SmartText.CreateFrom(quote.Text); text = await repSvc.ReplaceAsync(text, repCtx); await Response() @@ -257,6 +246,7 @@ public partial class Utility .SendAsync(); } + [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteAdd(string keyword, [Leftover] string text) @@ -388,7 +378,7 @@ public partial class Utility await using (var uow = _db.GetDbContext()) { - uow.Set().RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); + await _service.RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); await uow.SaveChangesAsync(); } @@ -401,11 +391,7 @@ public partial class Utility [UserPerm(GuildPerm.Administrator)] public async Task QuotesExport() { - IEnumerable quotes; - await using (var uow = _db.GetDbContext()) - { - quotes = uow.Set().GetForGuild(ctx.Guild.Id).ToList(); - } + var quotes = _service.GetForGuild(ctx.Guild.Id).ToList(); var exprsDict = quotes.GroupBy(x => x.Keyword) .ToDictionary(x => x.Key, x => x.Select(ExportedQuote.FromModel)); diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index 7c44a15..9c547b7 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -59,4 +59,68 @@ public sealed class QuoteService : IQuoteService, IEService return await q.Skip(15 * page).Take(15).ToArrayAsync(); } + + public async Task GetQuoteByKeywordAsync(ulong guildId, string keyword) + { + await using var uow = _db.GetDbContext(); + var quotes = await uow.GetTable() + .Where(q => q.GuildId == guildId && q.Keyword == keyword) + .ToArrayAsyncLinqToDB(); + + return quotes.RandomOrDefault(); + } + + public async Task> SearchQuoteKeywordTextAsync( + ulong guildId, + string? keyword, + string text) + { + keyword = keyword?.ToUpperInvariant(); + await using var uow = _db.GetDbContext(); + + var quotes = await uow.GetTable() + .Where(q => q.GuildId == guildId + && (keyword == null || q.Keyword == keyword)) + .ToArrayAsync(); + + var toReturn = new List(quotes.Length); + + foreach (var q in quotes) + { + if (q.AuthorName.Contains(text, StringComparison.InvariantCultureIgnoreCase) + || q.Text.Contains(text, StringComparison.InvariantCultureIgnoreCase)) + { + toReturn.Add(q); + } + } + + return toReturn; + } + + public IEnumerable GetForGuild(ulong guildId) + { + using var uow = _db.GetDbContext(); + var quotes = uow.GetTable() + .Where(x => x.GuildId == guildId); + return quotes; + } + + public Task RemoveAllByKeyword(ulong guildId, string keyword) + { + keyword = keyword.ToUpperInvariant(); + + using var uow = _db.GetDbContext(); + + var count = uow.GetTable() + .Where(x => x.GuildId == guildId && x.Keyword == keyword) + .DeleteAsync(); + + return count; + } + + public async Task GetQuoteByIdAsync(kwum quoteId) + { + await using var uow = _db.GetDbContext(); + return uow.Set().GetById(quoteId); + } } \ No newline at end of file -- 2.43.0 From 2e541eebacb20d149c975bde4b5536bc5aa3ee2b Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 20 Aug 2024 14:29:59 +1200 Subject: [PATCH 107/253] .qid cleaned up --- src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs | 12 +++--------- src/EllieBot/Modules/Utility/Quote/QuoteService.cs | 8 ++++++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index 09218c2..27c7b23 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -106,13 +106,7 @@ public partial class Utility [RequireContext(ContextType.Guild)] public async Task QuoteShow(kwum quoteId) { - Quote? quote; - await using (var uow = _db.GetDbContext()) - { - quote = uow.Set().GetById(quoteId); - if (quote?.GuildId != ctx.Guild.Id) - quote = null; - } + var quote = await _service.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); if (quote is null) { @@ -224,9 +218,9 @@ public partial class Utility if (quoteId < 0) return; - var quote = await _service.GetQuoteByIdAsync(quoteId); + var quote = await _service.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); - if (quote is null || quote.GuildId != ctx.Guild.Id) + if (quote is null) { await Response().Error(strs.quotes_notfound).SendAsync(); return; diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index 9c547b7..2f75ce2 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -118,9 +118,13 @@ public sealed class QuoteService : IQuoteService, IEService return count; } - public async Task GetQuoteByIdAsync(kwum quoteId) + public async Task GetQuoteByIdAsync(ulong guildId, kwum quoteId) { await using var uow = _db.GetDbContext(); - return uow.Set().GetById(quoteId); + + var quote = await uow.GetTable() + .Where(x => x.Id == quoteId && x.GuildId == guildId) + .FirstAsyncLinqToDB(); + return quote; } } \ No newline at end of file -- 2.43.0 From 3a25433ec83c87d15d3d3ec5fff50cc6193c614b Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 21 Aug 2024 20:22:31 +1200 Subject: [PATCH 108/253] Quote commands slightly changed and some of them renamed. Added a lot of new aliases. Notable rename is .liqu to .qli Quotes now follow the same naming pattern as Expression commands Code vastly improved --- .../Modules/Utility/Quote/IQuoteService.cs | 46 +++++- .../Modules/Utility/Quote/QuoteCommands.cs | 152 +++--------------- .../Modules/Utility/Quote/QuoteService.cs | 110 +++++++++++-- .../Utility/Quote/_common/ExportedQuote.cs | 20 +++ src/EllieBot/data/aliases.yml | 38 +++-- .../data/strings/commands/commands.en-US.yml | 2 +- 6 files changed, 222 insertions(+), 146 deletions(-) create mode 100644 src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs diff --git a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs index ccf360e..20bec68 100644 --- a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs @@ -1,6 +1,50 @@ -namespace EllieBot.Modules.Utility; +using EllieBot.Db.Models; + +namespace EllieBot.Modules.Utility; public interface IQuoteService { + /// + /// Delete all quotes created by the author in a guild + /// + /// ID of the guild + /// ID of the user + /// Number of deleted qutoes Task DeleteAllAuthorQuotesAsync(ulong guildId, ulong userId); + + /// + /// Delete all quotes in a guild + /// + /// ID of the guild + /// Number of deleted qutoes + Task DeleteAllQuotesAsync(ulong guildId); + + Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order); + Task GetQuoteByKeywordAsync(ulong guildId, string keyword); + + Task> SearchQuoteKeywordTextAsync( + ulong guildId, + string? keyword, + string text); + + Task> GetGuildQuotesAsync(ulong guildId); + Task RemoveAllByKeyword(ulong guildId, string keyword); + Task GetQuoteByIdAsync(ulong guildId, kwum quoteId); + + Task AddQuoteAsync( + ulong guildId, + ulong authorId, + string authorName, + string keyword, + string text); + + Task EditQuoteAsync(ulong authorId, int quoteId, string text); + + Task DeleteQuoteAsync( + ulong guildId, + ulong authorId, + bool isQuoteManager, + int quoteId); + + Task ImportQuotesAsync(ulong guildId, string input); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index 27c7b23..bf50b9c 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -1,6 +1,4 @@ #nullable disable warnings -using LinqToDB; -using LinqToDB.EntityFrameworkCore; using EllieBot.Common.Yml; using EllieBot.Db.Models; using YamlDotNet.Serialization; @@ -11,7 +9,7 @@ namespace EllieBot.Modules.Utility; public partial class Utility { [Group] - public partial class QuoteCommands : EllieModule + public partial class QuoteCommands : EllieModule { private const string PREPEND_EXPORT = """ @@ -48,19 +46,19 @@ public partial class Utility [Cmd] [RequireContext(ContextType.Guild)] [Priority(1)] - public Task ListQuotes(OrderType order = OrderType.Keyword) - => ListQuotes(1, order); + public Task QuoteList(OrderType order = OrderType.Keyword) + => QuoteList(1, order); [Cmd] [RequireContext(ContextType.Guild)] [Priority(0)] - public async Task ListQuotes(int page = 1, OrderType order = OrderType.Keyword) + public async Task QuoteList(int page = 1, OrderType order = OrderType.Keyword) { page -= 1; if (page < 0) return; - var quotes = await _service.GetAllQuotesAsync(ctx.Guild.Id, page, order); + var quotes = await _qs.GetAllQuotesAsync(ctx.Guild.Id, page, order); if (quotes.Count == 0) { @@ -85,7 +83,7 @@ public partial class Utility keyword = keyword.ToUpperInvariant(); - var quote = await _service.GetQuoteByKeywordAsync(ctx.Guild.Id, keyword); + var quote = await _qs.GetQuoteByKeywordAsync(ctx.Guild.Id, keyword); if (quote is null) return; @@ -97,7 +95,6 @@ public partial class Utility await Response() .Text($"`{new kwum(quote.Id)}` 📣 " + text) - .Sanitize() .SendAsync(); } @@ -106,7 +103,7 @@ public partial class Utility [RequireContext(ContextType.Guild)] public async Task QuoteShow(kwum quoteId) { - var quote = await _service.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); + var quote = await _qs.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); if (quote is null) { @@ -179,7 +176,7 @@ public partial class Utility keyword = keyword?.ToUpperInvariant(); - var quotes = await _service.SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); + var quotes = await _qs.SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); await Response() .Paginated() @@ -218,7 +215,7 @@ public partial class Utility if (quoteId < 0) return; - var quote = await _service.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); + var quote = await _qs.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); if (quote is null) { @@ -226,8 +223,8 @@ public partial class Utility return; } - var infoText = $"*`{new kwum(quote.Id)}` added by {quote.AuthorName.SanitizeAllMentions()}* 🗯️ " - + quote.Keyword.ToLowerInvariant().SanitizeAllMentions() + var infoText = $"*`{new kwum(quote.Id)}` added by {quote.AuthorName}* 🗯️ " + + quote.Keyword.ToLowerInvariant() + ":\n"; @@ -236,7 +233,6 @@ public partial class Utility text = await repSvc.ReplaceAsync(text, repCtx); await Response() .Text(infoText + text) - .Sanitize() .SendAsync(); } @@ -248,26 +244,14 @@ public partial class Utility if (string.IsNullOrWhiteSpace(keyword) || string.IsNullOrWhiteSpace(text)) return; - keyword = keyword.ToUpperInvariant(); + var quote = await _qs.AddQuoteAsync(ctx.Guild.Id, ctx.User.Id, ctx.User.Username, keyword, text); - Quote q; - await using (var uow = _db.GetDbContext()) - { - uow.Set() - .Add(q = new() - { - AuthorId = ctx.Message.Author.Id, - AuthorName = ctx.Message.Author.Username, - GuildId = ctx.Guild.Id, - Keyword = keyword, - Text = text - }); - await uow.SaveChangesAsync(); - } - - await Response().Confirm(strs.quote_added_new(Format.Code(new kwum(q.Id).ToString()))).SendAsync(); + await Response() + .Confirm(strs.quote_added_new(Format.Code(new kwum(quote.Id).ToString()))) + .SendAsync(); } + [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteEdit(kwum quoteId, [Leftover] string text) @@ -277,19 +261,7 @@ public partial class Utility return; } - Quote q; - await using (var uow = _db.GetDbContext()) - { - var intId = (int)quoteId; - var result = await uow.GetTable() - .Where(x => x.Id == intId && x.AuthorId == ctx.User.Id) - .Set(x => x.Text, text) - .UpdateWithOutputAsync((del, ins) => ins); - - q = result.FirstOrDefault(); - - await uow.SaveChangesAsync(); - } + var q = await _qs.EditQuoteAsync(ctx.User.Id, quoteId, text); if (q is not null) { @@ -309,33 +281,19 @@ public partial class Utility } } + [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteDelete(kwum quoteId) { var hasManageMessages = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages; - var success = false; - string response; - await using (var uow = _db.GetDbContext()) - { - var q = uow.Set().GetById(quoteId); - - if (q?.GuildId != ctx.Guild.Id || (!hasManageMessages && q.AuthorId != ctx.Message.Author.Id)) - response = GetText(strs.quotes_remove_none); - else - { - uow.Set().Remove(q); - await uow.SaveChangesAsync(); - success = true; - response = GetText(strs.quote_deleted(new kwum(quoteId))); - } - } + var success = await _qs.DeleteQuoteAsync(ctx.Guild.Id, ctx.User.Id, hasManageMessages, quoteId); if (success) - await Response().Confirm(response).SendAsync(); + await Response().Confirm(strs.quote_deleted(quoteId)).SendAsync(); else - await Response().Error(response).SendAsync(); + await Response().Error(strs.quotes_remove_none).SendAsync(); } [Cmd] @@ -368,16 +326,9 @@ public partial class Utility if (string.IsNullOrWhiteSpace(keyword)) return; - keyword = keyword.ToUpperInvariant(); + await _qs.RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); - await using (var uow = _db.GetDbContext()) - { - await _service.RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); - - await uow.SaveChangesAsync(); - } - - await Response().Confirm(strs.quotes_deleted(Format.Bold(keyword.SanitizeAllMentions()))).SendAsync(); + await Response().Confirm(strs.quotes_deleted(Format.Bold(keyword))).SendAsync(); } [Cmd] @@ -385,7 +336,7 @@ public partial class Utility [UserPerm(GuildPerm.Administrator)] public async Task QuotesExport() { - var quotes = _service.GetForGuild(ctx.Guild.Id).ToList(); + var quotes = await _qs.GetGuildQuotesAsync(ctx.Guild.Id); var exprsDict = quotes.GroupBy(x => x.Keyword) .ToDictionary(x => x.Key, x => x.Select(ExportedQuote.FromModel)); @@ -400,7 +351,7 @@ public partial class Utility [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] [Ratelimit(300)] -#if GLOBAL_ELLIE +#if GLOBAL_NADEKO [OwnerOnly] #endif public async Task QuotesImport([Leftover] string? input = null) @@ -428,7 +379,7 @@ public partial class Utility } } - var succ = await ImportExprsAsync(ctx.Guild.Id, input); + var succ = await _qs.ImportQuotesAsync(ctx.Guild.Id, input); if (!succ) { await Response().Error(strs.expr_import_invalid_data).SendAsync(); @@ -437,56 +388,5 @@ public partial class Utility await ctx.OkAsync(); } - - private async Task ImportExprsAsync(ulong guildId, string input) - { - Dictionary> data; - try - { - data = Yaml.Deserializer.Deserialize>>(input); - if (data.Sum(x => x.Value.Count) == 0) - return false; - } - catch - { - return false; - } - - await using var uow = _db.GetDbContext(); - foreach (var entry in data) - { - var keyword = entry.Key; - await uow.Set() - .AddRangeAsync(entry.Value.Where(quote => !string.IsNullOrWhiteSpace(quote.Txt)) - .Select(quote => new Quote - { - GuildId = guildId, - Keyword = keyword, - Text = quote.Txt, - AuthorId = quote.Aid, - AuthorName = quote.An - })); - } - - await uow.SaveChangesAsync(); - return true; - } - - public class ExportedQuote - { - public string Id { get; set; } - public string An { get; set; } - public ulong Aid { get; set; } - public string Txt { get; set; } - - public static ExportedQuote FromModel(Quote quote) - => new() - { - Id = ((kwum)quote.Id).ToString(), - An = quote.AuthorName, - Aid = quote.AuthorId, - Txt = quote.Text - }; - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index 2f75ce2..8cf8d62 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -1,6 +1,8 @@ #nullable disable warnings using LinqToDB; +using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; +using EllieBot.Common.Yml; using EllieBot.Db.Models; namespace EllieBot.Modules.Utility; @@ -45,19 +47,19 @@ public sealed class QuoteService : IQuoteService, IEService return deleted; } - public async Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order) + public async Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order) { await using var uow = _db.GetDbContext(); var q = uow.Set() .ToLinqToDBTable() .Where(x => x.GuildId == guildId); - + if (order == OrderType.Keyword) q = q.OrderBy(x => x.Keyword); else q = q.OrderBy(x => x.Id); - - return await q.Skip(15 * page).Take(15).ToArrayAsync(); + + return await q.Skip(15 * page).Take(15).ToArrayAsyncLinqToDB(); } public async Task GetQuoteByKeywordAsync(ulong guildId, string keyword) @@ -97,11 +99,12 @@ public sealed class QuoteService : IQuoteService, IEService return toReturn; } - public IEnumerable GetForGuild(ulong guildId) + public async Task> GetGuildQuotesAsync(ulong guildId) { - using var uow = _db.GetDbContext(); - var quotes = uow.GetTable() - .Where(x => x.GuildId == guildId); + await using var uow = _db.GetDbContext(); + var quotes = await uow.GetTable() + .Where(x => x.GuildId == guildId) + .ToListAsyncLinqToDB(); return quotes; } @@ -124,7 +127,96 @@ public sealed class QuoteService : IQuoteService, IEService var quote = await uow.GetTable() .Where(x => x.Id == quoteId && x.GuildId == guildId) - .FirstAsyncLinqToDB(); + .FirstOrDefaultAsyncLinqToDB(); + return quote; } + + public async Task AddQuoteAsync( + ulong guildId, + ulong authorId, + string authorName, + string keyword, + string text) + { + keyword = keyword.ToUpperInvariant(); + + Quote q; + await using var uow = _db.GetDbContext(); + uow.Set() + .Add(q = new() + { + AuthorId = authorId, + AuthorName = authorName, + GuildId = guildId, + Keyword = keyword, + Text = text + }); + await uow.SaveChangesAsync(); + + return q; + } + + public async Task EditQuoteAsync(ulong authorId, int quoteId, string text) + { + await using var uow = _db.GetDbContext(); + var result = await uow.GetTable() + .Where(x => x.Id == quoteId && x.AuthorId == authorId) + .Set(x => x.Text, text) + .UpdateWithOutputAsync((del, ins) => ins); + + var q = result.FirstOrDefault(); + return q; + } + + public async Task DeleteQuoteAsync( + ulong guildId, + ulong authorId, + bool isQuoteManager, + int quoteId) + { + await using var uow = _db.GetDbContext(); + var q = uow.Set().GetById(quoteId); + + + var count = await uow.GetTable() + .Where(x => x.GuildId == guildId && x.Id == quoteId) + .Where(x => isQuoteManager || (x.AuthorId == authorId)) + .DeleteAsync(); + + + return count > 0; + } + + public async Task ImportQuotesAsync(ulong guildId, string input) + { + Dictionary> data; + try + { + data = Yaml.Deserializer.Deserialize>>(input); + } + catch (Exception ex) + { + Log.Warning(ex, "Quote import failed: {Message}", ex.Message); + return false; + } + + + var toImport = data.SelectMany(x => x.Value.Select(v => (Key: x.Key, Value: v))) + .Where(x => !string.IsNullOrWhiteSpace(x.Key) && !string.IsNullOrWhiteSpace(x.Value?.Txt)); + + await using var uow = _db.GetDbContext(); + await uow.GetTable() + .BulkCopyAsync(toImport + .Select(q => new Quote + { + GuildId = guildId, + Keyword = q.Key, + Text = q.Value.Txt, + AuthorId = q.Value.Aid, + AuthorName = q.Value.An + })); + + return true; + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs b/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs new file mode 100644 index 0000000..c0ee68d --- /dev/null +++ b/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs @@ -0,0 +1,20 @@ +using EllieBot.Db.Models; + +namespace EllieBot.Modules.Utility; + +public class ExportedQuote +{ + public required string Id { get; init; } + public required string An { get; init; } + public required ulong Aid { get; init; } + public required string Txt { get; init; } + + public static ExportedQuote FromModel(Quote quote) + => new() + { + Id = ((kwum)quote.Id).ToString(), + An = quote.AuthorName, + Aid = quote.AuthorId, + Txt = quote.Text + }; +} \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index b6f5924..af897a8 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -343,28 +343,57 @@ allcmdcooldowns: - cmdcds quoteadd: - quoteadd + - qa + - qadd + - quadd - . quoteedit: - quoteedit + - qe + - que - qedit quoteprint: - quoteprint + - qp + - qup - .. + - qprint quoteshow: - quoteshow + - qsh - qshow + - qushow quotesearch: - quotesearch + - qs + - qse - qsearch quoteid: - quoteid - qid quotedelete: - quotedelete + - qd - qdel + - qdelete quotedeleteauthor: - quotedeleteauthor + - qda - qdelauth +quotesexport: + - quotesexport + - qex + - qexport +quotesimport: + - quotesimport + - qim + - qimp + - qimport +quotelist: + - quotelist + - qli + - quli + - qulist draw: - draw drawnew: @@ -761,9 +790,6 @@ autotranslate: - autotranslate - at - autotrans -listquotes: - - listquotes - - liqu typedel: - typedel typelist: @@ -1210,12 +1236,6 @@ linkonlychannel: - linkssonly coordreload: - coordreload -quotesexport: - - quotesexport - - qexport -quotesimport: - - quotesimport - - qimport showembed: - showembed # EllieExpressions diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 3f96439..f82206d 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -2502,7 +2502,7 @@ autotranslate: params: - autoDelete: desc: "The option to automatically remove translated messages from the chat." -listquotes: +quotelist: desc: Lists all quotes on the server ordered alphabetically or by ID. 15 Per page. ex: - 3 -- 2.43.0 From 85e8c48f904cb1998938136e10dfb79ff62952eb Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 21 Aug 2024 20:26:27 +1200 Subject: [PATCH 109/253] Updated CHANGELOG.md --- CHANGELOG.md | 78 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d60c9..911dc21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +## Unreleased + +### Added + +### Changed + +- `.quote` commands cleaned up and improved + - All quote commands now start with `.q` and follow the same naming pattern as Expression commands + - `.liqu` renamed to `.qli` + - `.quotesearch` / `.qse` is now paginated for easier searching +- `.whosplaying` is now paginated +- `.setgame` renamed to`.setactivity` and now supports custom text activity. You don't have to specify playing, listening etc before the activity +- Clarified and added some embed / placeholder links to command help where needed +- dev: A lot of code cleanup and internal improvements + +### Fixed + +- Fixed `.xpcurrew` breaking xp gain if user gains 0 xp from being in a voice channel +- Fixed a bug in `.gatari` command + ## [5.1.7] - 09.08.2024 ### Fixed @@ -12,83 +32,83 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Added -- `'serverlist` is now paginated +- `.serverlist` is now paginated ### Changed -- `'listservers` renamed to `'serverlist` +- `.listservers` renamed to `.serverlist` ### Fixed -- `'afk` messages can no longer ping, and the response is moved to DMs to avoid abuse -- Possible fix for `'remind` timestamp +- `.afk` messages can no longer ping, and the response is moved to DMs to avoid abuse +- Possible fix for `.remind` timestamp ### Removed - Removed old bloat / semi broken / dumb commands - - `'memelist` / `'memegen` (too inconvenient to use) - - `'activity` (useless owner-only command) - - `'rafflecur` (Just use raffle and then award manually instead) - - `'rollduel` (we had this command?) -- You can no longer bet on `'connect4` -- `'economy` Removed. - - Was buggy and didn't really show the real state of the economy. + - `.memelist` / `.memegen` (too inconvenient to use) + - `.activity` (useless owner-only command) + - `.rafflecur` (Just use raffle and then award manually instead) + - `.rollduel` (we had this command?) +- You can no longer bet on `.connect4` +- `.economy` Removed. + - Was buggy and didn.t really show the real state of the economy. - It might come back improved in the future -- `'mal` Removed. Useless information / semi broken +- `.mal` Removed. Useless information / semi broken ## [5.1.5] - 01.08.2024 ### Added -- Added: Added a `'afk ?` command which sets an afk message which will trigger whenever someone pings you +- Added: Added a `.afk ?` command which sets an afk message which will trigger whenever someone pings you - Message will when you type a message in any channel that the bot sees, or after 8 hours, whichever comes first - The specified message will be prefixed with "The user is afk: " - The afk message will disappear 30 seconds after being triggered ### Changed -- Bot now shows a message when 'prune fails due to already running error +- Bot now shows a message when .prune fails due to already running error - Updated some bet descriptions to include 'all' 'half' usage instructions - Updated some command strings - dev: Vastly simplified marmalade creation using dotnet templates, docs updated -- Slight refactor of 'wiki, 'time, 'catfact, 'wikia, 'define, 'bible and 'quran commands, no significant change in functionality +- Slight refactor of .wiki, .time, .catfact, .wikia, .define, .bible and .quran commands, no significant change in functionality ### Fixed -- 'coins will no longer show double minus sign for negative changes +- .coins will no longer show double minus sign for negative changes - You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands ### Removed -- Removed 'rip command +- Removed .rip command ## [5.1.4] - 15.07.2024 ### Added -- Added `'coins` command which lists top 10 cryptos ordered by marketcap -- Added Clubs rank in the leaderboard to `'clubinfo` +- Added `.coins` command which lists top 10 cryptos ordered by marketcap +- Added Clubs rank in the leaderboard to `.clubinfo` - Bot owners can now check other people's bank balance (Not server owners, only bot owner, the person who is hosting the bot) -- You can now send multiple waifu gifts at once to waifus. For example `'waifugift 3xRose @user` will give that user 3 roses +- You can now send multiple waifu gifts at once to waifus. For example `.waifugift 3xRose @user` will give that user 3 roses - The format is `x`, no spaces -- Added `'boosttest` command +- Added `.boosttest` command ### Changed -- Updated command strings to clarify `'say` and `'send` usages +- Updated command strings to clarify `.say` and `.send` usages ### Fixed -- Fixed `'waifugift` help string +- Fixed `.waifugift` help string ### Removed -- Removed selfhost button from `'donate` command, no idea why it was there in the first place +- Removed selfhost button from `.donate` command, no idea why it was there in the first place ## [5.1.3] - 08.07.2024 ### Added -- Added `'quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy +- Added `.quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy ### Changed @@ -96,7 +116,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Fixed -- Fixed `'stickeradd` it now properly supports 300x300 image uploads. +- Fixed `.stickeradd` it now properly supports 300x300 image uploads. - Bot should now trim the invalid characters from chatterbot usernames to avoid openai errors - Fixed prompt triggering chatterbot responses twice - Honeypot commands now actually works @@ -111,15 +131,15 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Added -- Added `'honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. +- Added `.honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. - Useful to auto softban bots who spam every channel upon joining - Users who run commands or expressions won't be softbanned. - Users who have ban member permissions are also excluded. ### Fixed -- Fixed `'betdraw` not respecting maxbet -- Fixed `'xpshop` pagination for real this time? +- Fixed `.betdraw` not respecting maxbet +- Fixed `.xpshop` pagination for real this time? ## [5.1.0] - 28.06.2024 -- 2.43.0 From 290249dd063380e2df6e2917a6b9cf4be03c94dc Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 22 Aug 2024 20:27:04 +1200 Subject: [PATCH 110/253] Clarified some quote command strings Changed .delallq to be .qdall as all quote related commands start with .q now --- src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs | 2 +- src/EllieBot/data/aliases.yml | 8 ++++---- src/EllieBot/data/strings/commands/commands.en-US.yml | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index bf50b9c..41bbc61 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -321,7 +321,7 @@ public partial class Utility [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageMessages)] - public async Task DelAllQuotes([Leftover] string keyword) + public async Task QuotesDeleteAll([Leftover] string keyword) { if (string.IsNullOrWhiteSpace(keyword)) return; diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index af897a8..be045d0 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -700,10 +700,10 @@ guide: - readme calcops: - calcops -delallquotes: - - delallquotes - - daq - - delallq +quotesdeleteall: + - quotesdeleteall + - qdall + - qdeleteall greetdmmsg: - greetdmmsg cash: diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index f82206d..a4b7d15 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -1308,7 +1308,8 @@ quotesearch: textOrAuthor: desc: "The search term to find a matching quote." quoteid: - desc: Displays the quote with the specified ID number. Quote ID numbers can be found by typing `{0}liqu [num]` where `[num]` is a number of a page which contains 15 quotes. + desc: -| + Displays the quote with the specified ID number. ex: - 123456 params: @@ -2165,13 +2166,13 @@ calcops: - '' params: - {} -delallquotes: - desc: Deletes all quotes on a specified keyword. +quotesdeleteall: + desc: Deletes all quotes with the specified keyword. ex: - kek params: - keyword: - desc: "The keyword to search for in the text." + desc: "The keyword/trigger of the quotes to the deleted." greetdmmsg: desc: Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded. ex: -- 2.43.0 From 94bc5c49284523fa664e89c5542e19be731919a5 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 22 Aug 2024 20:29:43 +1200 Subject: [PATCH 111/253] fixed a file name --- src/EllieBot.VotesApi/{WeatherForecast.cs => Vote.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/EllieBot.VotesApi/{WeatherForecast.cs => Vote.cs} (100%) diff --git a/src/EllieBot.VotesApi/WeatherForecast.cs b/src/EllieBot.VotesApi/Vote.cs similarity index 100% rename from src/EllieBot.VotesApi/WeatherForecast.cs rename to src/EllieBot.VotesApi/Vote.cs -- 2.43.0 From 851093197c66986cd4e7b2832273efe7ea2cd6ed Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 23 Aug 2024 19:01:38 +1200 Subject: [PATCH 112/253] Fixed some .waifu related strings --- .../Gambling/Waifus/WaifuClaimCommands.cs | 18 +++++++++++++++--- .../strings/responses/responses.en-US.json | 8 ++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index d488e72..a25bdd9 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -70,7 +70,11 @@ public partial class Gambling return; } - var msg = GetText(strs.waifu_claimed(Format.Bold(target.ToString()), N(amount))); + var msg = GetText(strs.waifu_claimed( + Format.Bold(ctx.User.ToString()), + Format.Bold(target.ToString()), + N(amount))); + if (w.Affinity?.UserId == ctx.User.Id) msg += "\n" + GetText(strs.waifu_fulfilled(target, N(w.Price))); else @@ -191,13 +195,21 @@ public partial class Gambling } if (user is null) + { await Response().Confirm(strs.waifu_affinity_reset).SendAsync(); + } else if (oldAff is null) - await Response().Confirm(strs.waifu_affinity_set(Format.Bold(user.ToString()))).SendAsync(); + { + await Response() + .Confirm(strs.waifu_affinity_set(Format.Bold(ctx.User.ToString()), Format.Bold(user.ToString()))) + .SendAsync(); + } else { await Response() - .Confirm(strs.waifu_affinity_changed(Format.Bold(oldAff.ToString()), + .Confirm(strs.waifu_affinity_changed( + Format.Bold(ctx.User.ToString()), + Format.Bold(oldAff.ToString()), Format.Bold(user.ToString()))) .SendAsync(); } diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 31ee64f..3402440 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -307,13 +307,13 @@ "waifus_none": "No waifus have been claimed yet.", "waifus_top_waifus": "Top Waifus", "waifu_affinity_already": "your affinity is already set to that waifu or you're trying to remove your affinity while not having one.", - "waifu_affinity_changed": "changed their affinity from {0} to {1}.\n\n*This is morally questionable.*🤔", + "waifu_affinity_changed": "{0} changed their affinity from {1} to {2}.\n\n*This is morally questionable.*🤔", "waifu_affinity_cooldown": "You must wait {0} hours and {1} minutes in order to change your affinity again.", "waifu_affinity_reset": "Your affinity is reset. You no longer have a person you like.", - "waifu_affinity_set": "wants to be {0}'s waifu. Aww <3", - "waifu_claimed": "claimed {0} as their waifu for {1}!", + "waifu_affinity_set": "{0} wants to be {1}'s waifu. Aww <3", + "waifu_claimed": "{0} claimed {1} as their waifu for {2}!", "waifu_divorced_like": "You have divorced a waifu who likes you. You heartless monster.\n{0} received {1} as a compensation.", - "waifu_egomaniac": "you can't set affinity to yourself, you egomaniac.", + "waifu_egomaniac": "You can't set affinity to yourself, you egomaniac.", "waifu_fulfilled": "🎉 Their love is fulfilled! 🎉\n{0}'s new value is {1}!", "waifu_isnt_cheap": "No waifu is that cheap. You must pay at least {0} to get a waifu, even if their actual value is lower.", "waifu_not_enough": "You must pay {0} or more to claim that waifu!", -- 2.43.0 From f6d1cf076c18d51aff02f7f9ccf787933d82183a Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 23 Aug 2024 19:25:40 +1200 Subject: [PATCH 113/253] Clarified .anti* command help --- .../data/strings/commands/commands.en-US.yml | 299 ++++++++++-------- 1 file changed, 160 insertions(+), 139 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index a4b7d15..0c04ffd 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -16,13 +16,13 @@ gencmdlist: ex: - '' params: - - {} + - { } donate: desc: Provides instructions for helping the project financially. ex: - '' params: - - {} + - { } modules: desc: |- List all of the bot's modules. @@ -59,7 +59,7 @@ greet: ex: - '' params: - - {} + - { } greetmsg: desc: |- Sets a new join announcement message which will be shown in the current channel. @@ -75,7 +75,7 @@ bye: ex: - '' params: - - {} + - { } byemsg: desc: |- Sets a new leave announcement message which will be shown in the current channel. @@ -99,7 +99,7 @@ greetdm: ex: - '' params: - - {} + - { } greettest: desc: Sends the greet message in the current channel as if you just joined the server. You can optionally specify a different user. ex: @@ -139,7 +139,7 @@ boost: ex: - '' params: - - {} + - { } boostmsg: desc: |- Sets a new boost announcement message which will be shown in the current channel. @@ -173,7 +173,7 @@ logignore: - '@SomeUser' - '#some-channel' params: - - {} + - { } - target: desc: "The channel to ignore or show the list of ignored channels for." - target: @@ -183,7 +183,7 @@ repeatlist: ex: - '' params: - - {} + - { } repeatremove: desc: Removes a repeating message by index. Use `{0}replst` to see indexes. ex: @@ -276,7 +276,7 @@ rotateplaying: ex: - '' params: - - {} + - { } addplaying: desc: Adds a specified string to the list of playing strings to rotate. You have to pick either `Playing`, `Watching` or `Listening` as the first parameter. ex: @@ -292,7 +292,7 @@ listplaying: ex: - '' params: - - {} + - { } removeplaying: desc: Removes a playing status by index. Use `{0}lipl` to see indexes. ex: @@ -305,7 +305,7 @@ vcrolelist: ex: - '' params: - - {} + - { } vcrole: desc: Sets or resets a role which will be given to users who join the voice channel you're in when you run this command. Provide no role name to disable. You must be in a voice channel to run this command. ex: @@ -366,7 +366,7 @@ togglexclsar: ex: - '' params: - - {} + - { } iam: desc: Adds a role to you that you choose. Role must be on the list of self-assignable roles. ex: @@ -439,25 +439,25 @@ exprclear: ex: - '' params: - - {} + - { } fwclear: desc: Deletes all filtered words on this server. ex: - '' params: - - {} + - { } filterlist: desc: Lists invite and link filter channels and status. ex: - '' params: - - {} + - { } aliasesclear: desc: Deletes all aliases on this server. ex: - '' params: - - {} + - { } autoassignrole: desc: |- Toggles the role which will be assigned to every user who joins the server. @@ -470,7 +470,7 @@ autoassignrole: params: - role: desc: "The role assigned to new users, determining their permissions and access rights within the server." - - {} + - { } leave: desc: Makes Ellie leave the server. Either server name or server ID is required. ex: @@ -516,7 +516,7 @@ restart: ex: - '' params: - - {} + - { } setrole: desc: Gives a role to a user. The role you specify has to be lower in the role hierarchy than your highest role. ex: @@ -772,7 +772,7 @@ prunecancel: ex: - '' params: - - {} + - { } die: desc: Shuts the bot down. ex: @@ -912,7 +912,7 @@ serverinfo: params: - guildId: desc: "The ID of a server for which to retrieve information." - - {} + - { } channelinfo: desc: Shows info about the channel. If no channel is supplied, it defaults to current one. ex: @@ -967,7 +967,7 @@ stats: ex: - '' params: - - {} + - { } userid: desc: Shows user ID. ex: @@ -981,13 +981,13 @@ channelid: ex: - '' params: - - {} + - { } serverid: desc: Shows current server ID. ex: - '' params: - - {} + - { } roles: desc: List roles on this server or roles of a user if specified. Paginated, 20 roles per page. ex: @@ -1012,31 +1012,31 @@ chnlfilterinv: ex: - '' params: - - {} + - { } srvrfilterinv: desc: Toggles automatic deletion of invites posted in the server. Does not affect users with the Administrator permission. ex: - '' params: - - {} + - { } chnlfilterlin: desc: Toggles automatic deletion of links posted in the channel. Does not negate the `{0}srvrfilterlin` enabled setting. Does not affect users with the Administrator permission. ex: - '' params: - - {} + - { } srvrfilterlin: desc: Toggles automatic deletion of links posted in the server. Does not affect users with the Administrator permission. ex: - '' params: - - {} + - { } chnlfilterwords: desc: Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `{0}srvrfilterwords` enabled setting. Does not affect users with the Administrator permission. ex: - '' params: - - {} + - { } filterword: desc: Adds or removes (if it exists) a word from the list of filtered words. Use`{0}sfw` or `{0}cfw` to toggle filtering. ex: @@ -1049,7 +1049,7 @@ srvrfilterwords: ex: - '' params: - - {} + - { } lstfilterwords: desc: Shows a list of filtered words. ex: @@ -1352,7 +1352,7 @@ playlistshuffle: ex: - '' params: - - {} + - { } flip: desc: Flips coin(s) - heads or tails, and shows an image. ex: @@ -1384,7 +1384,7 @@ roll: - 3d5 - 5dF params: - - {} + - { } - num: desc: "The number of sides on the dice being rolled." - arg: @@ -1428,7 +1428,7 @@ nunchi: ex: - '' params: - - {} + - { } connect4: desc: Creates or joins an existing connect4 game. 2 players are required for the game. Objective of the game is to get 4 of your pieces next to each other in a vertical, horizontal or diagonal line. You can specify a bet when you create a game and only users who bet the same amount will be able to join your game. ex: @@ -1564,13 +1564,13 @@ tl: ex: - '' params: - - {} + - { } tq: desc: Quits current trivia after current question. ex: - '' params: - - {} + - { } typestart: desc: Starts a typing contest. ex: @@ -1583,7 +1583,7 @@ typestop: ex: - '' params: - - {} + - { } typeadd: desc: Adds a new article to the typing contest. ex: @@ -1614,7 +1614,7 @@ gencurrency: ex: - '' params: - - {} + - { } gencurlist: desc: Shows the list of server and channel ids where gc is enabled. Paginated with 9 per page. ex: @@ -1647,7 +1647,7 @@ next: ex: - '' params: - - {} + - { } play: desc: |- Queues up and plays a song or video based on a search query, song name, artist name or youtube link. @@ -1660,7 +1660,7 @@ play: - 5 - Dream Of Venice params: - - {} + - { } - index: desc: "The index of the desired song or search result to navigate to." - query: @@ -1670,19 +1670,19 @@ stop: ex: - '' params: - - {} + - { } destroy: desc: Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) ex: - '' params: - - {} + - { } pause: desc: Pauses or Unpauses the song. ex: - '' params: - - {} + - { } queue: desc: |- Queues up and plays a song or video based on a search query, song name, artist name, search query or youtube link. @@ -1713,7 +1713,7 @@ listqueue: - '' - 2 params: - - {} + - { } - page: desc: "The current page number for the song queue listing." nowplaying: @@ -1721,7 +1721,7 @@ nowplaying: ex: - '' params: - - {} + - { } volume: desc: Sets the music playback volume (0-100%). Persistent server setting. Default 100 ex: @@ -1762,7 +1762,7 @@ join: ex: - '' params: - - {} + - { } trackremove: desc: "Remove a song by its # in the queue, or 'all' (or provide no parameter) to remove all songs from the queue." ex: @@ -1812,7 +1812,7 @@ streamrole: desc: "The role of users being monitored for streamer status." addRole: desc: "The role to be added to users when they start streaming." - - {} + - { } load: desc: Loads a saved playlist using its ID. Use `{0}pls` to list all saved playlists and `{0}save` to save new ones. ex: @@ -1848,7 +1848,7 @@ queueautoplay: ex: - '' params: - - {} + - { } streamadd: desc: Notifies this channel when the stream on the specified URL goes online or offline. Offline notifications will only show if you enable `{0}streamoff`. Maximum 10 per server. ex: @@ -1861,7 +1861,7 @@ streamsclear: ex: - '' params: - - {} + - { } streamremove: desc: Stops following the stream on the specified index. (use `{0}stl` to see indexes) ex: @@ -1881,13 +1881,13 @@ streamoffline: ex: - '' params: - - {} + - { } streamonlinedelete: desc: Toggles whether the bot will delete stream online message when the stream goes offline. ex: - '' params: - - {} + - { } streammessage: desc: Sets the message which will show when the stream on the specified index comes online. You can use %user% and %platform% placeholders. ex: @@ -1927,13 +1927,13 @@ convertlist: ex: - '' params: - - {} + - { } wowjoke: desc: Get one of penultimate WoW jokes. ex: - '' params: - - {} + - { } calculate: desc: Evaluate a mathematical expression. ex: @@ -2031,25 +2031,25 @@ randomcat: ex: - '' params: - - {} + - { } randomdog: desc: Shows a random dog image. ex: - '' params: - - {} + - { } randomfood: desc: Shows a random food image. ex: - '' params: - - {} + - { } randombird: desc: Shows a random bird image. ex: - '' params: - - {} + - { } image: desc: Pulls a random image using a search parameter. ex: @@ -2090,31 +2090,31 @@ catfact: ex: - '' params: - - {} + - { } yomama: desc: Shows a random yomama joke. ex: - '' params: - - {} + - { } randjoke: desc: Shows a random joke. ex: - '' params: - - {} + - { } chucknorris: desc: Shows a random Chuck Norris joke. ex: - '' params: - - {} + - { } magicitem: desc: Shows a random magic item with its description. ex: - '' params: - - {} + - { } wiki: desc: Gives you back a wikipedia link ex: @@ -2153,19 +2153,19 @@ translangs: ex: - '' params: - - {} + - { } guide: desc: Sends a readme and a guide links to the channel. ex: - '' params: - - {} + - { } calcops: desc: Shows all available operations in the `{0}calc` command ex: - '' params: - - {} + - { } quotesdeleteall: desc: Deletes all quotes with the specified keyword. ex: @@ -2303,33 +2303,44 @@ deckshuffle: ex: - '' params: - - {} + - { } forwardmessages: desc: Toggles forwarding of non-command messages sent to bot's DM to the bot owners ex: - '' params: - - {} + - { } forwardtoall: desc: Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the creds.yml file ex: - '' params: - - {} + - { } forwardtochannel: desc: Toggles forwarding of non-command messages sent to bot's DM to the current channel ex: - '' params: - - {} + - { } resetperms: desc: Resets the bot's permissions module on this server to the default value. ex: - '' params: - - {} + - { } antiraid: - desc: 'Sets an anti-raid protection on the server. Provide no parameters to disable. First parameter is number of people which will trigger the protection. Second parameter is a time interval in which that number of people needs to join in order to trigger the protection, and third parameter is punishment for those people. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut' + desc: |- + Sets an anti-raid protection on the server. + + First parameter is number of people which will trigger the protection. + + Second parameter is a time interval in which that number of people needs to join in order to trigger the protection. + + Third parameter is punishment for those people. + Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut + You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. + + Provide no parameters to disable. ex: - 5 20 Kick - 7 9 Ban @@ -2352,14 +2363,19 @@ antiraid: action: desc: "The punishment action specifies the consequence for users who trigger the anti-raid protection." antispam: - desc: 'Stops people from repeating same message X times in a row. Provide no parameters to disable. You can specify to either mute, kick or ban the offenders. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Max message count is 10. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles, Warn, TimeOut' + desc: |- + Applies a Punishment to people who repeat the same message X times in a row. + Available Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut + You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. + Max message count is 10. + Provide no parameters to disable. ex: - 3 Mute - 5 Ban - 5 Ban 3h30m - '' params: - - {} + - { } - messageCount: desc: "The maximum number of times a user can send the same message before being punished." action: @@ -2377,12 +2393,17 @@ antispam: action: desc: "The type of punishment to be applied to the offender." antialt: - desc: Applies a punishment action to any user whose account is younger than the specified threshold. Specify time after the punishment to have a timed punishment (not all punishments support timers). + desc: |- + Applies a punishment action to any user whose account is younger than the specified threshold. + Available Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut + You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. + Max message count is 10. + Provide no parameters to disable. ex: - 1h Ban - 3d Mute 1h params: - - {} + - { } - minAge: desc: "The minimum age of an account for which the punishment should be applied." action: @@ -2446,7 +2467,7 @@ adsarm: ex: - '' params: - - {} + - { } setstream: desc: Sets the bots stream. First parameter is the twitch link, second parameter is stream name. ex: @@ -2490,7 +2511,7 @@ autotranslang: ex: - en fr params: - - {} + - { } - fromLang: desc: toLang: @@ -2545,7 +2566,7 @@ cleverbot: ex: - '' params: - - {} + - { } shorten: desc: Attempts to shorten an URL, if it fails, returns the input URL. ex: @@ -2575,7 +2596,7 @@ hangmanlist: ex: - '' params: - - {} + - { } hangman: desc: Starts a game of hangman in the channel. You can optionally select a category `{0}hangmanlist` to see a list of available categories. ex: @@ -2589,7 +2610,7 @@ hangmanstop: ex: - '' params: - - {} + - { } acrophobia: desc: Starts an Acrophobia game. ex: @@ -2603,7 +2624,7 @@ logevents: ex: - '' params: - - {} + - { } log: desc: Toggles logging event. Disables it if it is active anywhere on the server. Enables if it isn't active. Use `{0}logevents` to see a list of all events you can subscribe to. ex: @@ -2617,7 +2638,7 @@ queuefairplay: ex: - '' params: - - {} + - { } define: desc: Finds a definition of a word. ex: @@ -2661,13 +2682,13 @@ antilist: ex: - '' params: - - {} + - { } antispamignore: desc: Toggles whether antispam ignores current channel. Antispam must be enabled. ex: - '' params: - - {} + - { } eventstart: desc: |- Starts one of the events seen on public Ellie. @@ -2687,7 +2708,7 @@ betstats: ex: - '' params: - - {} + - { } slot: desc: |- Play Ellie slots by placing your bet. @@ -2720,7 +2741,7 @@ waifureset: ex: - '' params: - - {} + - { } waifutransfer: desc: Transfer the ownership of one of your waifus to another user. You must pay 10% of your waifu's value unless that waifu has affinity towards you, in which case you must pay 60% fee. Transferred waifu's price will be reduced by the fee amount. ex: @@ -2786,13 +2807,13 @@ setmusicchannel: ex: - '' params: - - {} + - { } unsetmusicchannel: desc: Bot will output playing, finished, paused and removed songs to the channel where the first song was queued in. Persistent server setting. ex: - '' params: - - {} + - { } musicquality: desc: 'Gets or sets the default music player quality. Available settings: Highest, High, Medium, Low. Default is **Highest**. Provide no argument to see current setting.' ex: @@ -2800,7 +2821,7 @@ musicquality: - High - Low params: - - {} + - { } - preset: desc: "The selected preset determines the level of audio compression and processing applied to the music playback." stringsreload: @@ -2808,7 +2829,7 @@ stringsreload: ex: - '' params: - - {} + - { } shardstats: desc: |- Stats for shards. Paginated with 25 shards per page. @@ -2849,7 +2870,7 @@ timezone: - '' - GMT Standard Time params: - - {} + - { } - id: desc: "The identifier for a specific timezone region." languagesetdefault: @@ -2858,7 +2879,7 @@ languagesetdefault: - en-US - default params: - - {} + - { } - name: desc: "The code page or character encoding for the target audience." languageset: @@ -2867,7 +2888,7 @@ languageset: - 'de-DE ' - default params: - - {} + - { } - name: desc: "The locale name for which the response language should be set." languageslist: @@ -2875,13 +2896,13 @@ languageslist: ex: - '' params: - - {} + - { } exprtoggleglobal: desc: Toggles whether global expressions are usable on this server. ex: - '' params: - - {} + - { } exprreact: desc: Sets or resets reactions (up to 3) which will be added to the response message of the Expression with the specified ID. Provide no emojis to reset. ex: @@ -2926,7 +2947,7 @@ exprsreload: ex: - '' params: - - {} + - { } exprsimport: desc: Upload the file or send the raw .yml data with this command to import all expressions from the specified string or file into the current server (or as global expressions in dm) ex: @@ -2939,7 +2960,7 @@ exprsexport: ex: - '' params: - - {} + - { } quotesimport: desc: Upload the file or send the raw .yml data with this command to import all quotes from the specified string or file into the current server. ex: @@ -3048,7 +3069,7 @@ startupcommandsclear: ex: - '' params: - - {} + - { } startupcommandslist: desc: Lists all startup commands in the order they will be executed in. ex: @@ -3098,7 +3119,7 @@ banmsgreset: ex: - '' params: - - {} + - { } banprune: desc: |- Sets how many days of messages will be deleted when a user is banned. @@ -3123,7 +3144,7 @@ warnexpire: - 3 - 6 --delete params: - - {} + - { } - days: desc: "The number of days after which expired warnings will be automatically cleared from the system." params: @@ -3154,7 +3175,7 @@ warnpunishlist: ex: - '' params: - - {} + - { } warnpunish: desc: "Sets a punishment for a certain number of warnings. You can specify a time string after 'Ban' or *'Mute' punishments to make it a temporary mute/ban. Provide no punishment to remove. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles" ex: @@ -3184,7 +3205,7 @@ ping: ex: - '' params: - - {} + - { } time: desc: Shows the current time and timezone in the specified location. ex: @@ -3300,7 +3321,7 @@ gamevoicechannel: ex: - '' params: - - {} + - { } shoplistadd: desc: Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked. ex: @@ -3329,19 +3350,19 @@ globalpermlist: ex: - '' params: - - {} + - { } resetglobalperms: desc: Resets global permissions set by bot owner. ex: - '' params: - - {} + - { } prefix: desc: Sets this server's prefix for all bot commands. Provide no parameters to see the current server prefix. **Setting prefix requires Administrator server permission.** ex: - + params: - - {} + - { } - _: desc: "The default text that is prepended to all bot command names." newPrefix: @@ -3431,13 +3452,13 @@ xptemplatereload: ex: - '' params: - - {} + - { } xpexclusionlist: desc: Shows the roles and channels excluded from the XP system on this server, as well as whether the whole server is excluded. ex: - '' params: - - {} + - { } xpexclude: desc: Exclude a channel, role or current server from the xp system. ex: @@ -3460,7 +3481,7 @@ xpnotify: - global dm - server channel params: - - {} + - { } - place: desc: "The location where notifications should be sent, such as a specific channel or DM." type: @@ -3477,7 +3498,7 @@ xprewsreset: ex: - '' params: - - {} + - { } xprolereward: desc: |- Add or remove a role from the user who reaches the specified level. @@ -3594,13 +3615,13 @@ clubleave: ex: - '' params: - - {} + - { } clubdisband: desc: Disbands the club you're the owner of. This action is irreversible. ex: - '' params: - - {} + - { } clubkick: desc: Kicks the user from the club. You must be the club owner. They will be able to apply again. ex: @@ -3784,7 +3805,7 @@ deletewaifus: ex: - '' params: - - {} + - { } deletewaifu: desc: Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables for the specified user. Also makes specified user's waifus free. ex: @@ -3799,19 +3820,19 @@ deletecurrency: ex: - '' params: - - {} + - { } deleteplaylists: desc: Deletes everything from MusicPlaylists. ex: - '' params: - - {} + - { } deletexp: desc: Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0. ex: - '' params: - - {} + - { } discordpermoverride: desc: Overrides required user permissions that the command has with the specified ones. You can only use server-level permissions. This action will make the bot ignore user permission requirements which command has by default. Provide no permissions to reset to default. ex: @@ -3834,13 +3855,13 @@ discordpermoverridereset: ex: - '' params: - - {} + - { } autodisconnect: desc: Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`. ex: - '' params: - - {} + - { } timelyset: desc: Sets the 'timely' currency allowance amount for users. Second parameter is period in hours, default is 24 hours. ex: @@ -3859,13 +3880,13 @@ timely: ex: - '' params: - - {} + - { } timelyreset: desc: Resets all user timeouts on `{0}timely` command. ex: - '' params: - - {} + - { } crypto: desc: Shows basic stats about a cryptocurrency from coinmarketcap.com. You can use either a name or an abbreviation of the currency. ex: @@ -3947,7 +3968,7 @@ rerodeleteall: ex: - '' params: - - {} + - { } rerotransfer: desc: Transfers reaction roles from one message to another by specifying their ids. If the target message has reaction roles specified already, the reaction roles will be MERGED, not overwritten. ex: @@ -3974,19 +3995,19 @@ hit: ex: - '' params: - - {} + - { } stand: desc: Finish your turn in the blackjack game. ex: - '' params: - - {} + - { } double: desc: In the blackjack game, double your bet in order to receive exactly one more card, and your turn ends. ex: - '' params: - - {} + - { } xpreset: desc: Resets specified user's XP, or the XP of all users in the server. You can't reverse this action. ex: @@ -3997,7 +4018,7 @@ xpreset: desc: "The ID of a specific guild member whose XP is being reset." - userId: desc: "The ID of a specific player whose experience points are being reset." - - {} + - { } xpshop: desc: Access the xp shop (if enabled). You can purchase either xp card frames or backgrounds. You can optionally provide a page number ex: @@ -4005,7 +4026,7 @@ xpshop: - frames - bgs 3 params: - - {} + - { } - type: desc: "The type of item to be purchased, such as an XP card frame or background." page: @@ -4097,7 +4118,7 @@ agerestricttoggle: ex: - '' params: - - {} + - { } purgeuser: desc: Purge user from the database completely. This includes currency, xp, clubs that user owns, waifu info ex: @@ -4126,7 +4147,7 @@ coordreload: ex: - '' params: - - {} + - { } showembed: desc: Prints the json equivalent of the embed of the message specified by its Id. ex: @@ -4144,7 +4165,7 @@ deleteemptyservers: ex: - '' params: - - {} + - { } marmaladeload: desc: |- Loads a marmalade with the specified name from the data/marmalades/ folder. @@ -4185,7 +4206,7 @@ marmaladelist: ex: - '' params: - - {} + - { } marmaladesearch: desc: Searches for marmalades online given the search term ex: @@ -4216,7 +4237,7 @@ bankbalance: - '' - '@User' params: - - {} + - { } banktake: desc: Takes the specified amount of currency from a user's bank ex: @@ -4244,7 +4265,7 @@ patron: ex: - '' params: - - {} + - { } - user: desc: "The ID or handle of the user whose patronage status is being checked." patronmessage: @@ -4309,7 +4330,7 @@ bettest: - betflip 1000 - slot 2000 params: - - {} + - { } - target: desc: "The type of game or wager being tested." tests: @@ -4333,7 +4354,7 @@ autopublish: ex: - '' params: - - {} + - { } doas: desc: Execute the command as if you were the target user. Requires bot ownership and server administrator permission. ex: @@ -4356,7 +4377,7 @@ cacheusers: - '' - serverId params: - - {} + - { } - guild: desc: "The guild for which user data is being cached." stickyroles: @@ -4364,7 +4385,7 @@ stickyroles: ex: - '' params: - - {} + - { } giveawaystart: desc: Starts a giveaway. Specify the duration (between 1 minute and 30 days) followed by the prize. ex: @@ -4402,13 +4423,13 @@ giveawaylist: ex: - '' params: - - {} + - { } todolist: desc: Lists all todos. ex: - '' params: - - {} + - { } todoadd: desc: Adds a new todo. ex: @@ -4487,7 +4508,7 @@ cleanupguilddata: ex: - '' params: - - {} + - { } prompt: desc: |- Ask the bot to do something for you. @@ -4505,7 +4526,7 @@ honeypot: ex: - '' params: - - {} + - { } coins: desc: |- Shows a list of 10 crypto currencies ordered by market cap. @@ -4534,4 +4555,4 @@ keep: ex: - '' params: - - {} \ No newline at end of file + - { } \ No newline at end of file -- 2.43.0 From e324d49cbce91bfe3ca5b336bc555b46e1f31e4e Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 23 Aug 2024 19:37:15 +1200 Subject: [PATCH 114/253] I forgot some things in the last commit. --- .../data/strings/commands/commands.en-US.yml | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 0c04ffd..2dfc785 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -817,7 +817,7 @@ setactivity: desc: Sets the bots game status to a Custom, Playing, Listening, or Watching status. ex: - Just chilling - - Playing with canaries. + - Playing with snakes - Listening music params: - type: @@ -827,14 +827,14 @@ setactivity: setserverbanner: desc: Sets a new banner image for the current server. Parameter is a direct link to an image. ex: - - https://cdn.elliebot.net/Ellie.png + - https://i.imgur.com/xTG3a1I.jpg params: - img: desc: "The URL of the image file to be displayed as the bot's banner." setservericon: desc: Sets a new icon image for the current server. Parameter is a direct link to an image. ex: - - https://cdn.elliebot.net/Ellie.png + - https://i.imgur.com/xTG3a1I.jpg params: - img: desc: "The URL of the image file to be displayed as the bot's banner." @@ -863,7 +863,7 @@ savechat: - cnt: desc: "The number of messages to be saved." remind: - desc: |- + desc: |- Sets a reminder which will be sent to you or to the targeted channel after certain amount of time (max 2 months). First parameter is `me` / `here` / 'channelname' Second parameter is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m. @@ -1523,7 +1523,7 @@ betroll: - amount: desc: "The amount to be wagered on the roll of the dice." luckyladder: - desc: + desc: Bets the specified amount of currency on the lucky ladder. You can stop on one of many different multipliers. The won amount is rounded down to the nearest whole number. @@ -1534,7 +1534,7 @@ luckyladder: - amount: desc: "The total value of the bet being placed." leaderboard: - desc: |- + desc: |- Displays the bot's currency leaderboard, or in other words, the richest users. Specifying -c flag will show only users who are in this server. Paginated with 10 users per page. @@ -1549,7 +1549,7 @@ leaderboard: params: desc: "Optional -c flag." trivia: - desc: |- + desc: |- Starts a game of trivia. First player to get to 10 points wins by default. 30 seconds per question. @@ -2172,7 +2172,7 @@ quotesdeleteall: - kek params: - keyword: - desc: "The keyword/trigger of the quotes to the deleted." + desc: "The keyword/trigger of the quotes to be deleted." greetdmmsg: desc: Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded. ex: @@ -2340,14 +2340,14 @@ antiraid: Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. - Provide no parameters to disable. + Provide no parameters to disable. ex: - 5 20 Kick - 7 9 Ban - 10 10 Ban 6h30m - '' params: - - {} + - { } - userThreshold: desc: "The number of users that must join the server within a specified time interval to trigger the anti-raid protection." seconds: @@ -2513,7 +2513,7 @@ autotranslang: params: - { } - fromLang: - desc: + desc: toLang: desc: "The destination language code, such as \"en\" for English or \"fr\" for French." autotranslate: @@ -2559,7 +2559,7 @@ serverlist: - page: desc: "The number of pages to retrieve from the server list." cleverbot: - desc: |- + desc: |- Toggles cleverbot/chatgpt session. When enabled, the bot will reply to messages starting with bot mention in the server. Expressions starting with %bot.mention% won't work if cleverbot/chatgpt is enabled. @@ -2973,7 +2973,7 @@ quotesexport: ex: - '' params: - - {} + - { } aliaslist: desc: Shows the list of currently set aliases. Paginated. ex: @@ -3169,7 +3169,7 @@ warndelete: - 3 params: - index: - desc: "The index of the warning to be deleted." + desc: "The index of the warning to be deleted." warnpunishlist: desc: Lists punishments for warnings. ex: @@ -4212,7 +4212,7 @@ marmaladesearch: ex: - shrine params: - - {} + - { } bankdeposit: desc: Deposits the specified amount of currency into the bank for later use. ex: @@ -4465,7 +4465,7 @@ todoclear: ex: - '' params: - - {} + - { } todoarchiveadd: desc: Creates a new archive with the specified name using current todos. ex: @@ -4502,7 +4502,7 @@ todoarchivedelete: - todoId: desc: "The identifier for the archived todo item to be deleted." cleanupguilddata: - desc: |- + desc: |- Deletes data for all servers bot is no longer a member of from the database. This is a highly destructive and irreversible command. ex: -- 2.43.0 From d478a6ca72376e285570fc39b23746e9281d1c34 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 25 Aug 2024 20:12:09 +1200 Subject: [PATCH 115/253] Added unclaimed waifu decay to gambling.yml Fixed regular decay. It was doing the opposite of what the comment says. All waifu decays will be reset --- .../Modules/Gambling/GamblingConfig.cs | 176 +++++++++--------- .../Modules/Gambling/GamblingConfigService.cs | 11 +- .../Modules/Gambling/Waifus/WaifuService.cs | 43 +++-- .../Gambling/Waifus/db/WaifuExtensions.cs | 5 +- src/EllieBot/data/gambling.yml | 7 +- 5 files changed, 142 insertions(+), 100 deletions(-) diff --git a/src/EllieBot/Modules/Gambling/GamblingConfig.cs b/src/EllieBot/Modules/Gambling/GamblingConfig.cs index 0100c88..2571890 100644 --- a/src/EllieBot/Modules/Gambling/GamblingConfig.cs +++ b/src/EllieBot/Modules/Gambling/GamblingConfig.cs @@ -11,7 +11,7 @@ namespace EllieBot.Modules.Gambling.Common; public sealed partial class GamblingConfig : ICloneable { [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 2; + public int Version { get; set; } = 8; [Comment("""Currency settings""")] public CurrencyConfig Currency { get; set; } @@ -20,9 +20,9 @@ public sealed partial class GamblingConfig : ICloneable public int MinBet { get; set; } = 0; [Comment(""" - Maximum amount users can bet - Set 0 for unlimited - """)] + Maximum amount users can bet + Set 0 for unlimited + """)] public int MaxBet { get; set; } = 0; [Comment("""Settings for betflip command""")] @@ -35,14 +35,14 @@ public sealed partial class GamblingConfig : ICloneable public GenerationConfig Generation { get; set; } [Comment(""" - Settings for timely command - (letting people claim X amount of currency every Y hours) - """)] + Settings for timely command + (letting people claim X amount of currency every Y hours) + """)] public TimelyConfig Timely { get; set; } [Comment("""How much will each user's owned currency decay over time.""")] public DecayConfig Decay { get; set; } - + [Comment("""What is the bot's cut on some transactions""")] public BotCutConfig BotCuts { get; set; } @@ -53,15 +53,15 @@ public sealed partial class GamblingConfig : ICloneable public WaifuConfig Waifu { get; set; } [Comment(""" - Amount of currency selfhosters will get PER pledged dollar CENT. - 1 = 100 currency per $. Used almost exclusively on public ellie. - """)] + Amount of currency selfhosters will get PER pledged dollar CENT. + 1 = 100 currency per $. Used almost exclusively on public ellie. + """)] public decimal PatreonCurrencyPerCent { get; set; } = 1; [Comment(""" - Currency reward per vote. - This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting - """)] + Currency reward per vote. + This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting + """)] public long VoteReward { get; set; } = 100; [Comment("""Slot config""")] @@ -91,9 +91,9 @@ public class CurrencyConfig public string Name { get; set; } = "Ellie Money"; [Comment(""" - For how long (in days) will the transactions be kept in the database (curtrs) - Set 0 to disable cleanup (keep transactions forever) - """)] + For how long (in days) will the transactions be kept in the database (curtrs) + Set 0 to disable cleanup (keep transactions forever) + """)] public int TransactionsLifetime { get; set; } = 0; } @@ -101,15 +101,15 @@ public class CurrencyConfig public partial class TimelyConfig { [Comment(""" - How much currency will the users get every time they run .timely command - setting to 0 or less will disable this feature - """)] + How much currency will the users get every time they run .timely command + setting to 0 or less will disable this feature + """)] public int Amount { get; set; } = 0; [Comment(""" - How often (in hours) can users claim currency with .timely command - setting to 0 or less will disable this feature - """)] + How often (in hours) can users claim currency with .timely command + setting to 0 or less will disable this feature + """)] public int Cooldown { get; set; } = 24; } @@ -124,10 +124,10 @@ public partial class BetFlipConfig public partial class BetRollConfig { [Comment(""" - When betroll is played, user will roll a number 0-100. - This setting will describe which multiplier is used for when the roll is higher than the given number. - Doesn't have to be ordered. - """)] + When betroll is played, user will roll a number 0-100. + This setting will describe which multiplier is used for when the roll is higher than the given number. + Doesn't have to be ordered. + """)] public BetRollPair[] Pairs { get; set; } = Array.Empty(); public BetRollConfig() @@ -155,17 +155,17 @@ public partial class BetRollConfig public partial class GenerationConfig { [Comment(""" - when currency is generated, should it also have a random password - associated with it which users have to type after the .pick command - in order to get it - """)] + when currency is generated, should it also have a random password + associated with it which users have to type after the .pick command + in order to get it + """)] public bool HasPassword { get; set; } = true; [Comment(""" - Every message sent has a certain % chance to generate the currency - specify the percentage here (1 being 100%, 0 being 0% - for example - default is 0.02, which is 2% - """)] + Every message sent has a certain % chance to generate the currency + specify the percentage here (1 being 100%, 0 being 0% - for example + default is 0.02, which is 2% + """)] public decimal Chance { get; set; } = 0.02M; [Comment("""How many seconds have to pass for the next message to have a chance to spawn currency""")] @@ -175,9 +175,9 @@ public partial class GenerationConfig public int MinAmount { get; set; } = 1; [Comment(""" - Maximum amount of currency that can spawn. - Set to the same value as MinAmount to always spawn the same amount - """)] + Maximum amount of currency that can spawn. + Set to the same value as MinAmount to always spawn the same amount + """)] public int MaxAmount { get; set; } = 1; } @@ -185,9 +185,9 @@ public partial class GenerationConfig public partial class DecayConfig { [Comment(""" - Percentage of user's current currency which will be deducted every 24h. - 0 - 1 (1 is 100%, 0.5 50%, 0 disabled) - """)] + Percentage of user's current currency which will be deducted every 24h. + 0 - 1 (1 is 100%, 0.5 50%, 0 disabled) + """)] public decimal Percent { get; set; } = 0; [Comment("""Maximum amount of user's currency that can decay at each interval. 0 for unlimited.""")] @@ -219,15 +219,15 @@ public sealed partial class WaifuConfig public MultipliersData Multipliers { get; set; } = new(); [Comment(""" - Settings for periodic waifu price decay. - Waifu price decays only if the waifu has no claimer. - """)] + Settings for periodic waifu price decay. + Waifu price decays only if the waifu has no claimer. + """)] public WaifuDecayConfig Decay { get; set; } = new(); [Comment(""" - List of items available for gifting. - If negative is true, gift will instead reduce waifu value. - """)] + List of items available for gifting. + If negative is true, gift will instead reduce waifu value. + """)] public List Items { get; set; } = []; public WaifuConfig() @@ -274,19 +274,25 @@ public sealed partial class WaifuConfig public class WaifuDecayConfig { [Comment(""" - Percentage (0 - 100) of the waifu value to reduce. - Set 0 to disable - For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - """)] - public int Percent { get; set; } = 0; + Percentage (0 - 100) of the waifu value to reduce. + Set 0 to disable + For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) + """)] + public int UnclaimedDecayPercent { get; set; } = 0; + + [Comment(""" + Claimed waifus will decay by this percentage (0 - 100). + Default is 0 (disabled) + """)] + public int ClaimedDecayPercent { get; set; } = 0; [Comment("""How often to decay waifu values, in hours""")] public int HourInterval { get; set; } = 24; [Comment(""" - Minimum waifu price required for the decay to be applied. - For example if this value is set to 300, any waifu with the price 300 or less will not experience decay. - """)] + Minimum waifu price required for the decay to be applied. + For example if this value is set to 300, any waifu with the price 300 or less will not experience decay. + """)] public long MinPrice { get; set; } = 300; } } @@ -295,54 +301,54 @@ public sealed partial class WaifuConfig public sealed partial class MultipliersData { [Comment(""" - Multiplier for waifureset. Default 150. - Formula (at the time of writing this): - price = (waifu_price * 1.25f) + ((number_of_divorces + changes_of_heart + 2) * WaifuReset) rounded up - """)] + Multiplier for waifureset. Default 150. + Formula (at the time of writing this): + price = (waifu_price * 1.25f) + ((number_of_divorces + changes_of_heart + 2) * WaifuReset) rounded up + """)] public int WaifuReset { get; set; } = 150; [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu who doesn't have a crush on you. - Default is 1.1 - Example: If a waifu is worth 100, you will have to pay at least 100 * NormalClaim currency to claim her. - (100 * 1.1 = 110) - """)] + The minimum amount of currency that you have to pay + in order to buy a waifu who doesn't have a crush on you. + Default is 1.1 + Example: If a waifu is worth 100, you will have to pay at least 100 * NormalClaim currency to claim her. + (100 * 1.1 = 110) + """)] public decimal NormalClaim { get; set; } = 1.1m; [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu that has a crush on you. - Default is 0.88 - Example: If a waifu is worth 100, you will have to pay at least 100 * CrushClaim currency to claim her. - (100 * 0.88 = 88) - """)] + The minimum amount of currency that you have to pay + in order to buy a waifu that has a crush on you. + Default is 0.88 + Example: If a waifu is worth 100, you will have to pay at least 100 * CrushClaim currency to claim her. + (100 * 0.88 = 88) + """)] public decimal CrushClaim { get; set; } = 0.88M; [Comment(""" - When divorcing a waifu, her new value will be her current value multiplied by this number. - Default 0.75 (meaning will lose 25% of her value) - """)] + When divorcing a waifu, her new value will be her current value multiplied by this number. + Default 0.75 (meaning will lose 25% of her value) + """)] public decimal DivorceNewValue { get; set; } = 0.75M; [Comment(""" - All gift prices will be multiplied by this number. - Default 1 (meaning no effect) - """)] + All gift prices will be multiplied by this number. + Default 1 (meaning no effect) + """)] public decimal AllGiftPrices { get; set; } = 1.0M; [Comment(""" - What percentage of the value of the gift will a waifu gain when she's gifted. - Default 0.95 (meaning 95%) - Example: If a waifu is worth 1000, and she receives a gift worth 100, her new value will be 1095) - """)] + What percentage of the value of the gift will a waifu gain when she's gifted. + Default 0.95 (meaning 95%) + Example: If a waifu is worth 1000, and she receives a gift worth 100, her new value will be 1095) + """)] public decimal GiftEffect { get; set; } = 0.95M; [Comment(""" - What percentage of the value of the gift will a waifu lose when she's gifted a gift marked as 'negative'. - Default 0.5 (meaning 50%) - Example: If a waifu is worth 1000, and she receives a negative gift worth 100, her new value will be 950) - """)] + What percentage of the value of the gift will a waifu lose when she's gifted a gift marked as 'negative'. + Default 0.5 (meaning 50%) + Example: If a waifu is worth 1000, and she receives a negative gift worth 100, her new value will be 950) + """)] public decimal NegativeGiftEffect { get; set; } = 0.50M; } diff --git a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs index 6fb8ff2..c1ad447 100644 --- a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs @@ -174,7 +174,7 @@ public sealed class GamblingConfigService : ConfigServiceBase c.Version = 5; }); } - + if (data.Version < 6) { ModifyConfig(c => @@ -190,5 +190,14 @@ public sealed class GamblingConfigService : ConfigServiceBase c.Version = 7; }); } + + if (data.Version < 8) + { + ModifyConfig(c => + { + c.Version = 8; + c.Waifu.Decay.UnclaimedDecayPercent = 0; + }); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs index 502a260..286d9e8 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs @@ -531,11 +531,18 @@ public class WaifuService : IEService, IReadyExecutor { try { - var multi = _gss.Data.Waifu.Decay.Percent / 100f; - var minPrice = _gss.Data.Waifu.Decay.MinPrice; - var decayInterval = _gss.Data.Waifu.Decay.HourInterval; + var decay = _gss.Data.Waifu.Decay; - if (multi is < 0f or > 1f || decayInterval < 0) + var unclaimedMulti = 1 - (decay.UnclaimedDecayPercent / 100f); + var claimedMulti = 1 - (decay.ClaimedDecayPercent / 100f); + + var minPrice = decay.MinPrice; + var decayInterval = decay.HourInterval; + + if (decayInterval <= 0) + continue; + + if ((unclaimedMulti < 0 || unclaimedMulti > 1) && (claimedMulti < 0 || claimedMulti > 1)) continue; var now = DateTime.UtcNow; @@ -554,14 +561,28 @@ public class WaifuService : IEService, IReadyExecutor await _cache.AddAsync(_waifuDecayKey, nowB); - await using var uow = _db.GetDbContext(); + if (unclaimedMulti is > 0 and <= 1) + { + await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.Price > minPrice && x.ClaimerId == null) - .UpdateAsync(old => new() - { - Price = (long)(old.Price * multi) - }); + await uow.GetTable() + .Where(x => x.Price > minPrice && x.ClaimerId == null) + .UpdateAsync(old => new() + { + Price = (long)(old.Price * unclaimedMulti) + }); + } + + if (claimedMulti is > 0 and <= 1) + { + await using var uow = _db.GetDbContext(); + await uow.GetTable() + .Where(x => x.Price > minPrice && x.ClaimerId == null) + .UpdateAsync(old => new() + { + Price = (long)(old.Price * claimedMulti) + }); + } } catch (Exception ex) { diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs index a1b6142..b5498f1 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs @@ -63,6 +63,8 @@ public static class WaifuExtensions public static async Task GetWaifuInfoAsync(this DbContext ctx, ulong userId) { + await ctx.EnsureUserCreatedAsync(userId); + await ctx.Set() .ToLinqToDBTable() .InsertOrUpdateAsync(() => new() @@ -78,7 +80,8 @@ public static class WaifuExtensions WaifuId = ctx.Set().Where(x => x.UserId == userId).Select(x => x.Id).First() }); - var toReturn = ctx.Set().AsQueryable() + var toReturn = ctx.Set() + .AsQueryable() .Where(w => w.WaifuId == ctx.Set() .AsQueryable() diff --git a/src/EllieBot/data/gambling.yml b/src/EllieBot/data/gambling.yml index fbcbdc4..65edcc0 100644 --- a/src/EllieBot/data/gambling.yml +++ b/src/EllieBot/data/gambling.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 7 +version: 8 # Currency settings currency: # What is the emoji/character which represents the currency @@ -128,7 +128,10 @@ waifu: # Percentage (0 - 100) of the waifu value to reduce. # Set 0 to disable # For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - percent: 0 + unclaimedDecayPercent: 0 + # Claimed waifus will decay by this percentage (0 - 100). + # Default is 0 (disabled) + claimedDecayPercent: 0 # How often to decay waifu values, in hours hourInterval: 24 # Minimum waifu price required for the decay to be applied. -- 2.43.0 From c6b9dd594d82d9e4cfa82d97fdb6bd938b5f0d5a Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 25 Aug 2024 20:12:27 +1200 Subject: [PATCH 116/253] Updated CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 911dc21..a8a8b01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## Unreleased +## [5.1.8] ### Added -- 2.43.0 From 37438f33a24cf154ea46741fcb3643e109a78a06 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 25 Aug 2024 20:19:17 +1200 Subject: [PATCH 117/253] Fixed some things being wrong in e324d49cbce91bfe3ca5b336bc555b46e1f31e4e --- src/EllieBot/data/strings/commands/commands.en-US.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 2dfc785..8016e89 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -817,7 +817,7 @@ setactivity: desc: Sets the bots game status to a Custom, Playing, Listening, or Watching status. ex: - Just chilling - - Playing with snakes + - Playing with canaries - Listening music params: - type: @@ -827,14 +827,14 @@ setactivity: setserverbanner: desc: Sets a new banner image for the current server. Parameter is a direct link to an image. ex: - - https://i.imgur.com/xTG3a1I.jpg + - https://cdn.elliebot.net/Ellie.png params: - img: desc: "The URL of the image file to be displayed as the bot's banner." setservericon: desc: Sets a new icon image for the current server. Parameter is a direct link to an image. ex: - - https://i.imgur.com/xTG3a1I.jpg + - https://cdn.elliebot.net/Ellie.png params: - img: desc: "The URL of the image file to be displayed as the bot's banner." -- 2.43.0 From ec403bbe5df76270d2a96b1de61ad7a9e8a1aaf7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 27 Aug 2024 21:21:39 +1200 Subject: [PATCH 118/253] Implemented .leaveunkeptservers which will cause the bot to leave all... Implemented .leaveunkeptservers which will cause the bot to leave all servers unmarked by .keep. Extremely dangerous and irreversible. Meant for use on public bot. --- .../DangerousCommands/CleanupCommands.cs | 24 +++- .../DangerousCommands/CleanupService.cs | 118 +++++++++++++++--- .../_common/ICleanupService.cs | 2 + src/EllieBot/data/aliases.yml | 4 +- .../data/strings/commands/commands.en-US.yml | 7 ++ 5 files changed, 134 insertions(+), 21 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index c49e77b..c9d9bb2 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -2,7 +2,7 @@ namespace EllieBot.Modules.Administration; -public partial class Administration +public partial class Administration { [Group] public partial class CleanupCommands : CleanupModuleBase @@ -39,5 +39,27 @@ public partial class Administration await Response().Text("This guild's bot data will be saved.").SendAsync(); } + + [Cmd] + [OwnerOnly] + public async Task LeaveUnkeptServers() + { + var keptGuildCount = await _svc.GetKeptGuildCount(); + + var response = await PromptUserConfirmAsync(new EmbedBuilder() + .WithDescription($""" + Do you want the bot to leave all unkept servers? + + There are currently {keptGuildCount} kept servers. + + **This is a highly destructive and irreversible action.** + """)); + + if (!response) + return; + + await _svc.LeaveUnkeptServers(); + await ctx.OkAsync(); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 7bf7128..be01a0b 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -2,16 +2,21 @@ using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using LinqToDB.Mapping; +using LinqToDB.Tools; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; +using System.Security.Cryptography; namespace EllieBot.Modules.Administration.DangerousCommands; public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService { + private TypedKey _cleanupReportKey = new("cleanup:report"); + private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); + + private TypedKey _keepTriggerKey = new("keep:trigger"); + private readonly IPubSub _pubSub; - private TypedKey _keepReportKey = new("cleanup:report"); - private TypedKey _keepTriggerKey = new("cleanup:trigger"); private readonly DiscordSocketClient _client; private ConcurrentDictionary guildIds = new(); private readonly IBotCredsProvider _creds; @@ -29,11 +34,82 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService _db = db; } + public async Task OnReadyAsync() + { + await _pubSub.Sub(_cleanupTriggerKey, OnCleanupTrigger); + await _pubSub.Sub(_keepTriggerKey, InternalTriggerKeep); + + _client.JoinedGuild += ClientOnJoinedGuild; + + if (_client.ShardId == 0) + await _pubSub.Sub(_cleanupReportKey, OnKeepReport); + } + + private bool keepTriggered = false; + + private async ValueTask InternalTriggerKeep(bool arg) + { + if (keepTriggered) + return; + + keepTriggered = true; + try + { + await Task.Delay(10 + (10 * _client.ShardId)); + + var allGuildIds = _client.Guilds.Select(x => x.Id); + + var table = await GetKeptGuildsTable(); + + var dontDeleteList = await table + .Where(x => allGuildIds.Contains(x.GuildId)) + .Select(x => x.GuildId) + .ToListAsyncLinqToDB(); + + var dontDelete = dontDeleteList.ToHashSet(); + + guildIds = new(); + foreach (var guildId in allGuildIds) + { + if (dontDelete.Contains(guildId)) + continue; + + // 1 leave per 20 seconds per shard + await Task.Delay(RandomNumberGenerator.GetInt32(18_000, 22_000)); + + SocketGuild? guild = null; + try + { + guild = _client.GetGuild(guildId); + + if (guild is null) + { + Log.Warning("Unable to find guild {GuildId}", guildId); + continue; + } + + await guild.LeaveAsync(); + } + catch (Exception ex) + { + Log.Warning("Unable to leave guild {GuildName} [{GuildId}]: {ErrorMessage}", + guild?.Name, + guildId, + ex.Message); + } + } + } + finally + { + keepTriggered = false; + } + } + public async Task DeleteMissingGuildDataAsync() { guildIds = new(); var totalShards = _creds.GetCreds().TotalShards; - await _pubSub.Pub(_keepTriggerKey, true); + await _pubSub.Pub(_cleanupTriggerKey, true); var counter = 0; while (guildIds.Keys.Count < totalShards) { @@ -133,10 +209,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService public async Task KeepGuild(ulong guildId) { - await using var db = _db.GetDbContext(); - await using var ctx = db.CreateLinqToDBContext(); - - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); + var table = await GetKeptGuildsTable(); if (await table.AnyAsyncLinqToDB(x => x.GuildId == guildId)) return false; @@ -149,30 +222,37 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return true; } + public async Task GetKeptGuildCount() + { + var table = await GetKeptGuildsTable(); + return await table.CountAsync(); + } + + private async Task> GetKeptGuildsTable() + { + await using var db = _db.GetDbContext(); + await using var ctx = db.CreateLinqToDBContext(); + var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); + return table; + } + + public async Task LeaveUnkeptServers() + => await _pubSub.Pub(_keepTriggerKey, true); + private ValueTask OnKeepReport(KeepReport report) { guildIds[report.ShardId] = report.GuildIds; return default; } - public async Task OnReadyAsync() - { - await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger); - - _client.JoinedGuild += ClientOnJoinedGuild; - - if (_client.ShardId == 0) - await _pubSub.Sub(_keepReportKey, OnKeepReport); - } - private async Task ClientOnJoinedGuild(SocketGuild arg) { await KeepGuild(arg.Id); } - private ValueTask OnKeepTrigger(bool arg) + private ValueTask OnCleanupTrigger(bool arg) { - _pubSub.Pub(_keepReportKey, + _pubSub.Pub(_cleanupReportKey, new KeepReport() { ShardId = _client.ShardId, diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index 5d4a720..e48bba4 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -4,4 +4,6 @@ public interface ICleanupService { Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); + Task GetKeptGuildCount(); + Task LeaveUnkeptServers(); } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index be045d0..66b7401 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -1423,4 +1423,6 @@ coins: afk: - afk keep: - - keep \ No newline at end of file + - keep +leaveunkeptservers: + - leaveunkeptservers \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 8016e89..912ca40 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4554,5 +4554,12 @@ keep: The current serve, won't be deleted from Ellie's database during the purge. ex: - '' + params: + - { } +leaveunkeptservers: + desc: |- + Leaves all servers whose owners didn't run .keep + ex: + - '' params: - { } \ No newline at end of file -- 2.43.0 From 7f935a72c1eca75b47dedb7d7b73bf1f3348b629 Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 27 Aug 2024 21:31:39 +1200 Subject: [PATCH 119/253] fix for .leaveunkeptservers --- .../DangerousCommands/CleanupService.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index be01a0b..86d077d 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -59,14 +59,19 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService var allGuildIds = _client.Guilds.Select(x => x.Id); - var table = await GetKeptGuildsTable(); + HashSet dontDelete; + await using (var db = _db.GetDbContext()) + { + await using var ctx = db.CreateLinqToDBConnection(); + var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - var dontDeleteList = await table + var dontDeleteList = await table .Where(x => allGuildIds.Contains(x.GuildId)) .Select(x => x.GuildId) .ToListAsyncLinqToDB(); - var dontDelete = dontDeleteList.ToHashSet(); + dontDelete = dontDeleteList.ToHashSet(); + } guildIds = new(); foreach (var guildId in allGuildIds) @@ -209,8 +214,9 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService public async Task KeepGuild(ulong guildId) { - var table = await GetKeptGuildsTable(); - + await using var db = _db.GetDbContext(); + await using var ctx = db.CreateLinqToDbContext(); + var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); if (await table.AnyAsyncLinqToDB(x => x.GuildId == guildId)) return false; @@ -223,17 +229,11 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService } public async Task GetKeptGuildCount() - { - var table = await GetKeptGuildsTable(); - return await table.CountAsync(); - } - - private async Task> GetKeptGuildsTable() { await using var db = _db.GetDbContext(); await using var ctx = db.CreateLinqToDBContext(); var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - return table; + return await table.CountAsync(); } public async Task LeaveUnkeptServers() -- 2.43.0 From 7874008da2de2d21c6401a8e3a3ecbc0e86d2f3d Mon Sep 17 00:00:00 2001 From: Toastie Date: Tue, 27 Aug 2024 22:05:37 +1200 Subject: [PATCH 120/253] Changed how leaving unkept servers work. It only works per-shard now --- .../DangerousCommands/CleanupCommands.cs | 4 ++-- .../DangerousCommands/CleanupService.cs | 13 ++++++++----- .../DangerousCommands/_common/ICleanupService.cs | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index c9d9bb2..55deace 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -42,7 +42,7 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task LeaveUnkeptServers() + public async Task LeaveUnkeptServers(int shardId = 0) { var keptGuildCount = await _svc.GetKeptGuildCount(); @@ -58,7 +58,7 @@ public partial class Administration if (!response) return; - await _svc.LeaveUnkeptServers(); + await _svc.LeaveUnkeptServers(shardId); await ctx.OkAsync(); } } diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 86d077d..dc84027 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -14,7 +14,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private TypedKey _cleanupReportKey = new("cleanup:report"); private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); - private TypedKey _keepTriggerKey = new("keep:trigger"); + private TypedKey _keepTriggerKey = new("keep:trigger"); private readonly IPubSub _pubSub; private readonly DiscordSocketClient _client; @@ -47,8 +47,11 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private bool keepTriggered = false; - private async ValueTask InternalTriggerKeep(bool arg) + private async ValueTask InternalTriggerKeep(int shardId) { + if (_client.ShardId != shardId) + return; + if (keepTriggered) return; @@ -80,7 +83,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService continue; // 1 leave per 20 seconds per shard - await Task.Delay(RandomNumberGenerator.GetInt32(18_000, 22_000)); + await Task.Delay(500); SocketGuild? guild = null; try @@ -236,8 +239,8 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return await table.CountAsync(); } - public async Task LeaveUnkeptServers() - => await _pubSub.Pub(_keepTriggerKey, true); + public async Task LeaveUnkeptServers(int shardId) + => await _pubSub.Pub(_keepTriggerKey, shardId); private ValueTask OnKeepReport(KeepReport report) { diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index e48bba4..318197c 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -5,5 +5,5 @@ public interface ICleanupService Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); Task GetKeptGuildCount(); - Task LeaveUnkeptServers(); + Task LeaveUnkeptServers(int shardId); } \ No newline at end of file -- 2.43.0 From 1c53371598bd438bd16e3309aa89918c553a8a55 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 28 Aug 2024 19:57:33 +1200 Subject: [PATCH 121/253] unkept leave now has a configurable delay --- .../DangerousCommands/CleanupCommands.cs | 4 ++-- .../DangerousCommands/CleanupService.cs | 19 ++++++++----------- .../_common/ICleanupService.cs | 2 +- .../data/strings/commands/commands.en-US.yml | 5 ++++- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 55deace..0d282d0 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -42,7 +42,7 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task LeaveUnkeptServers(int shardId = 0) + public async Task LeaveUnkeptServers(int shardId = 0, int delay = 1000) { var keptGuildCount = await _svc.GetKeptGuildCount(); @@ -58,7 +58,7 @@ public partial class Administration if (!response) return; - await _svc.LeaveUnkeptServers(shardId); + await _svc.LeaveUnkeptServers(shardId, delay); await ctx.OkAsync(); } } diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index dc84027..4e01f4b 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -2,10 +2,8 @@ using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using LinqToDB.Mapping; -using LinqToDB.Tools; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; -using System.Security.Cryptography; namespace EllieBot.Modules.Administration.DangerousCommands; @@ -14,7 +12,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private TypedKey _cleanupReportKey = new("cleanup:report"); private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); - private TypedKey _keepTriggerKey = new("keep:trigger"); + private TypedKey<(int, int)> _keepTriggerKey = new("keep:trigger"); private readonly IPubSub _pubSub; private readonly DiscordSocketClient _client; @@ -47,19 +45,19 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private bool keepTriggered = false; - private async ValueTask InternalTriggerKeep(int shardId) + private async ValueTask InternalTriggerKeep((int shardId, int delay) data) { + var (shardId, delay) = data; + if (_client.ShardId != shardId) return; - + if (keepTriggered) return; keepTriggered = true; try { - await Task.Delay(10 + (10 * _client.ShardId)); - var allGuildIds = _client.Guilds.Select(x => x.Id); HashSet dontDelete; @@ -82,8 +80,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService if (dontDelete.Contains(guildId)) continue; - // 1 leave per 20 seconds per shard - await Task.Delay(500); + await Task.Delay(delay); SocketGuild? guild = null; try @@ -239,8 +236,8 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return await table.CountAsync(); } - public async Task LeaveUnkeptServers(int shardId) - => await _pubSub.Pub(_keepTriggerKey, shardId); + public async Task LeaveUnkeptServers(int shardId, int delay) + => await _pubSub.Pub(_keepTriggerKey, (shardId, delay)); private ValueTask OnKeepReport(KeepReport report) { diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index 318197c..d2e4add 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -5,5 +5,5 @@ public interface ICleanupService Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); Task GetKeptGuildCount(); - Task LeaveUnkeptServers(int shardId); + Task LeaveUnkeptServers(int shardId, int delay); } \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 912ca40..ccfb54d 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4562,4 +4562,7 @@ leaveunkeptservers: ex: - '' params: - - { } \ No newline at end of file + - shardId: + desc: "Shard id from which to start leaving unkept servers." + - delay: + desc: "Delay in miliseconds between leaves" \ No newline at end of file -- 2.43.0 From 74767e86611479949f4dd8034469992d2de51f56 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 28 Aug 2024 20:00:58 +1200 Subject: [PATCH 122/253] added some logging to .leaveunkeptservers --- .../Administration/DangerousCommands/CleanupService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 4e01f4b..b36d988 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -58,7 +58,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService keepTriggered = true; try { - var allGuildIds = _client.Guilds.Select(x => x.Id); + var allGuildIds = _client.Guilds.Select(x => x.Id).ToArray(); HashSet dontDelete; await using (var db = _db.GetDbContext()) @@ -74,7 +74,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService dontDelete = dontDeleteList.ToHashSet(); } - guildIds = new(); + Log.Information("Leaving {RemainingCount} guilds every {Delay} seconds, {DontDeleteCount} will remain", allGuildIds.Length - dontDelete.Count, delay, dontDelete.Count); foreach (var guildId in allGuildIds) { if (dontDelete.Contains(guildId)) -- 2.43.0 From 45d9fa08db9ec783b8a2c8fff3232903684ab8d4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 28 Aug 2024 20:05:04 +1200 Subject: [PATCH 123/253] fixed pubsub not supporting tuples --- .../Modules/Administration/DangerousCommands/CleanupCommands.cs | 2 +- .../Modules/Administration/DangerousCommands/CleanupService.cs | 2 +- src/EllieBot/Services/Impl/PubSub/JsonSeria.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 0d282d0..211c8c2 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -42,7 +42,7 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task LeaveUnkeptServers(int shardId = 0, int delay = 1000) + public async Task LeaveUnkeptServers(int shardId, int delay = 1000) { var keptGuildCount = await _svc.GetKeptGuildCount(); diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index b36d988..31469e2 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -45,7 +45,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private bool keepTriggered = false; - private async ValueTask InternalTriggerKeep((int shardId, int delay) data) + private async ValueTask InternalTriggerKeep((int, int) data) { var (shardId, delay) = data; diff --git a/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs b/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs index 413b8f8..25c6b96 100644 --- a/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs +++ b/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs @@ -7,6 +7,7 @@ public class JsonSeria : ISeria { private readonly JsonSerializerOptions _serializerOptions = new() { + IncludeFields = true, Converters = { new Rgba32Converter(), -- 2.43.0 From b752633e837855d0d16c6715db2fc5c5a0e1e027 Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 29 Aug 2024 18:51:15 +1200 Subject: [PATCH 124/253] Changed .leaveunkeptservers again to only accept startShardId, it will loop through the shards and execute clean on them every 2250 seconds (assuming shards are almost full). Delay is fixed at 1 second as that is the discord ratelimit --- .../DangerousCommands/CleanupCommands.cs | 17 +++++++++++++---- .../DangerousCommands/CleanupService.cs | 17 +++++++++-------- .../_common/ICleanupService.cs | 2 +- .../data/strings/commands/commands.en-US.yml | 4 +--- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 211c8c2..c74c60f 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -8,9 +8,13 @@ public partial class Administration public partial class CleanupCommands : CleanupModuleBase { private readonly ICleanupService _svc; + private readonly IBotCredsProvider _creds; - public CleanupCommands(ICleanupService svc) - => _svc = svc; + public CleanupCommands(ICleanupService svc, IBotCredsProvider creds) + { + _svc = svc; + _creds = creds; + } [Cmd] [OwnerOnly] @@ -42,7 +46,7 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task LeaveUnkeptServers(int shardId, int delay = 1000) + public async Task LeaveUnkeptServers(int startShardId) { var keptGuildCount = await _svc.GetKeptGuildCount(); @@ -58,7 +62,12 @@ public partial class Administration if (!response) return; - await _svc.LeaveUnkeptServers(shardId, delay); + for (var i = startShardId; i < _creds.GetCreds().TotalShards; i++) + { + await _svc.LeaveUnkeptServers(startShardId); + await Task.Delay(2250 * 1000); + } + await ctx.OkAsync(); } } diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 31469e2..9d339d9 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -12,7 +12,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private TypedKey _cleanupReportKey = new("cleanup:report"); private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); - private TypedKey<(int, int)> _keepTriggerKey = new("keep:trigger"); + private TypedKey _keepTriggerKey = new("keep:trigger"); private readonly IPubSub _pubSub; private readonly DiscordSocketClient _client; @@ -45,10 +45,8 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService private bool keepTriggered = false; - private async ValueTask InternalTriggerKeep((int, int) data) + private async ValueTask InternalTriggerKeep(int shardId) { - var (shardId, delay) = data; - if (_client.ShardId != shardId) return; @@ -74,13 +72,16 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService dontDelete = dontDeleteList.ToHashSet(); } - Log.Information("Leaving {RemainingCount} guilds every {Delay} seconds, {DontDeleteCount} will remain", allGuildIds.Length - dontDelete.Count, delay, dontDelete.Count); + Log.Information("Leaving {RemainingCount} guilds every {Delay} seconds, {DontDeleteCount} will remain", + allGuildIds.Length - dontDelete.Count, + shardId, + dontDelete.Count); foreach (var guildId in allGuildIds) { if (dontDelete.Contains(guildId)) continue; - await Task.Delay(delay); + await Task.Delay(1016); SocketGuild? guild = null; try @@ -236,8 +237,8 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return await table.CountAsync(); } - public async Task LeaveUnkeptServers(int shardId, int delay) - => await _pubSub.Pub(_keepTriggerKey, (shardId, delay)); + public async Task LeaveUnkeptServers(int shardId) + => await _pubSub.Pub(_keepTriggerKey, shardId); private ValueTask OnKeepReport(KeepReport report) { diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index d2e4add..318197c 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -5,5 +5,5 @@ public interface ICleanupService Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); Task GetKeptGuildCount(); - Task LeaveUnkeptServers(int shardId, int delay); + Task LeaveUnkeptServers(int shardId); } \ No newline at end of file diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index ccfb54d..d4db3ca 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4563,6 +4563,4 @@ leaveunkeptservers: - '' params: - shardId: - desc: "Shard id from which to start leaving unkept servers." - - delay: - desc: "Delay in miliseconds between leaves" \ No newline at end of file + desc: "Shard id from which to start leaving unkept servers." \ No newline at end of file -- 2.43.0 From 38b26c0550317fa8b0ed02bb969435315d23022c Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 29 Aug 2024 19:01:39 +1200 Subject: [PATCH 125/253] Fixed a spelling mistake in commands.en-US.yml --- src/EllieBot/data/strings/commands/commands.en-US.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index d4db3ca..303bdec 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -4551,7 +4551,7 @@ afk: desc: "The message to send when someone pings you." keep: desc: |- - The current serve, won't be deleted from Ellie's database during the purge. + The current server, won't be deleted from Ellie's database during the purge. ex: - '' params: -- 2.43.0 From 22d03005a1b4eb3f560feedf350ffd9a21a95705 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 30 Aug 2024 15:40:12 +1200 Subject: [PATCH 126/253] fixed .leaveunkeptservers --- .../Modules/Administration/DangerousCommands/CleanupCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index c74c60f..2b413ca 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -64,7 +64,7 @@ public partial class Administration for (var i = startShardId; i < _creds.GetCreds().TotalShards; i++) { - await _svc.LeaveUnkeptServers(startShardId); + await _svc.LeaveUnkeptServers(i); await Task.Delay(2250 * 1000); } -- 2.43.0 From f70ff5c0538a7c00089d27ac6013e7ba298024b4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 30 Aug 2024 18:50:01 +1200 Subject: [PATCH 127/253] increased delay to 2500, renamed method --- .../Administration/DangerousCommands/CleanupCommands.cs | 4 ++-- .../Administration/DangerousCommands/CleanupService.cs | 2 +- .../DangerousCommands/_common/ICleanupService.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 2b413ca..ada76bd 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -62,9 +62,9 @@ public partial class Administration if (!response) return; - for (var i = startShardId; i < _creds.GetCreds().TotalShards; i++) + for (var shardId = startShardId; shardId < _creds.GetCreds().TotalShards; shardId++) { - await _svc.LeaveUnkeptServers(i); + await _svc.StartLeavingUnkeptServers(shardId); await Task.Delay(2250 * 1000); } diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 9d339d9..dd269bc 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -237,7 +237,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return await table.CountAsync(); } - public async Task LeaveUnkeptServers(int shardId) + public async Task StartLeavingUnkeptServers(int shardId) => await _pubSub.Pub(_keepTriggerKey, shardId); private ValueTask OnKeepReport(KeepReport report) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index 318197c..8988f32 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -5,5 +5,5 @@ public interface ICleanupService Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); Task GetKeptGuildCount(); - Task LeaveUnkeptServers(int shardId); + Task StartLeavingUnkeptServers(int shardId); } \ No newline at end of file -- 2.43.0 From b017c5e8052bcb96dc35293ae78b17ff993724d2 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 30 Aug 2024 18:57:46 +1200 Subject: [PATCH 128/253] increased delay to 3k on leaveunkeptservers Last commit want meant to have the delay at 2500 but I forgot --- .../Modules/Administration/DangerousCommands/CleanupCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index ada76bd..e6ba515 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -65,7 +65,7 @@ public partial class Administration for (var shardId = startShardId; shardId < _creds.GetCreds().TotalShards; shardId++) { await _svc.StartLeavingUnkeptServers(shardId); - await Task.Delay(2250 * 1000); + await Task.Delay(3000 * 1000); } await ctx.OkAsync(); -- 2.43.0 From 89ab9a2ceb48c9d7eb920cd1a644ee124db0ecc3 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 30 Aug 2024 19:05:16 +1200 Subject: [PATCH 129/253] fixed quoteshow and quoteid commands not working --- src/EllieBot/Modules/Utility/Quote/IQuoteService.cs | 2 +- src/EllieBot/Modules/Utility/Quote/QuoteService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs index 20bec68..acd6b19 100644 --- a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs @@ -29,7 +29,7 @@ public interface IQuoteService Task> GetGuildQuotesAsync(ulong guildId); Task RemoveAllByKeyword(ulong guildId, string keyword); - Task GetQuoteByIdAsync(ulong guildId, kwum quoteId); + Task GetQuoteByIdAsync(ulong guildId, int quoteId); Task AddQuoteAsync( ulong guildId, diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index 8cf8d62..a518a01 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -121,7 +121,7 @@ public sealed class QuoteService : IQuoteService, IEService return count; } - public async Task GetQuoteByIdAsync(ulong guildId, kwum quoteId) + public async Task GetQuoteByIdAsync(ulong guildId, int quoteId) { await using var uow = _db.GetDbContext(); -- 2.43.0 From 742d98a4c11eb3dbb271e9875e73b4caa3fe94d9 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 4 Sep 2024 22:02:50 +1200 Subject: [PATCH 130/253] Updated image library --- src/EllieBot/EllieBot.csproj | 6 +-- .../Administration/AutoPublishService.cs | 2 + .../Gambling/PlantPick/PlantPickService.cs | 42 +++++++++++-------- .../Modules/Gambling/Slot/SlotCommands.cs | 6 +-- .../Modules/Searches/Crypto/CryptoService.cs | 2 +- .../ImagesharpStockChartDrawingService.cs | 8 ++-- src/EllieBot/Modules/Xp/XpService.cs | 27 ++++++------ .../_common/JsonConverters/Rgba32Converter.cs | 2 +- .../_common/_Extensions/Rgba32Extensions.cs | 2 +- 9 files changed, 54 insertions(+), 43 deletions(-) diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index b67381c..910d7d1 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -69,9 +69,9 @@ - - - + + + diff --git a/src/EllieBot/Modules/Administration/AutoPublishService.cs b/src/EllieBot/Modules/Administration/AutoPublishService.cs index 8f29495..a0983d3 100644 --- a/src/EllieBot/Modules/Administration/AutoPublishService.cs +++ b/src/EllieBot/Modules/Administration/AutoPublishService.cs @@ -37,6 +37,8 @@ public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService }); } + // todo GUILDS + public async Task OnReadyAsync() { var creds = _creds.GetCreds(); diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs index bffd035..37aba9f 100644 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs +++ b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs @@ -111,13 +111,17 @@ public class PlantPickService : IEService, IExecNoCommand { var curImg = await _images.GetCurrencyImageAsync(); + if (curImg is null) + return (new MemoryStream(), null); + if (string.IsNullOrWhiteSpace(pass)) { // determine the extension - using var load = _ = Image.Load(curImg, out var format); + using var load = Image.Load(curImg); + var format = load.Metadata.DecodedImageFormat; // return the image - return (curImg.ToStream(), format.FileExtensions.FirstOrDefault() ?? "png"); + return (curImg.ToStream(), format?.FileExtensions.FirstOrDefault() ?? "png"); } // get the image stream and extension @@ -134,16 +138,17 @@ public class PlantPickService : IEService, IExecNoCommand { // draw lower, it looks better pass = pass.TrimTo(10, true).ToLowerInvariant(); - using var img = Image.Load(curImg, out var format); + using var img = Image.Load(curImg); // choose font size based on the image height, so that it's visible var font = _fonts.NotoSans.CreateFont(img.Height / 12.0f, FontStyle.Bold); img.Mutate(x => { // measure the size of the text to be drawing - var size = TextMeasurer.Measure(pass, new TextOptions(font) - { - Origin = new PointF(0, 0) - }); + var size = TextMeasurer.MeasureSize(pass, + new TextOptions(font) + { + Origin = new PointF(0, 0) + }); // fill the background with black, add 5 pixels on each side to make it look better x.FillPolygon(Color.ParseHex("00000080"), @@ -156,6 +161,7 @@ public class PlantPickService : IEService, IExecNoCommand x.DrawText(pass, font, Color.White, new(0, 0)); }); // return image as a stream for easy sending + var format = img.Metadata.DecodedImageFormat; return (img.ToStream(format), format.FileExtensions.FirstOrDefault() ?? "png"); } @@ -256,7 +262,8 @@ public class PlantPickService : IEService, IExecNoCommand pass = pass?.Trim().TrimTo(10, true).ToUpperInvariant(); // gets all plants in this channel with the same password - var entries = uow.Set().AsQueryable() + var entries = uow.Set() + .AsQueryable() .Where(x => x.ChannelId == ch.Id && pass == x.Password) .ToList(); // sum how much currency that is, and get all of the message ids (so that i can delete them) @@ -368,15 +375,16 @@ public class PlantPickService : IEService, IExecNoCommand string pass) { await using var uow = _db.GetDbContext(); - uow.Set().Add(new() - { - Amount = amount, - GuildId = gid, - ChannelId = cid, - Password = pass, - UserId = uid, - MessageId = mid - }); + uow.Set() + .Add(new() + { + Amount = amount, + GuildId = gid, + ChannelId = cid, + Password = pass, + UserId = uid, + MessageId = mid + }); await uow.SaveChangesAsync(); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs index a5c7465..18c294a 100644 --- a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs @@ -172,13 +172,13 @@ public partial class Gambling } var slotBg = await _images.GetSlotBgAsync(); - var bgImage = Image.Load(slotBg, out _); + var bgImage = Image.Load(slotBg); var numbers = new int[3]; result.Rolls.CopyTo(numbers, 0); Color fontColor = Config.Slots.CurrencyFontColor; - bgImage.Mutate(x => x.DrawText(new TextOptions(_fonts.DottyFont.CreateFont(65)) + bgImage.Mutate(x => x.DrawText(new RichTextOptions(_fonts.DottyFont.CreateFont(65)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -190,7 +190,7 @@ public partial class Gambling var bottomFont = _fonts.DottyFont.CreateFont(50); - bgImage.Mutate(x => x.DrawText(new TextOptions(bottomFont) + bgImage.Mutate(x => x.DrawText(new RichTextOptions(bottomFont) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index f5271d6..0ffd422 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -90,7 +90,7 @@ public class CryptoService : IEService img.Mutate(x => { - x.DrawLines(color, 2, points); + x.DrawLine(color, 2, points); }); return img; diff --git a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs b/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs index 731fc78..95aa51f 100644 --- a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs @@ -94,7 +94,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi => image.Mutate(ctx => { foreach (var data in drawData) - ctx.DrawLines(data.IsGreen + ctx.DrawLine(data.IsGreen ? _greenBrush : _redBrush, 1, @@ -128,7 +128,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi { // draw guides foreach (var y in lines) - ctx.DrawLines(_lineGuideColor, 1, new PointF(0, y), new PointF(WIDTH, y)); + ctx.DrawLine(_lineGuideColor, 1, new PointF(0, y), new PointF(WIDTH, y)); // // draw min and max price on the chart // ctx.DrawText(min.ToString(CultureInfo.InvariantCulture), @@ -156,7 +156,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi image.Mutate(ctx => { - ctx.DrawLines(_sparklineColor, 2, points); + ctx.DrawLine(_sparklineColor, 2, points); }); return Task.FromResult(new("png", image.ToStream())); @@ -177,7 +177,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi var points = GetSparklinePointsInternal(series); image.Mutate(ctx => { - ctx.DrawLines(Color.ParseHex("00FFFFAA"), 1, points); + ctx.DrawLine(Color.ParseHex("00FFFFAA"), 1, points); }); return Task.FromResult(new("png", image.ToStream())); diff --git a/src/EllieBot/Modules/Xp/XpService.cs b/src/EllieBot/Modules/Xp/XpService.cs index f32c7a5..32ba10e 100644 --- a/src/EllieBot/Modules/Xp/XpService.cs +++ b/src/EllieBot/Modules/Xp/XpService.cs @@ -994,23 +994,23 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand throw new ArgumentNullException(nameof(bgBytes)); } - var outlinePen = new Pen(Color.Black, 1f); + var outlinePen = new SolidPen(Color.Black, 1f); - using var img = Image.Load(bgBytes, out var imageFormat); + using var img = Image.Load(bgBytes); if (template.User.Name.Show) { var fontSize = (int)(template.User.Name.FontSize * 0.9); var username = stats.User.ToString(); var usernameFont = _fonts.NotoSans.CreateFont(fontSize, FontStyle.Bold); - var size = TextMeasurer.Measure($"@{username}", new(usernameFont)); + var size = TextMeasurer.MeasureSize($"@{username}", new(usernameFont)); var scale = 400f / size.Width; if (scale < 1) usernameFont = _fonts.NotoSans.CreateFont(template.User.Name.FontSize * scale, FontStyle.Bold); img.Mutate(x => { - x.DrawText(new TextOptions(usernameFont) + x.DrawText(new RichTextOptions(usernameFont) { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center, @@ -1031,7 +1031,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var clubFont = _fonts.NotoSans.CreateFont(template.Club.Name.FontSize, FontStyle.Regular); - img.Mutate(x => x.DrawText(new TextOptions(clubFont) + img.Mutate(x => x.DrawText(new RichTextOptions(clubFont) { HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Top, @@ -1051,7 +1051,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand int maxSize) { var font = fontFamily.CreateFont(fontSize, style); - var size = TextMeasurer.Measure(text, new(font)); + var size = TextMeasurer.MeasureSize(text, new(font)); var scale = maxSize / size.Width; if (scale < 1) font = fontFamily.CreateFont(fontSize * scale, style); @@ -1114,7 +1114,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.User.Xp.Global.Show) { img.Mutate(x => x.DrawText( - new TextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Global.FontSize, FontStyle.Bold)) + new RichTextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Global.FontSize, FontStyle.Bold)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -1128,7 +1128,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.User.Xp.Guild.Show) { img.Mutate(x => x.DrawText( - new TextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Guild.FontSize, FontStyle.Bold)) + new RichTextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Guild.FontSize, FontStyle.Bold)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -1152,7 +1152,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand new(awX, awY))); } - var rankPen = new Pen(Color.White, 1); + var rankPen = new SolidPen(Color.White, 1); //ranking if (template.User.GlobalRank.Show) { @@ -1166,7 +1166,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand 68); img.Mutate(x => x.DrawText( - new TextOptions(globalRankFont) + new RichTextOptions(globalRankFont) { Origin = new(template.User.GlobalRank.Pos.X, template.User.GlobalRank.Pos.Y) }, @@ -1188,7 +1188,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand 43); img.Mutate(x => x.DrawText( - new TextOptions(guildRankFont) + new RichTextOptions(guildRankFont) { Origin = new(template.User.GuildRank.Pos.X, template.User.GuildRank.Pos.Y) }, @@ -1231,7 +1231,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand } using var toDraw = Image.Load(data); - if (toDraw.Size() != new Size(template.User.Icon.Size.X, template.User.Icon.Size.Y)) + if (toDraw.Size != new Size(template.User.Icon.Size.X, template.User.Icon.Size.Y)) toDraw.Mutate(x => x.Resize(template.User.Icon.Size.X, template.User.Icon.Size.Y)); img.Mutate(x => x.DrawImage(toDraw, @@ -1257,6 +1257,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (outputSize.X != img.Width || outputSize.Y != img.Height) img.Mutate(x => x.Resize(template.OutputSize.X, template.OutputSize.Y)); + var imageFormat = img.Metadata.DecodedImageFormat; var output = ((Stream)await img.ToStreamAsync(imageFormat), imageFormat); return output; @@ -1393,7 +1394,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand } using var toDraw = Image.Load(data); - if (toDraw.Size() != new Size(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)) + if (toDraw.Size != new Size(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)) toDraw.Mutate(x => x.Resize(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)); img.Mutate(x => x.DrawImage( diff --git a/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs b/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs index 906db1e..4b2a313 100644 --- a/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs +++ b/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs @@ -7,7 +7,7 @@ namespace EllieBot.Common.JsonConverters; public class Rgba32Converter : JsonConverter { public override Rgba32 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - => Rgba32.ParseHex(reader.GetString()); + => Rgba32.ParseHex(reader.GetString()!); public override void Write(Utf8JsonWriter writer, Rgba32 value, JsonSerializerOptions options) => writer.WriteStringValue(value.ToHex()); diff --git a/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs b/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs index a0cd408..6fb4c7c 100644 --- a/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs +++ b/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs @@ -24,7 +24,7 @@ public static class Rgba32Extensions using var frame = imgArray[i].Frames.CloneFrame(frameNumber % imgArray[i].Frames.Count); var offset = xOffset; imgFrame.Mutate(x => x.DrawImage(frame, new Point(offset, 0), new GraphicsOptions())); - xOffset += imgArray[i].Bounds().Width; + xOffset += imgArray[i].Bounds.Width; } } -- 2.43.0 From b04768633c54f61fbfe4553000269c28481158ae Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 4 Sep 2024 22:33:34 +1200 Subject: [PATCH 131/253] more work on the greet cleanup --- README.md | 2 + src/EllieBot/Db/Models/GuildConfig.cs | 36 +- .../DangerousCommands/CleanupService.cs | 3 +- .../Administration/GreetBye/GreetService.cs | 469 ++++++------------ src/EllieBot/_common/Linq2DbExpressions.cs | 1 + 5 files changed, 185 insertions(+), 326 deletions(-) diff --git a/README.md b/README.md index 28fe07b..ca14f09 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # EllieBot +## ? This branch is a heavy work in progress and is not stable at all. + [![Please don't upload to GitHub](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page) ## Guides diff --git a/src/EllieBot/Db/Models/GuildConfig.cs b/src/EllieBot/Db/Models/GuildConfig.cs index a88d3c0..20f42b3 100644 --- a/src/EllieBot/Db/Models/GuildConfig.cs +++ b/src/EllieBot/Db/Models/GuildConfig.cs @@ -13,21 +13,23 @@ public class GuildConfig : DbEntity public string AutoAssignRoleIds { get; set; } - //greet stuff - public int AutoDeleteGreetMessagesTimer { get; set; } = 30; - public int AutoDeleteByeMessagesTimer { get; set; } = 30; - - public ulong GreetMessageChannelId { get; set; } - public ulong ByeMessageChannelId { get; set; } - - public bool SendDmGreetMessage { get; set; } - public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - - public bool SendChannelGreetMessage { get; set; } - public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - - public bool SendChannelByeMessage { get; set; } - public string ChannelByeMessageText { get; set; } = "%user% has left!"; + // //greet stuff + // public int AutoDeleteGreetMessagesTimer { get; set; } = 30; + // public int AutoDeleteByeMessagesTimer { get; set; } = 30; + // + // public ulong GreetMessageChannelId { get; set; } + // public ulong ByeMessageChannelId { get; set; } + // + // public bool SendDmGreetMessage { get; set; } + // public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; + // + // public bool SendChannelGreetMessage { get; set; } + // public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; + // + // public bool SendChannelByeMessage { get; set; } + // public string ChannelByeMessageText { get; set; } = "%user% has left!"; + // public bool SendBoostMessage { get; set; } + // pulic int BoostMessageDeleteAfter { get; set; } //self assignable roles public bool ExclusiveSelfAssignedRoles { get; set; } @@ -98,10 +100,6 @@ public class GuildConfig : DbEntity #region Boost Message - public bool SendBoostMessage { get; set; } - public string BoostMessage { get; set; } = "%user% just boosted this server!"; - public ulong BoostMessageChannelId { get; set; } - public int BoostMessageDeleteAfter { get; set; } public bool StickyRoles { get; set; } #endregion diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index dd269bc..ee99b49 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -72,9 +72,8 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService dontDelete = dontDeleteList.ToHashSet(); } - Log.Information("Leaving {RemainingCount} guilds every {Delay} seconds, {DontDeleteCount} will remain", + Log.Information("Leaving {RemainingCount} guilds every, 1 seconds. {DontDeleteCount} will remain", allGuildIds.Length - dontDelete.Count, - shardId, dontDelete.Count); foreach (var guildId in allGuildIds) { diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index 277c242..59fc1b7 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -1,5 +1,7 @@ +using LinqToDB; +using LinqToDB.EntityFrameworkCore; +using LinqToDB.Tools; using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; using System.Threading.Channels; namespace EllieBot.Services; @@ -11,7 +13,11 @@ public class GreetService : IEService, IReadyExecutor private readonly DbService _db; - private readonly ConcurrentDictionary _guildConfigsCache; + private ConcurrentHashSet _greetDmEnabledGuilds = new(); + private ConcurrentHashSet _boostEnabledGuilds = new(); + private ConcurrentHashSet _greetEnabledGuilds = new(); + private ConcurrentHashSet _byeEnabledGuilds = new(); + private readonly DiscordSocketClient _client; private readonly GreetGrouper _greets = new(); @@ -22,37 +28,52 @@ public class GreetService : IEService, IReadyExecutor public GreetService( DiscordSocketClient client, - IBot bot, DbService db, BotConfigService bss, IMessageSenderService sender, - IReplacementService repSvc) + IReplacementService repSvc + ) { _db = db; _client = client; _bss = bss; _repSvc = repSvc; _sender = sender; - - _guildConfigsCache = new(bot.AllGuildConfigs.ToDictionary(g => g.GuildId, GreetSettings.Create)); - - _client.UserJoined += OnUserJoined; - _client.UserLeft += OnUserLeft; - - bot.JoinedGuild += OnBotJoinedGuild; - _client.LeftGuild += OnClientLeftGuild; - - _client.GuildMemberUpdated += ClientOnGuildMemberUpdated; } public async Task OnReadyAsync() { - while (true) + // cache all enabled guilds + await using (var uow = _db.GetDbContext()) + { + var guilds = _client.Guilds.Select(x => x.Id).ToList(); + var enabled = await uow.GetTable() + .Where(x => x.GuildId.In(guilds)) + .Where(x => x.SendChannelGreetMessage + || x.SendBoostMessage + || x.SendChannelByeMessage + || x.SendDmGreetMessage) + .ToListAsync(); + + _boostEnabledGuilds = new(enabled.Where(x => x.SendBoostMessage).Select(x => x.GuildId)); + _byeEnabledGuilds = new(enabled.Where(x => x.SendChannelByeMessage).Select(x => x.GuildId)); + _greetDmEnabledGuilds = new(enabled.Where(x => x.SendDmGreetMessage).Select(x => x.GuildId)); + _greetEnabledGuilds = new(enabled.Where(x => x.SendChannelGreetMessage).Select(x => x.GuildId)); + } + + _client.UserJoined += OnUserJoined; + _client.UserLeft += OnUserLeft; + + _client.LeftGuild += OnClientLeftGuild; + + _client.GuildMemberUpdated += ClientOnGuildMemberUpdated; + + var timer = new PeriodicTimer(TimeSpan.FromSeconds(2)); + while (await timer.WaitForNextTickAsync()) { var (conf, user, compl) = await _greetDmQueue.Reader.ReadAsync(); var res = await GreetDmUserInternal(conf, user); compl.TrySetResult(res); - await Task.Delay(2000); } } @@ -65,25 +86,28 @@ public class GreetService : IEService, IReadyExecutor && newUser.PremiumSince is { } newDate && newDate > oldDate)) { - var conf = GetOrAddSettingsForGuild(newUser.Guild.Id); - if (!conf.SendBoostMessage) - return Task.CompletedTask; + _ = Task.Run(async () => + { + var conf = await GetGreetSettingsAsync(newUser.Guild.Id); - _ = Task.Run(TriggerBoostMessage(conf, newUser)); + if (conf is null || !conf.SendBoostMessage) + return; + + await TriggerBoostMessage(conf, newUser); + }); } return Task.CompletedTask; } - private Func TriggerBoostMessage(GreetSettings conf, SocketGuildUser user) - => async () => - { - var channel = user.Guild.GetTextChannel(conf.BoostMessageChannelId); - if (channel is null) - return; + private async Task TriggerBoostMessage(GreetSettings conf, SocketGuildUser user) + { + var channel = user.Guild.GetTextChannel(conf.BoostMessageChannelId); + if (channel is null) + return; - await SendBoostMessage(conf, user, channel); - }; + await SendBoostMessage(conf, user, channel); + } private async Task SendBoostMessage(GreetSettings conf, IGuildUser user, ITextChannel channel) { @@ -110,16 +134,17 @@ public class GreetService : IEService, IReadyExecutor return false; } - private Task OnClientLeftGuild(SocketGuild arg) + private async Task OnClientLeftGuild(SocketGuild arg) { - _guildConfigsCache.TryRemove(arg.Id, out _); - return Task.CompletedTask; - } + _boostEnabledGuilds.TryRemove(arg.Id); + _byeEnabledGuilds.TryRemove(arg.Id); + _greetDmEnabledGuilds.TryRemove(arg.Id); + _greetEnabledGuilds.TryRemove(arg.Id); - private Task OnBotJoinedGuild(GuildConfig gc) - { - _guildConfigsCache[gc.GuildId] = GreetSettings.Create(gc); - return Task.CompletedTask; + await using var uow = _db.GetDbContext(); + await uow.GetTable() + .Where(x => x.GuildId == arg.Id) + .DeleteAsync(); } private Task OnUserLeft(SocketGuild guild, SocketUser user) @@ -128,10 +153,11 @@ public class GreetService : IEService, IReadyExecutor { try { - var conf = GetOrAddSettingsForGuild(guild.Id); + var conf = await GetGreetSettingsAsync(guild.Id); - if (!conf.SendChannelByeMessage) + if (conf is null) return; + var channel = guild.TextChannels.FirstOrDefault(c => c.Id == conf.ByeMessageChannelId); if (channel is null) //maybe warn the server owner that the channel is missing @@ -156,7 +182,9 @@ public class GreetService : IEService, IReadyExecutor } } else + { await ByeUsers(conf, channel, new[] { user }); + } } catch { @@ -166,31 +194,14 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } - public string? GetDmGreetMsg(ulong id) + public async Task GetGreetSettingsAsync(ulong gid, GreetType type) { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(id, set => set).DmGreetMessageText; - } + await using var uow = _db.GetDbContext(); + var res = await uow.GetTable() + .Where(x => x.GuildId == gid && x.GreetType == type) + .FirstOrDefaultAsync(); - public string? GetGreetMsg(ulong gid) - { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(gid, set => set).ChannelGreetMessageText; - } - - public string? GetBoostMessage(ulong gid) - { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(gid, set => set).BoostMessage; - } - - public GreetSettings GetGreetSettings(ulong gid) - { - if (_guildConfigsCache.TryGetValue(gid, out var gs)) - return gs; - - using var uow = _db.GetDbContext(); - return GreetSettings.Create(uow.GuildConfigsForId(gid, set => set)); + return res; } private Task ByeUsers(GreetSettings conf, ITextChannel channel, IUser user) @@ -221,7 +232,7 @@ public class GreetService : IEService, IReadyExecutor Log.Warning(ex, "Missing permissions to send a bye message, the bye message will be disabled on server: {GuildId}", channel.GuildId); - await SetBye(channel.GuildId, channel.Id, false); + await SetGreet(channel.GuildId, channel.Id, GreetType.Bye, false); } catch (Exception ex) { @@ -250,14 +261,14 @@ public class GreetService : IEService, IReadyExecutor if (conf.AutoDeleteGreetMessagesTimer > 0) toDelete.DeleteAfter(conf.AutoDeleteGreetMessagesTimer); } - catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions - || ex.DiscordCode == DiscordErrorCode.MissingPermissions - || ex.DiscordCode == DiscordErrorCode.UnknownChannel) + catch (HttpException ex) when (ex.DiscordCode is DiscordErrorCode.InsufficientPermissions + or DiscordErrorCode.MissingPermissions + or DiscordErrorCode.UnknownChannel) { Log.Warning(ex, "Missing permissions to send a bye message, the greet message will be disabled on server: {GuildId}", channel.GuildId); - await SetGreet(channel.GuildId, channel.Id, false); + await SetGreet(channel.GuildId, channel.Id, GreetType.Greet, false); } catch (Exception ex) { @@ -285,11 +296,6 @@ public class GreetService : IEService, IReadyExecutor { try { - // var rep = new ReplacementBuilder() - // .WithUser(user) - // .WithServer(_client, (SocketGuild)user.Guild) - // .Build(); - var repCtx = new ReplacementContext(client: _client, guild: user.Guild, users: user); var smartText = SmartText.CreateFrom(conf.DmGreetMessageText); smartText = await _repSvc.ReplaceAsync(smartText, repCtx); @@ -341,9 +347,9 @@ public class GreetService : IEService, IReadyExecutor { // if there is less than 10 embeds, add an embed with footer only seta.Embeds = seta.Embeds.Append(new SmartEmbedArrayElementText() - { - Footer = CreateFooterSource(user) - }) + { + Footer = CreateFooterSource(user) + }) .ToArray(); } } @@ -372,7 +378,9 @@ public class GreetService : IEService, IReadyExecutor { try { - var conf = GetOrAddSettingsForGuild(user.GuildId); + var conf = await GetGreetSettingsAsync(user.GuildId); + if (conf is null) + return; if (conf.SendChannelGreetMessage) { @@ -413,256 +421,107 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } - public string? GetByeMessage(ulong gid) - { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(gid, set => set).ChannelByeMessageText; - } + // public GreetSettings GetOrAddSettingsForGuild(ulong guildId) + // { + // if (_greetDmEnabledGuilds.TryGetValue(guildId, out var settings)) + // return settings; + // + // using (var uow = _db.GetDbContext()) + // { + // var gc = uow.GuildConfigsForId(guildId, set => set); + // settings = GreetSettings.Create(gc); + // } + // + // _greetDmEnabledGuilds.TryAdd(guildId, settings); + // return settings; + // } - public GreetSettings GetOrAddSettingsForGuild(ulong guildId) - { - if (_guildConfigsCache.TryGetValue(guildId, out var settings)) - return settings; - - using (var uow = _db.GetDbContext()) - { - var gc = uow.GuildConfigsForId(guildId, set => set); - settings = GreetSettings.Create(gc); - } - - _guildConfigsCache.TryAdd(guildId, settings); - return settings; - } - - public async Task SetGreet(ulong guildId, ulong channelId, bool? value = null) + public async Task SetGreet( + ulong guildId, + ulong? channelId, + GreetType greetType, + bool? value = null) { await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - var enabled = conf.SendChannelGreetMessage = value ?? !conf.SendChannelGreetMessage; - conf.GreetMessageChannelId = channelId; + var q = uow.GetTable(); - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; + if (value is { } v) + { + await q + .InsertOrUpdateAsync(() => new() + { + IsEnabled = v, + ChannelId = channelId, + }, + (old) => new() + { + IsEnabled = v, + ChannelId = channelId, + }, + () => new() + { + GuildId = guildId, + GreetType = greetType, + }); + } + else + { + await q + .Where(x => x.GuildId == guildId && x.GreetType == greetType) + .UpdateAsync((old) => new() + { + IsEnabled = !old.IsEnabled + }); + } - await uow.SaveChangesAsync(); - return enabled; + return true; } - public bool SetGreetMessage(ulong guildId, ref string message) + public async Task SetGreetTypeMessage(ulong guildId, GreetType greetType, string message) { message = message.SanitizeMentions(); if (string.IsNullOrWhiteSpace(message)) throw new ArgumentNullException(nameof(message)); - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.ChannelGreetMessageText = message; - var greetMsgEnabled = conf.SendChannelGreetMessage; + await using (var uow = _db.GetDbContext()) + { + await uow.GetTable() + .InsertOrUpdateAsync(() => new() + { + MessageText = message + }, + x => new() + { + MessageText = message + }, + () => new() + { + GuildId = guildId, + GreetType = greetType + }); + } - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache.AddOrUpdate(guildId, toAdd, (_, _) => toAdd); + var conf = await GetGreetSettingsAsync(guildId, type); - uow.SaveChanges(); - return greetMsgEnabled; + return conf?.IsEnabled ?? false; } - public async Task SetGreetDm(ulong guildId, bool? value = null) + public async Task Test( + ulong guildId, + GreetType type, + IMessageChannel channel, + IGuildUser user) { - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - var enabled = conf.SendDmGreetMessage = value ?? !conf.SendDmGreetMessage; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - await uow.SaveChangesAsync(); - return enabled; + var conf = await GetGreetSettingsAsync(guildId, type); + return SendMessage(conf, user, channel); } - public bool SetGreetDmMessage(ulong guildId, ref string? message) + public async Task SendMessage(GreetSettings conf, IMessageChannel channel, IGuildUser user) { - message = message?.SanitizeMentions(); - - if (string.IsNullOrWhiteSpace(message)) - throw new ArgumentNullException(nameof(message)); - - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.DmGreetMessageText = message; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - uow.SaveChanges(); - return conf.SendDmGreetMessage; + if (conf.GreetType == GreetType.GreetDm) + { + await GreetDmUser(conf, user); + } } - - public async Task SetBye(ulong guildId, ulong channelId, bool? value = null) - { - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - var enabled = conf.SendChannelByeMessage = value ?? !conf.SendChannelByeMessage; - conf.ByeMessageChannelId = channelId; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - await uow.SaveChangesAsync(); - return enabled; - } - - public bool SetByeMessage(ulong guildId, ref string? message) - { - message = message?.SanitizeMentions(); - - if (string.IsNullOrWhiteSpace(message)) - throw new ArgumentNullException(nameof(message)); - - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.ChannelByeMessageText = message; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - uow.SaveChanges(); - return conf.SendChannelByeMessage; - } - - public async Task SetByeDel(ulong guildId, int timer) - { - if (timer is < 0 or > 600) - return; - - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.AutoDeleteByeMessagesTimer = timer; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - await uow.SaveChangesAsync(); - } - - public async Task SetGreetDel(ulong guildId, int timer) - { - if (timer is < 0 or > 600) - return; - - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.AutoDeleteGreetMessagesTimer = timer; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - await uow.SaveChangesAsync(); - } - - public bool SetBoostMessage(ulong guildId, ref string message) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.BoostMessage = message; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - uow.SaveChanges(); - return conf.SendBoostMessage; - } - - public async Task SetBoostDel(ulong guildId, int timer) - { - if (timer is < 0 or > 600) - throw new ArgumentOutOfRangeException(nameof(timer)); - - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - conf.BoostMessageDeleteAfter = timer; - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - - await uow.SaveChangesAsync(); - } - - public async Task ToggleBoost(ulong guildId, ulong channelId, bool? forceState = null) - { - await using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - - if (forceState is not bool fs) - conf.SendBoostMessage = !conf.SendBoostMessage; - else - conf.SendBoostMessage = fs; - - conf.BoostMessageChannelId = channelId; - await uow.SaveChangesAsync(); - - var toAdd = GreetSettings.Create(conf); - _guildConfigsCache[guildId] = toAdd; - return conf.SendBoostMessage; - } - - #region Get Enabled Status - - public bool GetGreetDmEnabled(ulong guildId) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - return conf.SendDmGreetMessage; - } - - public bool GetGreetEnabled(ulong guildId) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - return conf.SendChannelGreetMessage; - } - - public bool GetByeEnabled(ulong guildId) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - return conf.SendChannelByeMessage; - } - - public bool GetBoostEnabled(ulong guildId) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - return conf.SendBoostMessage; - } - - #endregion - - #region Test Messages - - public Task ByeTest(ITextChannel channel, IGuildUser user) - { - var conf = GetOrAddSettingsForGuild(user.GuildId); - return ByeUsers(conf, channel, user); - } - - public Task GreetTest(ITextChannel channel, IGuildUser user) - { - var conf = GetOrAddSettingsForGuild(user.GuildId); - return GreetUsers(conf, channel, user); - } - - public Task GreetDmTest(IGuildUser user) - { - var conf = GetOrAddSettingsForGuild(user.GuildId); - return GreetDmUser(conf, user); - } - - public Task BoostTest(ITextChannel channel, IGuildUser user) - { - var conf = GetOrAddSettingsForGuild(user.GuildId); - return SendBoostMessage(conf, user, channel); - } - - #endregion } \ No newline at end of file diff --git a/src/EllieBot/_common/Linq2DbExpressions.cs b/src/EllieBot/_common/Linq2DbExpressions.cs index 53c90e6..5a1e145 100644 --- a/src/EllieBot/_common/Linq2DbExpressions.cs +++ b/src/EllieBot/_common/Linq2DbExpressions.cs @@ -1,5 +1,6 @@ #nullable disable using LinqToDB; +using LinqToDB.EntityFrameworkCore; using System.Linq.Expressions; namespace EllieBot.Common; -- 2.43.0 From d58f1393ec996498186c1cbf524171d5d1d567b8 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 6 Sep 2024 17:11:01 +1200 Subject: [PATCH 132/253] Fixed voice and text channel counting Updated changelog --- CHANGELOG.md | 5 ++ .../_common/Services/Impl/StatsService.cs | 70 +++++++------------ 2 files changed, 32 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8a8b01..73e815f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Added +- Added `.leaveunkeptservers` which will make the bot leave all servers on all shards whose owners didn't run `.keep` command. + - This is a dangerous and irreversible command, don't use it. Meant for use on the public bot. + ### Changed - `.quote` commands cleaned up and improved @@ -21,6 +24,8 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - Fixed `.xpcurrew` breaking xp gain if user gains 0 xp from being in a voice channel - Fixed a bug in `.gatari` command +- Fixed some waifu related strings +- Fixed `.quoteshow` and `.quoteid` commands ## [5.1.7] - 09.08.2024 diff --git a/src/EllieBot/_common/Services/Impl/StatsService.cs b/src/EllieBot/_common/Services/Impl/StatsService.cs index ef7ea80..2c91a67 100644 --- a/src/EllieBot/_common/Services/Impl/StatsService.cs +++ b/src/EllieBot/_common/Services/Impl/StatsService.cs @@ -55,76 +55,60 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService _client.ChannelCreated += c => { - _ = Task.Run(() => - { - if (c is ITextChannel) - Interlocked.Increment(ref textChannels); - else if (c is IVoiceChannel) - Interlocked.Increment(ref voiceChannels); - }); + if (c is IVoiceChannel) + Interlocked.Increment(ref voiceChannels); + else if (c is ITextChannel) + Interlocked.Increment(ref textChannels); return Task.CompletedTask; }; _client.ChannelDestroyed += c => { - _ = Task.Run(() => - { - if (c is ITextChannel) - Interlocked.Decrement(ref textChannels); - else if (c is IVoiceChannel) - Interlocked.Decrement(ref voiceChannels); - }); + if (c is IVoiceChannel) + Interlocked.Decrement(ref voiceChannels); + else if (c is ITextChannel) + Interlocked.Decrement(ref textChannels); return Task.CompletedTask; }; _client.GuildAvailable += g => { - _ = Task.Run(() => - { - var tc = g.Channels.Count(cx => cx is ITextChannel); - var vc = g.Channels.Count - tc; - Interlocked.Add(ref textChannels, tc); - Interlocked.Add(ref voiceChannels, vc); - }); + var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); + var vc = g.Channels.Count(cx => cx is IVoiceChannel); + Interlocked.Add(ref textChannels, tc); + Interlocked.Add(ref voiceChannels, vc); + return Task.CompletedTask; }; _client.JoinedGuild += g => { - _ = Task.Run(() => - { - var tc = g.Channels.Count(cx => cx is ITextChannel); - var vc = g.Channels.Count - tc; - Interlocked.Add(ref textChannels, tc); - Interlocked.Add(ref voiceChannels, vc); - }); + var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); + var vc = g.Channels.Count(cx => cx is IVoiceChannel); + Interlocked.Add(ref textChannels, tc); + Interlocked.Add(ref voiceChannels, vc); + return Task.CompletedTask; }; _client.GuildUnavailable += g => { - _ = Task.Run(() => - { - var tc = g.Channels.Count(cx => cx is ITextChannel); - var vc = g.Channels.Count - tc; - Interlocked.Add(ref textChannels, -tc); - Interlocked.Add(ref voiceChannels, -vc); - }); + var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); + var vc = g.Channels.Count(cx => cx is IVoiceChannel); + Interlocked.Add(ref textChannels, -tc); + Interlocked.Add(ref voiceChannels, -vc); return Task.CompletedTask; }; _client.LeftGuild += g => { - _ = Task.Run(() => - { - var tc = g.Channels.Count(cx => cx is ITextChannel); - var vc = g.Channels.Count - tc; - Interlocked.Add(ref textChannels, -tc); - Interlocked.Add(ref voiceChannels, -vc); - }); + var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); + var vc = g.Channels.Count(cx => cx is IVoiceChannel); + Interlocked.Add(ref textChannels, -tc); + Interlocked.Add(ref voiceChannels, -vc); return Task.CompletedTask; }; @@ -133,7 +117,7 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService private void InitializeChannelCount() { var guilds = _client.Guilds; - textChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is ITextChannel)); + textChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is ITextChannel and not IVoiceChannel)); voiceChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is IVoiceChannel)); } -- 2.43.0 From 31ed61075e6aaafc9b0a6fa7a590c9d8b5a6b8f3 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 9 Sep 2024 13:24:23 +1200 Subject: [PATCH 133/253] Some packages updated, and small cleanup --- ellie-menu.ps1 | 191 ++++++++++++++++++ src/EllieBot/Bot.cs | 4 +- .../Db/Extensions/GuildConfigExtensions.cs | 12 +- src/EllieBot/EllieBot.csproj | 4 +- 4 files changed, 203 insertions(+), 8 deletions(-) create mode 100644 ellie-menu.ps1 diff --git a/ellie-menu.ps1 b/ellie-menu.ps1 new file mode 100644 index 0000000..59e869b --- /dev/null +++ b/ellie-menu.ps1 @@ -0,0 +1,191 @@ +param ( + [switch]$testing, + [switch]$release, + [switch]$output_test, + [switch]$build, + [switch]$help +) + +$script_version = "1.0.0-public" + +Write-Output "" +Write-Host "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" -ForegroundColor DarkCyan +Write-Host "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" -ForegroundColor DarkCyan +Write-Host "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " -ForegroundColor DarkCyan +Write-Host "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " -ForegroundColor DarkCyan +Write-Host "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " -ForegroundColor DarkCyan +Write-Host "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " -ForegroundColor DarkCyan +Write-Output "" +# If you remove this copyright header I will bonk +Write-Output "Copyright © 2024 Toastie_t0ast & EllieBotDevs" +Write-Output "" +Write-Host "Current script version is v$script_version" -ForegroundColor DarkCyan +Write-Output "" + +if ($release) { + if ($args.Length -eq 0) { + Write-Host "Please provide a version string." -ForegroundColor Red + + Write-Output "" + Write-Host "Script failed." -ForegroundColor Red + Write-Host "Please read the Error above for more information" -ForegroundColor Gray + Write-Output "" + } + else { + $version = $args[0] + Write-Output "" + Write-Host "Publishing EllieBot v$version" -Foregroundcolor Green + Write-Output "" + + Write-Output "" + dotnet publish -c Release -r linux-x64 --self-contained -o elliebot-linux-x64 src/EllieBot/EllieBot.csproj + Write-Output "" + dotnet publish -c Release -r linux-arm64 --self-contained -o elliebot-linux-arm64 src/EllieBot/EllieBot.csproj + Write-Output "" + dotnet publish -c Release -r win-x64 --self-contained -o elliebot-windows-x64 src/EllieBot/EllieBot.csproj + Write-Output "" + dotnet publish -c Release -r win-arm64 --self-contained -o elliebot-windows-arm64 src/EllieBot/EllieBot.csproj + Write-Output "" + dotnet publish -c Release -r osx-x64 --self-contained -o elliebot-osx-x64 src/EllieBot/EllieBot.csproj + Write-Output "" + dotnet publish -c Release -r osx-arm64 --self-contained -o elliebot-osx-arm64 src/EllieBot/EllieBot.csproj + + Write-Output "" + Write-Output "Preparing the Windows installer build." + Write-Output "" + + dotnet clean + dotnet restore -f --no-cache -v n + dotnet publish -c Release --self-contained --runtime win-x64 /p:Version="$version" src/EllieBot + + Write-Output "" + Write-Output "Setting environemt variable" + Write-Output "" + + $env:ELLIEBOT_INSTALL_VERSION = $version + + Write-Output "" + Write-Output "Compiling installer file" + Write-Output "" + + iscc.exe /O+ .\exe_builder.iss + + Write-Output "" + Write-Output "Compressing windows build files" + Write-Output "" + + Compress-Archive -Path elliebot-windows-x64/ "$version-windows-x64-build.zip" + Compress-Archive -Path elliebot-windows-arm64/ "$version-windows-arm64-build.zip" + + Write-Output "" + Write-Output "Moving the installer file to the directory this script is in" + Write-Output "" + + Move-Item ellie-installers/$version/ellie-setup-$version.exe ellie-setup-$version.exe + + Write-Output "" + Write-Output "Script finished successfully" + Write-Output "" + Write-Output "If you wish to build the linux or MacOS builds please run" + Write-Output "package.sh in wsl if you are on Windows or in bash (or whatever terminal you use) on linux" + Write-Output "" + Write-Output "If you have any suggestions on how to make this script better please make a suggestion" + Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" + Write-Output "" + } +} + +if ($testing) { + if ($args.Length -eq 0) { + Write-Host "Please provide a version string." -ForegroundColor Red + + Write-Output "" + Write-Host "Script failed." -ForegroundColor Red + Write-Host "Please read the Error above for more information" -ForegroundColor Gray + Write-Output "" + } + else { + $version = $args[0] + Write-Output "" + Write-Output "Running tests for EllieBot v$version" + Write-Output "" + dotnet test + + Write-Output "" + Write-Output "Script finished successfully" + Write-Output "" + Write-Output "If you have any suggestions on how to make this script better please make a suggestion" + Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" + Write-Output "" + } +} + +if ($output_test) { + + Write-Output "" + Write-Output "Compiling a test build of EllieBot" + Write-Output "" + dotnet publish -c Release -o output/ src/EllieBot/ + + Write-Output "" + Write-Output "copying creds_example.yml to creds.yml" + Write-Output "" + Set-Location output + + Copy-Item creds_example.yml creds.yml + + Set-Location .. + + Write-Output "" + Write-Output "Script finished successfully" + Write-Output "" + Write-Output "If you have any suggestions on how to make this script better please make a suggestion" + Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" + Write-Output "" +} + +if ($build) { + + Write-Output "" + Write-Output "Restoring EllieBot" + Write-Output "" + dotnet restore + + Write-Output "" + Write-Output "Building EllieBot" + Write-Output "" + dotnet build --no-restore -c Release + + Write-Output "" + Write-Output "Script finished successfully" + Write-Output "" + Write-Output "If you have any suggestions on how to make this script better please make a suggestion" + Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" + Write-Output "" +} + +if ($help) { + Write-Output "" + Write-Output "Here is a list of switches for this script." + Write-Output "" + + Write-Host "Release parameter" -ForegroundColor Green + Write-Output "-release" + Write-Output "" + + Write-Host "Testing parameter" -ForegroundColor Blue + Write-Output "-testing" + Write-Output "" + + Write-Host "Output test parameter" -ForegroundColor Yellow + Write-Output "-output_test" + Write-Output "" + + Write-Host "Build parameter" -ForegroundColor DarkCyan + Write-Output "-build" + Write-Output "" + + Write-Host "Here is an example" -ForegroundColor Gray + Write-Host "build.ps1 -build" -ForegroundColor Gray + Write-Output "" +} \ No newline at end of file diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index 3ea8ffa..a549e65 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -88,7 +88,7 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() - => Client.Guilds.Select(x => x.Id).ToList().ToList(); + => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); private void AddServices() { @@ -99,7 +99,7 @@ public sealed class Bot : IBot using (var uow = _db.GetDbContext()) { uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); - AllGuildConfigs = uow.Set().GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); + AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); } // var svcs = new StandardKernel(new NinjectSettings() diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index 842fe4e..1c5a27d 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -47,14 +47,18 @@ public static class GuildConfigExtensions .Include(gc => gc.CommandCooldowns) .Include(gc => gc.FollowedStreams) .Include(gc => gc.StreamRole) + .Include(gc => gc.DelMsgOnCmdChannels) .Include(gc => gc.XpSettings) - .ThenInclude(x => x.ExclusionList) - .Include(gc => gc.DelMsgOnCmdChannels); + .ThenInclude(x => x.ExclusionList); - public static IEnumerable GetAllGuildConfigs( + public static IReadOnlyCollection GetAllGuildConfigs( this DbSet configs, IReadOnlyList availableGuilds) - => configs.IncludeEverything().AsNoTracking().Where(x => availableGuilds.Contains(x.GuildId)).ToList(); + => configs.IncludeEverything() + .AsNoTracking() + .Where(x => availableGuilds.Contains(x.GuildId)) + .ToList() + .AsReadOnly(); /// /// Gets and creates if it doesn't exist a config for a guild. diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index b67381c..3b250e8 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -81,7 +81,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -89,7 +89,7 @@ - + -- 2.43.0 From f15d1d2495b520ae268be347d116c123d07d8411 Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 9 Sep 2024 13:29:19 +1200 Subject: [PATCH 134/253] Removed a file that was not meant to be pushed in the last commit --- .gitignore | 3 - ellie-menu.ps1 | 191 ------------------------------------------------- 2 files changed, 194 deletions(-) delete mode 100644 ellie-menu.ps1 diff --git a/.gitignore b/.gitignore index 8330cb8..3b99327 100644 --- a/.gitignore +++ b/.gitignore @@ -20,9 +20,6 @@ src/EllieBot/credentials.json src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db -build.ps1 -build.sh -test.ps1 # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/ellie-menu.ps1 b/ellie-menu.ps1 deleted file mode 100644 index 59e869b..0000000 --- a/ellie-menu.ps1 +++ /dev/null @@ -1,191 +0,0 @@ -param ( - [switch]$testing, - [switch]$release, - [switch]$output_test, - [switch]$build, - [switch]$help -) - -$script_version = "1.0.0-public" - -Write-Output "" -Write-Host "███████╗██╗ ██╗ ██╗███████╗██████╗ ██████╗ ████████╗" -ForegroundColor DarkCyan -Write-Host "██╔════╝██║ ██║ ██║██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝" -ForegroundColor DarkCyan -Write-Host "█████╗ ██║ ██║ ██║█████╗ ██████╔╝██║ ██║ ██║ " -ForegroundColor DarkCyan -Write-Host "██╔══╝ ██║ ██║ ██║██╔══╝ ██╔══██╗██║ ██║ ██║ " -ForegroundColor DarkCyan -Write-Host "███████╗███████╗███████╗██║███████╗██████╔╝╚██████╔╝ ██║ " -ForegroundColor DarkCyan -Write-Host "╚══════╝╚══════╝╚══════╝╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ " -ForegroundColor DarkCyan -Write-Output "" -# If you remove this copyright header I will bonk -Write-Output "Copyright © 2024 Toastie_t0ast & EllieBotDevs" -Write-Output "" -Write-Host "Current script version is v$script_version" -ForegroundColor DarkCyan -Write-Output "" - -if ($release) { - if ($args.Length -eq 0) { - Write-Host "Please provide a version string." -ForegroundColor Red - - Write-Output "" - Write-Host "Script failed." -ForegroundColor Red - Write-Host "Please read the Error above for more information" -ForegroundColor Gray - Write-Output "" - } - else { - $version = $args[0] - Write-Output "" - Write-Host "Publishing EllieBot v$version" -Foregroundcolor Green - Write-Output "" - - Write-Output "" - dotnet publish -c Release -r linux-x64 --self-contained -o elliebot-linux-x64 src/EllieBot/EllieBot.csproj - Write-Output "" - dotnet publish -c Release -r linux-arm64 --self-contained -o elliebot-linux-arm64 src/EllieBot/EllieBot.csproj - Write-Output "" - dotnet publish -c Release -r win-x64 --self-contained -o elliebot-windows-x64 src/EllieBot/EllieBot.csproj - Write-Output "" - dotnet publish -c Release -r win-arm64 --self-contained -o elliebot-windows-arm64 src/EllieBot/EllieBot.csproj - Write-Output "" - dotnet publish -c Release -r osx-x64 --self-contained -o elliebot-osx-x64 src/EllieBot/EllieBot.csproj - Write-Output "" - dotnet publish -c Release -r osx-arm64 --self-contained -o elliebot-osx-arm64 src/EllieBot/EllieBot.csproj - - Write-Output "" - Write-Output "Preparing the Windows installer build." - Write-Output "" - - dotnet clean - dotnet restore -f --no-cache -v n - dotnet publish -c Release --self-contained --runtime win-x64 /p:Version="$version" src/EllieBot - - Write-Output "" - Write-Output "Setting environemt variable" - Write-Output "" - - $env:ELLIEBOT_INSTALL_VERSION = $version - - Write-Output "" - Write-Output "Compiling installer file" - Write-Output "" - - iscc.exe /O+ .\exe_builder.iss - - Write-Output "" - Write-Output "Compressing windows build files" - Write-Output "" - - Compress-Archive -Path elliebot-windows-x64/ "$version-windows-x64-build.zip" - Compress-Archive -Path elliebot-windows-arm64/ "$version-windows-arm64-build.zip" - - Write-Output "" - Write-Output "Moving the installer file to the directory this script is in" - Write-Output "" - - Move-Item ellie-installers/$version/ellie-setup-$version.exe ellie-setup-$version.exe - - Write-Output "" - Write-Output "Script finished successfully" - Write-Output "" - Write-Output "If you wish to build the linux or MacOS builds please run" - Write-Output "package.sh in wsl if you are on Windows or in bash (or whatever terminal you use) on linux" - Write-Output "" - Write-Output "If you have any suggestions on how to make this script better please make a suggestion" - Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" - Write-Output "" - } -} - -if ($testing) { - if ($args.Length -eq 0) { - Write-Host "Please provide a version string." -ForegroundColor Red - - Write-Output "" - Write-Host "Script failed." -ForegroundColor Red - Write-Host "Please read the Error above for more information" -ForegroundColor Gray - Write-Output "" - } - else { - $version = $args[0] - Write-Output "" - Write-Output "Running tests for EllieBot v$version" - Write-Output "" - dotnet test - - Write-Output "" - Write-Output "Script finished successfully" - Write-Output "" - Write-Output "If you have any suggestions on how to make this script better please make a suggestion" - Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" - Write-Output "" - } -} - -if ($output_test) { - - Write-Output "" - Write-Output "Compiling a test build of EllieBot" - Write-Output "" - dotnet publish -c Release -o output/ src/EllieBot/ - - Write-Output "" - Write-Output "copying creds_example.yml to creds.yml" - Write-Output "" - Set-Location output - - Copy-Item creds_example.yml creds.yml - - Set-Location .. - - Write-Output "" - Write-Output "Script finished successfully" - Write-Output "" - Write-Output "If you have any suggestions on how to make this script better please make a suggestion" - Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" - Write-Output "" -} - -if ($build) { - - Write-Output "" - Write-Output "Restoring EllieBot" - Write-Output "" - dotnet restore - - Write-Output "" - Write-Output "Building EllieBot" - Write-Output "" - dotnet build --no-restore -c Release - - Write-Output "" - Write-Output "Script finished successfully" - Write-Output "" - Write-Output "If you have any suggestions on how to make this script better please make a suggestion" - Write-Output "in our discord @ https://discord.gg/etQdZxSyEH and in the 📚・suggestions channel" - Write-Output "" -} - -if ($help) { - Write-Output "" - Write-Output "Here is a list of switches for this script." - Write-Output "" - - Write-Host "Release parameter" -ForegroundColor Green - Write-Output "-release" - Write-Output "" - - Write-Host "Testing parameter" -ForegroundColor Blue - Write-Output "-testing" - Write-Output "" - - Write-Host "Output test parameter" -ForegroundColor Yellow - Write-Output "-output_test" - Write-Output "" - - Write-Host "Build parameter" -ForegroundColor DarkCyan - Write-Output "-build" - Write-Output "" - - Write-Host "Here is an example" -ForegroundColor Gray - Write-Host "build.ps1 -build" -ForegroundColor Gray - Write-Output "" -} \ No newline at end of file -- 2.43.0 From 140a35b82a7d8aababd7dca153e7c641097d1b4c Mon Sep 17 00:00:00 2001 From: Toastie Date: Mon, 9 Sep 2024 14:04:08 +1200 Subject: [PATCH 135/253] some more cleanup/attempts to fix a weird mysql error Also updated .gitignore to ignore ellie-menu.ps1 and updated the script link in EllieBot.sln --- .gitignore | 1 + EllieBot.sln | 2 +- src/EllieBot/Bot.cs | 8 ++++---- src/EllieBot/Db/Extensions/GuildConfigExtensions.cs | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 3b99327..1ff8b34 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ src/EllieBot/credentials.json src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db +ellie-menu.ps1 # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/EllieBot.sln b/EllieBot.sln index 267f7b4..306d678 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -7,9 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B28FB883-968 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C633450-E6C2-47ED-A7AA-7367232F703A}" ProjectSection(SolutionItems) = preProject - build.ps1 = build.ps1 CHANGELOG.md = CHANGELOG.md Dockerfile = Dockerfile + ellie-menu.ps1 = ellie-menu.ps1 LICENSE = LICENSE migrate.ps1 = migrate.ps1 README.md = README.md diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index a549e65..8231479 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -90,16 +90,16 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - private void AddServices() + private async Task AddServices() { var startingGuildIdList = GetCurrentGuildIds(); var startTime = Stopwatch.GetTimestamp(); var bot = Client.CurrentUser; - using (var uow = _db.GetDbContext()) + await using (var uow = _db.GetDbContext()) { uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); - AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); + AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); } // var svcs = new StandardKernel(new NinjectSettings() @@ -265,7 +265,7 @@ public sealed class Bot : IBot Log.Information("Shard {ShardId} loading services...", Client.ShardId); try { - AddServices(); + await AddServices(); } catch (Exception ex) { diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index 1c5a27d..d1471ad 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using LinqToDB.EntityFrameworkCore; using EllieBot.Db.Models; namespace EllieBot.Db; @@ -42,7 +43,7 @@ public static class GuildConfigExtensions } private static IQueryable IncludeEverything(this DbSet configs) - => configs.AsQueryable() + => configs .AsSplitQuery() .Include(gc => gc.CommandCooldowns) .Include(gc => gc.FollowedStreams) @@ -51,14 +52,13 @@ public static class GuildConfigExtensions .Include(gc => gc.XpSettings) .ThenInclude(x => x.ExclusionList); - public static IReadOnlyCollection GetAllGuildConfigs( + public static Task GetAllGuildConfigs( this DbSet configs, IReadOnlyList availableGuilds) => configs.IncludeEverything() .AsNoTracking() .Where(x => availableGuilds.Contains(x.GuildId)) - .ToList() - .AsReadOnly(); + .ToArrayAsyncEF(); /// /// Gets and creates if it doesn't exist a config for a guild. -- 2.43.0 From 78366ab7e4842b1dc106229d873bce92aa4d6031 Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 11 Sep 2024 20:41:00 +1200 Subject: [PATCH 136/253] .qimport will is no longer owner only on the public bot Creds issues should now be properly caught and logged, instead of showing unhandled exceptions --- .gitignore | 1 + .../Modules/Expressions/EllieExpressions.cs | 1 + .../Modules/Utility/Quote/QuoteCommands.cs | 3 --- .../Services/Impl/BotCredsProvider.cs | 20 +++++++++---------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 1ff8b34..8c045b8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db ellie-menu.ps1 +package.sh # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index b79091d..e034ad5 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -401,6 +401,7 @@ public partial class EllieExpressions : EllieModule } [Cmd] + [Ratelimit(300)] public async Task ExprsImport([Leftover] string input = null) { // todo cooldown on public bot for 1 day, limit 100 diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index 41bbc61..a50cd19 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -351,9 +351,6 @@ public partial class Utility [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] [Ratelimit(300)] -#if GLOBAL_NADEKO - [OwnerOnly] -#endif public async Task QuotesImport([Leftover] string? input = null) { input = input?.Trim(); diff --git a/src/EllieBot/Services/Impl/BotCredsProvider.cs b/src/EllieBot/Services/Impl/BotCredsProvider.cs index 81c5a25..a05ca9f 100644 --- a/src/EllieBot/Services/Impl/BotCredsProvider.cs +++ b/src/EllieBot/Services/Impl/BotCredsProvider.cs @@ -49,18 +49,18 @@ public sealed class BotCredsProvider : IBotCredsProvider // this can fail in docker containers } - MigrateCredentials(); - - if (!File.Exists(CredsPath)) - { - Log.Warning( - "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", - CredsPath, - CredsExamplePath); - } - try { + MigrateCredentials(); + + if (!File.Exists(CredsPath)) + { + Log.Warning( + "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", + CredsPath, + CredsExamplePath); + } + _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) .AddEnvironmentVariables("EllieBot_") .Build(); -- 2.43.0 From 40b4ebf0fa8ff1799334089404b656cb9828ab1a Mon Sep 17 00:00:00 2001 From: Toastie Date: Thu, 12 Sep 2024 15:44:35 +1200 Subject: [PATCH 137/253] migrations, query fixes, fixes for mysql and postgres. In progress --- .gitignore | 5 +- src/EllieBot.Tests/GroupGreetTests.cs | 76 - src/EllieBot/Bot.cs | 60 +- src/EllieBot/Db/EllieContext.cs | 13 + .../Db/Extensions/GuildConfigExtensions.cs | 124 +- .../20240911104906_greet-settings.Designer.cs | 3790 ++++++++++++ .../Mysql/20240911104906_greet-settings.cs | 202 + .../Mysql/MysqlContextModelSnapshot.cs | 5433 ++++++++--------- .../PostgreSql/20220916194523_autopub.cs | 10 - .../20240911104857_greet-settings.Designer.cs | 3785 ++++++++++++ .../20240911104857_greet-settings.cs | 196 + .../PostgreSqlContextModelSnapshot.cs | 5427 ++++++++-------- .../20240911104847_greet-settings.Designer.cs | 2925 +++++++++ .../Sqlite/20240911104847_greet-settings.cs | 219 + .../Sqlite/EllieSqliteContextModelSnapshot.cs | 3860 ++++++------ .../Administration/GreetBye/GreetCommands.cs | 305 +- .../Administration/GreetBye/GreetGrouper.cs | 71 - .../Administration/GreetBye/GreetService.cs | 350 +- .../Administration/GreetBye/GreetSettings.cs | 69 +- .../UserPunish/UserPunishService.cs | 29 +- .../Expressions/EllieExpressionExtensions.cs | 2 +- src/EllieBot/Modules/Help/HelpService.cs | 2 +- .../Utility/Repeater/RepeaterService.cs | 2 +- .../Services/Impl/BotCredsProvider.cs | 24 +- .../Extensions/EnumerableExtensions.cs | 16 + src/EllieBot/_common/Configs/BotConfig.cs | 14 - .../Replacements/Impl/ReplacementContext.cs | 15 +- .../Replacements/Impl/ReplacementService.cs | 12 +- .../data/strings/commands/commands.en-US.yml | 4 +- 29 files changed, 18970 insertions(+), 8070 deletions(-) delete mode 100644 src/EllieBot.Tests/GroupGreetTests.cs create mode 100644 src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs create mode 100644 src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs create mode 100644 src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs create mode 100644 src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs create mode 100644 src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs create mode 100644 src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs delete mode 100644 src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs diff --git a/.gitignore b/.gitignore index 8330cb8..8c045b8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,9 +20,8 @@ src/EllieBot/credentials.json src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db -build.ps1 -build.sh -test.ps1 +ellie-menu.ps1 +package.sh # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/src/EllieBot.Tests/GroupGreetTests.cs b/src/EllieBot.Tests/GroupGreetTests.cs deleted file mode 100644 index ba2bf37..0000000 --- a/src/EllieBot.Tests/GroupGreetTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Linq; -using System.Threading.Tasks; -using Ellie.Common; -using EllieBot.Services; -using NUnit.Framework; - -namespace EllieBot.Tests -{ - public class GroupGreetTests - { - private GreetGrouper _grouper; - - [SetUp] - public void Setup() - => _grouper = new GreetGrouper(); - - [Test] - public void CreateTest() - { - var created = _grouper.CreateOrAdd(0, 5); - - Assert.True(created); - } - - [Test] - public void CreateClearTest() - { - _grouper.CreateOrAdd(0, 5); - _grouper.ClearGroup(0, 5, out var items); - - Assert.AreEqual(0, items.Count()); - } - - [Test] - public void NotCreatedTest() - { - _grouper.CreateOrAdd(0, 5); - var created = _grouper.CreateOrAdd(0, 4); - - Assert.False(created); - } - - [Test] - public void ClearAddedTest() - { - _grouper.CreateOrAdd(0, 5); - _grouper.CreateOrAdd(0, 4); - _grouper.ClearGroup(0, 5, out var items); - - var list = items.ToList(); - - Assert.AreEqual(1, list.Count, $"Count was {list.Count}"); - Assert.AreEqual(4, list[0]); - } - - [Test] - public async Task ClearManyTest() - { - _grouper.CreateOrAdd(0, 5); - - // add 15 items - await Enumerable.Range(10, 15) - .Select(x => Task.Run(() => _grouper.CreateOrAdd(0, x))).WhenAll(); - - // get 5 at most - _grouper.ClearGroup(0, 5, out var items); - var list = items.ToList(); - Assert.AreEqual(5, list.Count, $"Count was {list.Count}"); - - // try to get 15, but there should be 10 left - _grouper.ClearGroup(0, 15, out items); - list = items.ToList(); - Assert.AreEqual(10, list.Count, $"Count was {list.Count}"); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index 3ea8ffa..af69cee 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -1,5 +1,6 @@ #nullable disable using DryIoc; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; using EllieBot.Common.Configs; @@ -88,18 +89,18 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() - => Client.Guilds.Select(x => x.Id).ToList().ToList(); + => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - private void AddServices() + private async Task AddServices() { - var startingGuildIdList = GetCurrentGuildIds(); + var startingGuildIdList = GetCurrentGuildIds().ToList(); var startTime = Stopwatch.GetTimestamp(); var bot = Client.CurrentUser; - using (var uow = _db.GetDbContext()) + await using (var uow = _db.GetDbContext()) { + AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); - AllGuildConfigs = uow.Set().GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); } // var svcs = new StandardKernel(new NinjectSettings() @@ -161,7 +162,8 @@ public sealed class Bot : IBot LoadTypeReaders(a); } - Log.Information("All services loaded in {ServiceLoadTime:F2}s", Stopwatch.GetElapsedTime(startTime).TotalSeconds); + Log.Information("All services loaded in {ServiceLoadTime:F2}s", + Stopwatch.GetElapsedTime(startTime).TotalSeconds); } private void LoadTypeReaders(Assembly assembly) @@ -265,7 +267,7 @@ public sealed class Bot : IBot Log.Information("Shard {ShardId} loading services...", Client.ShardId); try { - AddServices(); + await AddServices(); } catch (Exception ex) { @@ -273,7 +275,9 @@ public sealed class Bot : IBot Helpers.ReadErrorAndExit(9); } - Log.Information("Shard {ShardId} connected in {Elapsed:F2}s", Client.ShardId, Stopwatch.GetElapsedTime(startTime).TotalSeconds); + Log.Information("Shard {ShardId} connected in {Elapsed:F2}s", + Client.ShardId, + Stopwatch.GetElapsedTime(startTime).TotalSeconds); var commandHandler = Services.GetRequiredService(); // start handling messages received in commandhandler @@ -338,26 +342,26 @@ public sealed class Bot : IBot if (arg.Exception is { InnerException: WebSocketClosedException { CloseCode: 4014 } }) { Log.Error(""" - Login failed. - - *** Please enable privileged intents *** - - Certain Ellie features require Discord's privileged gateway intents. - These include greeting and goodbye messages, as well as creating the Owner message channels for DM forwarding. - - How to enable privileged intents: - 1. Head over to the Discord Developer Portal https://discord.com/developers/applications/ - 2. Select your Application. - 3. Click on `Bot` in the left side navigation panel, and scroll down to the intents section. - 4. Enable all intents. - 5. Restart your bot. - - Read this only if your bot is in 100 or more servers: - - You'll need to apply to use the intents with Discord, but for small selfhosts, all that is required is enabling the intents in the developer portal. - Yes, this is a new thing from Discord, as of October 2020. No, there's nothing we can do about it. Yes, we're aware it worked before. - While waiting for your bot to be accepted, you can change the 'usePrivilegedIntents' inside your creds.yml to 'false', although this will break many of the ellie's features - """); + Login failed. + + *** Please enable privileged intents *** + + Certain Ellie features require Discord's privileged gateway intents. + These include greeting and goodbye messages, as well as creating the Owner message channels for DM forwarding. + + How to enable privileged intents: + 1. Head over to the Discord Developer Portal https://discord.com/developers/applications/ + 2. Select your Application. + 3. Click on `Bot` in the left side navigation panel, and scroll down to the intents section. + 4. Enable all intents. + 5. Restart your bot. + + Read this only if your bot is in 100 or more servers: + + You'll need to apply to use the intents with Discord, but for small selfhosts, all that is required is enabling the intents in the developer portal. + Yes, this is a new thing from Discord, as of October 2020. No, there's nothing we can do about it. Yes, we're aware it worked before. + While waiting for your bot to be accepted, you can change the 'usePrivilegedIntents' inside your creds.yml to 'false', although this will break many of the ellie's features + """); return Task.CompletedTask; } diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index afc50ca..724a862 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -10,6 +10,7 @@ namespace EllieBot.Db; public abstract class EllieContext : DbContext { public DbSet GuildConfigs { get; set; } + public DbSet GreetSettings { get; set; } public DbSet Quotes { get; set; } public DbSet Reminders { get; set; } @@ -678,6 +679,18 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.Cascade); #endregion + + #region GreetSettings + + modelBuilder + .Entity(gs => gs.HasIndex(x => new + { + x.GuildId, + x.GreetType + }) + .IsUnique()); + + #endregion } #if DEBUG diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index 842fe4e..de4d47f 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -1,4 +1,5 @@ #nullable disable +using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Db.Models; @@ -32,8 +33,8 @@ public static class GuildConfigExtensions { var conf = ctx.GuildConfigsForId(guildId, set => set.Include(y => y.StreamRole) - .Include(y => y.StreamRole.Whitelist) - .Include(y => y.StreamRole.Blacklist)); + .Include(y => y.StreamRole.Whitelist) + .Include(y => y.StreamRole.Blacklist)); if (conf.StreamRole is null) conf.StreamRole = new(); @@ -42,19 +43,28 @@ public static class GuildConfigExtensions } private static IQueryable IncludeEverything(this DbSet configs) - => configs.AsQueryable() - .AsSplitQuery() - .Include(gc => gc.CommandCooldowns) - .Include(gc => gc.FollowedStreams) - .Include(gc => gc.StreamRole) - .Include(gc => gc.XpSettings) - .ThenInclude(x => x.ExclusionList) - .Include(gc => gc.DelMsgOnCmdChannels); + => configs + .AsSplitQuery() + .Include(gc => gc.CommandCooldowns) + .Include(gc => gc.FollowedStreams) + .Include(gc => gc.StreamRole) + .Include(gc => gc.DelMsgOnCmdChannels) + .Include(gc => gc.XpSettings) + .ThenInclude(x => x.ExclusionList); - public static IEnumerable GetAllGuildConfigs( + public static async Task GetAllGuildConfigs( this DbSet configs, - IReadOnlyList availableGuilds) - => configs.IncludeEverything().AsNoTracking().Where(x => availableGuilds.Contains(x.GuildId)).ToList(); + List availableGuilds) + { + var result = await configs + .AsQueryable() + .Include(x => x.CommandCooldowns) + .Where(x => availableGuilds.Contains(x.GuildId)) + .AsNoTracking() + .ToArrayAsync(); + + return result; + } /// /// Gets and creates if it doesn't exist a config for a guild. @@ -80,13 +90,14 @@ public static class GuildConfigExtensions if (config is null) { - ctx.Set().Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist, - WarningsInitialized = true, - WarnPunishments = DefaultWarnPunishments - }); + ctx.Set() + .Add(config = new() + { + GuildId = guildId, + Permissions = Permissionv2.GetDefaultPermlist, + WarningsInitialized = true, + WarnPunishments = DefaultWarnPunishments + }); ctx.SaveChanges(); } @@ -122,18 +133,18 @@ public static class GuildConfigExtensions public static LogSetting LogSettingsFor(this DbContext ctx, ulong guildId) { var logSetting = ctx.Set() - .AsQueryable() - .Include(x => x.LogIgnores) - .Where(x => x.GuildId == guildId) - .FirstOrDefault(); + .AsQueryable() + .Include(x => x.LogIgnores) + .Where(x => x.GuildId == guildId) + .FirstOrDefault(); if (logSetting is null) { ctx.Set() - .Add(logSetting = new() - { - GuildId = guildId - }); + .Add(logSetting = new() + { + GuildId = guildId + }); ctx.SaveChanges(); } @@ -149,18 +160,20 @@ public static class GuildConfigExtensions public static GuildConfig GcWithPermissionsFor(this DbContext ctx, ulong guildId) { - var config = ctx.Set().AsQueryable() - .Where(gc => gc.GuildId == guildId) - .Include(gc => gc.Permissions) - .FirstOrDefault(); + var config = ctx.Set() + .AsQueryable() + .Where(gc => gc.GuildId == guildId) + .Include(gc => gc.Permissions) + .FirstOrDefault(); if (config is null) // if there is no guildconfig, create new one { - ctx.Set().Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist - }); + ctx.Set() + .Add(config = new() + { + GuildId = guildId, + Permissions = Permissionv2.GetDefaultPermlist + }); ctx.SaveChanges(); } else if (config.Permissions is null || !config.Permissions.Any()) // if no perms, add default ones @@ -177,20 +190,21 @@ public static class GuildConfigExtensions public static IEnumerable GetFollowedStreams(this DbSet configs, List included) => configs.AsQueryable() - .Where(gc => included.Contains(gc.GuildId)) - .Include(gc => gc.FollowedStreams) - .SelectMany(gc => gc.FollowedStreams) - .ToList(); + .Where(gc => included.Contains(gc.GuildId)) + .Include(gc => gc.FollowedStreams) + .SelectMany(gc => gc.FollowedStreams) + .ToList(); + public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId) { var gc = ctx.GuildConfigsForId(guildId, set => set.Include(x => x.XpSettings) - .ThenInclude(x => x.RoleRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.CurrencyRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.ExclusionList)); + .ThenInclude(x => x.RoleRewards) + .Include(x => x.XpSettings) + .ThenInclude(x => x.CurrencyRewards) + .Include(x => x.XpSettings) + .ThenInclude(x => x.ExclusionList)); if (gc.XpSettings is null) gc.XpSettings = new(); @@ -200,15 +214,15 @@ public static class GuildConfigExtensions public static IEnumerable GetGeneratingChannels(this DbSet configs) => configs.AsQueryable() - .Include(x => x.GenerateCurrencyChannelIds) - .Where(x => x.GenerateCurrencyChannelIds.Any()) - .SelectMany(x => x.GenerateCurrencyChannelIds) - .Select(x => new GeneratingChannel - { - ChannelId = x.ChannelId, - GuildId = x.GuildConfig.GuildId - }) - .ToArray(); + .Include(x => x.GenerateCurrencyChannelIds) + .Where(x => x.GenerateCurrencyChannelIds.Any()) + .SelectMany(x => x.GenerateCurrencyChannelIds) + .Select(x => new GeneratingChannel + { + ChannelId = x.ChannelId, + GuildId = x.GuildConfig.GuildId + }) + .ToArray(); public class GeneratingChannel { diff --git a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs new file mode 100644 index 0000000..d9fd474 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs @@ -0,0 +1,3790 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Db; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20240911104906_greet-settings")] + partial class greetsettings + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todosarchive"); + + b.ToTable("todosarchive", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)") + .HasColumnName("endsat"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_giveawaymodel"); + + b.ToTable("giveawaymodel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("GiveawayId") + .HasColumnType("int") + .HasColumnName("giveawayid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_giveawayuser"); + + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + + b.ToTable("giveawayuser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("StickyRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("stickyroles"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); + + b.ToTable("honeypotchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); + + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("Command") + .HasColumnType("longtext") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("RoleIds") + .HasColumnType("longtext") + .HasColumnName("roleids"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_stickyroles"); + + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); + + b.ToTable("stickyroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ArchiveId") + .HasColumnType("int") + .HasColumnName("archiveid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsDone") + .HasColumnType("tinyint(1)") + .HasColumnName("isdone"); + + b.Property("Todo") + .HasColumnType("longtext") + .HasColumnName("todo"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todos"); + + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); + + b.ToTable("todos", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDeleteTimer") + .HasColumnType("int") + .HasColumnName("autodeletetimer"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("GreetType") + .HasColumnType("int") + .HasColumnName("greettype"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("isenabled"); + + b.Property("MessageText") + .HasColumnType("longtext") + .HasColumnName("messagetext"); + + b.HasKey("Id") + .HasName("pk_greetsettings"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique() + .HasDatabaseName("ix_greetsettings_guildid_greettype"); + + b.ToTable("greetsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Navigation("Participants"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs new file mode 100644 index 0000000..5bbb193 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs @@ -0,0 +1,202 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + /// + public partial class greetsettings : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "autodeletebyemessagestimer", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "autodeletegreetmessagestimer", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessagedeleteafter", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "byemessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "channelbyemessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "channelgreetmessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "dmgreetmessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "greetmessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendboostmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendchannelbyemessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendchannelgreetmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "senddmgreetmessage", + table: "guildconfigs"); + + migrationBuilder.CreateTable( + name: "greetsettings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + greettype = table.Column(type: "int", nullable: false), + messagetext = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + isenabled = table.Column(type: "tinyint(1)", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: true), + autodeletetimer = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_greetsettings", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_greetsettings_guildid_greettype", + table: "greetsettings", + columns: new[] { "guildid", "greettype" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "greetsettings"); + + migrationBuilder.AddColumn( + name: "autodeletebyemessagestimer", + table: "guildconfigs", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "autodeletegreetmessagestimer", + table: "guildconfigs", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "boostmessage", + table: "guildconfigs", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "boostmessagechannelid", + table: "guildconfigs", + type: "bigint unsigned", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "boostmessagedeleteafter", + table: "guildconfigs", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "byemessagechannelid", + table: "guildconfigs", + type: "bigint unsigned", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "channelbyemessagetext", + table: "guildconfigs", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "channelgreetmessagetext", + table: "guildconfigs", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "dmgreetmessagetext", + table: "guildconfigs", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "greetmessagechannelid", + table: "guildconfigs", + type: "bigint unsigned", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "sendboostmessage", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "sendchannelbyemessage", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "sendchannelgreetmessage", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "senddmgreetmessage", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs index 964a3ea..2f4a13d 100644 --- a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs @@ -17,3783 +17,3770 @@ namespace EllieBot.Migrations.Mysql { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("ProductVersion", "8.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 64); MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("datetime(6)") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("int") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); + b.Property("StickyRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("stickyroles"); - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("longtext") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("longtext") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("int") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("tinyint(1)") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("longtext") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDeleteTimer") + .HasColumnType("int") + .HasColumnName("autodeletetimer"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("GreetType") + .HasColumnType("int") + .HasColumnName("greettype"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("isenabled"); + + b.Property("MessageText") + .HasColumnType("longtext") + .HasColumnName("messagetext"); + + b.HasKey("Id") + .HasName("pk_greetsettings"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique() + .HasDatabaseName("ix_greetsettings_guildid_greettype"); + + b.ToTable("greetsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs index 35ace3c..177c650 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs @@ -9,12 +9,6 @@ namespace EllieBot.Migrations.PostgreSql { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.AddColumn( - name: "rolerequirement", - table: "shopentry", - type: "numeric(20,0)", - nullable: true); - migrationBuilder.CreateTable( name: "autopublishchannel", columns: table => new @@ -41,10 +35,6 @@ namespace EllieBot.Migrations.PostgreSql { migrationBuilder.DropTable( name: "autopublishchannel"); - - migrationBuilder.DropColumn( - name: "rolerequirement", - table: "shopentry"); } } } diff --git a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs new file mode 100644 index 0000000..8a2c51c --- /dev/null +++ b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs @@ -0,0 +1,3785 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Db; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace EllieBot.Migrations.PostgreSql +{ + [DbContext(typeof(PostgreSqlContext))] + [Migration("20240911104857_greet-settings")] + partial class greetsettings + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("integer") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("interval") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("integer") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("integer") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AntiSpamSettingId") + .HasColumnType("integer") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("integer") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("integer") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todosarchive"); + + b.ToTable("todosarchive", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("text") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("text") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("text") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("integer") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("text") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AutoDelete") + .HasColumnType("boolean") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("integer") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("text") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("integer") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("text") + .HasColumnName("imageurl"); + + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("name"); + + b.Property("OwnerId") + .HasColumnType("integer") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("integer") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("text") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CommandName") + .HasColumnType("text") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("text") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("text") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("numeric(20,0)") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AvatarId") + .HasColumnType("text") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("text") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("Url") + .IsRequired() + .HasColumnType("text") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("text") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Bet") + .HasColumnType("numeric") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("text") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("EndsAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("endsat"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_giveawaymodel"); + + b.ToTable("giveawaymodel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("GiveawayId") + .HasColumnType("integer") + .HasColumnName("giveawayid"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_giveawayuser"); + + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + + b.ToTable("giveawayuser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("integer") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AutoAssignRoleIds") + .HasColumnType("text") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("boolean") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("CleverbotEnabled") + .HasColumnType("boolean") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("boolean") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("boolean") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("boolean") + .HasColumnName("disableglobalexpressions"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("boolean") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("boolean") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("boolean") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("boolean") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("numeric(20,0)") + .HasColumnName("gamevoicechannel"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("text") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("text") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("boolean") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("text") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("text") + .HasColumnName("prefix"); + + b.Property("StickyRoles") + .HasColumnType("boolean") + .HasColumnName("stickyroles"); + + b.Property("TimeZoneId") + .HasColumnType("text") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("boolean") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("integer") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("integer") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("boolean") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); + + b.ToTable("honeypotchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("integer") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageupdatedid"); + + b.Property("ThreadCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threadcreatedid"); + + b.Property("ThreadDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threaddeletedid"); + + b.Property("UserBannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AutoDisconnect") + .HasColumnType("boolean") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("boolean") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("integer") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("integer") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Author") + .HasColumnType("text") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AllowTarget") + .HasColumnType("boolean") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("boolean") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("boolean") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("boolean") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("text") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("text") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("integer") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("text") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("timestamp without time zone") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("boolean") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("integer") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("numeric(20,0)") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("integer") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("text") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("text") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("integer") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("text") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("integer") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("text") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("text") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("text") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("text") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("integer") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("integer") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("boolean") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("serverid"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("timestamp without time zone") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("interval") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("boolean") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("interval") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("text") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("text") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("integer") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); + + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("integer") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("text") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("numeric(20,0)") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("integer") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("RoleIds") + .HasColumnType("text") + .HasColumnName("roleids"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_stickyroles"); + + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); + + b.ToTable("stickyroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AddRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("boolean") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("text") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ArchiveId") + .HasColumnType("integer") + .HasColumnName("archiveid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("IsDone") + .HasColumnType("boolean") + .HasColumnName("isdone"); + + b.Property("Todo") + .HasColumnType("text") + .HasColumnName("todo"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todos"); + + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); + + b.ToTable("todos", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("integer") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AffinityId") + .HasColumnType("integer") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("integer") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("integer") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("text") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("integer") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("integer") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("integer") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("integer") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("boolean") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("text") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("text") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("text") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("integer") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("integer") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("integer") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("boolean") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("boolean") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("boolean") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("text") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AutoDeleteTimer") + .HasColumnType("integer") + .HasColumnName("autodeletetimer"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("GreetType") + .HasColumnType("integer") + .HasColumnName("greettype"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("IsEnabled") + .HasColumnType("boolean") + .HasColumnName("isenabled"); + + b.Property("MessageText") + .HasColumnType("text") + .HasColumnName("messagetext"); + + b.HasKey("Id") + .HasName("pk_greetsettings"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique() + .HasDatabaseName("ix_greetsettings_guildid_greettype"); + + b.ToTable("greetsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Navigation("Participants"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs new file mode 100644 index 0000000..afa0de2 --- /dev/null +++ b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs @@ -0,0 +1,196 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace EllieBot.Migrations.PostgreSql +{ + /// + public partial class greetsettings : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "autodeletebyemessagestimer", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "autodeletegreetmessagestimer", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "boostmessagedeleteafter", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "byemessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "channelbyemessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "channelgreetmessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "dmgreetmessagetext", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "greetmessagechannelid", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendboostmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendchannelbyemessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "sendchannelgreetmessage", + table: "guildconfigs"); + + migrationBuilder.DropColumn( + name: "senddmgreetmessage", + table: "guildconfigs"); + + migrationBuilder.CreateTable( + name: "greetsettings", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + guildid = table.Column(type: "numeric(20,0)", nullable: false), + greettype = table.Column(type: "integer", nullable: false), + messagetext = table.Column(type: "text", nullable: true), + isenabled = table.Column(type: "boolean", nullable: false), + channelid = table.Column(type: "numeric(20,0)", nullable: true), + autodeletetimer = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_greetsettings", x => x.id); + }); + + migrationBuilder.CreateIndex( + name: "ix_greetsettings_guildid_greettype", + table: "greetsettings", + columns: new[] { "guildid", "greettype" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "greetsettings"); + + migrationBuilder.AddColumn( + name: "autodeletebyemessagestimer", + table: "guildconfigs", + type: "integer", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "autodeletegreetmessagestimer", + table: "guildconfigs", + type: "integer", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "boostmessage", + table: "guildconfigs", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "boostmessagechannelid", + table: "guildconfigs", + type: "numeric(20,0)", + nullable: false, + defaultValue: 0m); + + migrationBuilder.AddColumn( + name: "boostmessagedeleteafter", + table: "guildconfigs", + type: "integer", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "byemessagechannelid", + table: "guildconfigs", + type: "numeric(20,0)", + nullable: false, + defaultValue: 0m); + + migrationBuilder.AddColumn( + name: "channelbyemessagetext", + table: "guildconfigs", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "channelgreetmessagetext", + table: "guildconfigs", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "dmgreetmessagetext", + table: "guildconfigs", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "greetmessagechannelid", + table: "guildconfigs", + type: "numeric(20,0)", + nullable: false, + defaultValue: 0m); + + migrationBuilder.AddColumn( + name: "sendboostmessage", + table: "guildconfigs", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "sendchannelbyemessage", + table: "guildconfigs", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "sendchannelgreetmessage", + table: "guildconfigs", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "senddmgreetmessage", + table: "guildconfigs", + type: "boolean", + nullable: false, + defaultValue: false); + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs index bb87c9c..c72940f 100644 --- a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs @@ -17,3778 +17,3765 @@ namespace EllieBot.Migrations.PostgreSql { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("ProductVersion", "8.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); + b.Property("ActionDurationMinutes") + .HasColumnType("integer") + .HasColumnName("actiondurationminutes"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); + b.Property("MinAge") + .HasColumnType("interval") + .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antialtsetting"); + b.HasKey("Id") + .HasName("pk_antialtsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); - b.ToTable("antialtsetting", (string)null); - }); + b.ToTable("antialtsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); + b.Property("PunishDuration") + .HasColumnType("integer") + .HasColumnName("punishduration"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); + b.Property("UserThreshold") + .HasColumnType("integer") + .HasColumnName("userthreshold"); - b.HasKey("Id") - .HasName("pk_antiraidsetting"); + b.HasKey("Id") + .HasName("pk_antiraidsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - b.ToTable("antiraidsetting", (string)null); - }); + b.ToTable("antiraidsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); + b.Property("AntiSpamSettingId") + .HasColumnType("integer") + .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.HasKey("Id") - .HasName("pk_antispamignore"); + b.HasKey("Id") + .HasName("pk_antispamignore"); - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); - b.ToTable("antispamignore", (string)null); - }); + b.ToTable("antispamignore", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); + b.Property("MessageThreshold") + .HasColumnType("integer") + .HasColumnName("messagethreshold"); - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); + b.Property("MuteTime") + .HasColumnType("integer") + .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_antispamsetting"); + b.HasKey("Id") + .HasName("pk_antispamsetting"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); - b.ToTable("antispamsetting", (string)null); - }); + b.ToTable("antispamsetting", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todosarchive"); + b.HasKey("Id") + .HasName("pk_todosarchive"); - b.ToTable("todosarchive", (string)null); - }); + b.ToTable("todosarchive", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); + b.Property("ChannelName") + .HasColumnType("text") + .HasColumnName("channelname"); - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); + b.Property("CommandText") + .HasColumnType("text") + .HasColumnName("commandtext"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); + b.Property("GuildName") + .HasColumnType("text") + .HasColumnName("guildname"); - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("integer") + .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); + b.Property("VoiceChannelName") + .HasColumnType("text") + .HasColumnName("voicechannelname"); - b.HasKey("Id") - .HasName("pk_autocommands"); + b.HasKey("Id") + .HasName("pk_autocommands"); - b.ToTable("autocommands", (string)null); - }); + b.ToTable("autocommands", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autopublishchannel"); + b.HasKey("Id") + .HasName("pk_autopublishchannel"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); - b.ToTable("autopublishchannel", (string)null); - }); + b.ToTable("autopublishchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); + b.Property("AutoDelete") + .HasColumnType("boolean") + .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); - b.ToTable("autotranslatechannels", (string)null); - }); + b.ToTable("autotranslatechannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("integer") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); + b.Property("Source") + .HasColumnType("text") + .HasColumnName("source"); - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_autotranslateusers"); + b.HasKey("Id") + .HasName("pk_autotranslateusers"); - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); - b.ToTable("autotranslateusers", (string)null); - }); + b.ToTable("autotranslateusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); + b.Property("PruneDays") + .HasColumnType("integer") + .HasColumnName("prunedays"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_bantemplates"); + b.HasKey("Id") + .HasName("pk_bantemplates"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); - b.ToTable("bantemplates", (string)null); - }); + b.ToTable("bantemplates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_bankusers"); + b.HasKey("Id") + .HasName("pk_bankusers"); - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); - b.ToTable("bankusers", (string)null); - }); + b.ToTable("bankusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_blacklist"); + b.HasKey("Id") + .HasName("pk_blacklist"); - b.ToTable("blacklist", (string)null); - }); + b.ToTable("blacklist", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); - b.ToTable("clubapplicants", (string)null); - }); + b.ToTable("clubapplicants", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + { + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); - b.ToTable("clubbans", (string)null); - }); + b.ToTable("clubbans", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); + b.Property("ImageUrl") + .HasColumnType("text") + .HasColumnName("imageurl"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("name"); - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); + b.Property("OwnerId") + .HasColumnType("integer") + .HasColumnName("ownerid"); - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("integer") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_clubs"); + b.HasKey("Id") + .HasName("pk_clubs"); - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); - b.ToTable("clubs", (string)null); - }); + b.ToTable("clubs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); + b.Property("Mapping") + .HasColumnType("text") + .HasColumnName("mapping"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_commandalias"); + b.HasKey("Id") + .HasName("pk_commandalias"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); - b.ToTable("commandalias", (string)null); - }); + b.ToTable("commandalias", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); + b.Property("CommandName") + .HasColumnType("text") + .HasColumnName("commandname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); + b.Property("Seconds") + .HasColumnType("integer") + .HasColumnName("seconds"); - b.HasKey("Id") - .HasName("pk_commandcooldown"); + b.HasKey("Id") + .HasName("pk_commandcooldown"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); - b.ToTable("commandcooldown", (string)null); - }); + b.ToTable("commandcooldown", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); + b.Property("Extra") + .IsRequired() + .HasColumnType("text") + .HasColumnName("extra"); - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); + b.Property("Note") + .HasColumnType("text") + .HasColumnName("note"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); + b.Property("Type") + .IsRequired() + .HasColumnType("text") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_currencytransactions"); + b.HasKey("Id") + .HasName("pk_currencytransactions"); - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); - b.ToTable("currencytransactions", (string)null); - }); + b.ToTable("currencytransactions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - b.ToTable("delmsgoncmdchannel", (string)null); - }); + b.ToTable("delmsgoncmdchannel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); + b.Property("Perm") + .HasColumnType("numeric(20,0)") + .HasColumnName("perm"); - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - b.ToTable("discordpermoverrides", (string)null); - }); + b.ToTable("discordpermoverrides", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); + b.Property("AvatarId") + .HasColumnType("text") + .HasColumnName("avatarid"); - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); + b.Property("ClubId") + .HasColumnType("integer") + .HasColumnName("clubid"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); + b.Property("Discriminator") + .HasColumnType("text") + .HasColumnName("discriminator"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_discorduser"); + b.HasKey("Id") + .HasName("pk_discorduser"); - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); - b.ToTable("discorduser", (string)null); - }); + b.ToTable("discorduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); + b.Property("ItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("itemid"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_excludeditem"); + b.HasKey("Id") + .HasName("pk_excludeditem"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); - b.ToTable("excludeditem", (string)null); - }); + b.ToTable("excludeditem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); + b.Property("Url") + .IsRequired() + .HasColumnType("text") + .HasColumnName("url"); - b.HasKey("Id") - .HasName("pk_feedsub"); + b.HasKey("Id") + .HasName("pk_feedsub"); - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); - b.ToTable("feedsub", (string)null); - }); + b.ToTable("feedsub", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterchannelid"); + b.HasKey("Id") + .HasName("pk_filterchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); - b.ToTable("filterchannelid", (string)null); - }); + b.ToTable("filterchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - b.ToTable("filterlinkschannelid", (string)null); - }); + b.ToTable("filterlinkschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - b.ToTable("filterwordschannelid", (string)null); - }); + b.ToTable("filterwordschannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); + b.Property("Word") + .HasColumnType("text") + .HasColumnName("word"); - b.HasKey("Id") - .HasName("pk_filteredword"); + b.HasKey("Id") + .HasName("pk_filteredword"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); - b.ToTable("filteredword", (string)null); - }); + b.ToTable("filteredword", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_followedstream"); + b.HasKey("Id") + .HasName("pk_followedstream"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); - b.ToTable("followedstream", (string)null); - }); + b.ToTable("followedstream", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.HasKey("Id") - .HasName("pk_gcchannelid"); + b.HasKey("Id") + .HasName("pk_gcchannelid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - b.ToTable("gcchannelid", (string)null); - }); + b.ToTable("gcchannelid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); + b.Property("Bet") + .HasColumnType("numeric") + .HasColumnName("bet"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); + b.Property("Feature") + .HasColumnType("text") + .HasColumnName("feature"); - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); - b.HasKey("Id") - .HasName("pk_gamblingstats"); + b.HasKey("Id") + .HasName("pk_gamblingstats"); - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - b.ToTable("gamblingstats", (string)null); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); + b.Property("EndsAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.HasKey("Id") - .HasName("pk_giveawaymodel"); + b.HasKey("Id") + .HasName("pk_giveawaymodel"); - b.ToTable("giveawaymodel", (string)null); - }); + b.ToTable("giveawaymodel", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); + b.Property("GiveawayId") + .HasColumnType("integer") + .HasColumnName("giveawayid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_giveawayuser"); + b.HasKey("Id") + .HasName("pk_giveawayuser"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - b.ToTable("giveawayuser", (string)null); - }); + b.ToTable("giveawayuser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); + b.Property("Number") + .HasColumnType("integer") + .HasColumnName("number"); - b.HasKey("Id") - .HasName("pk_groupname"); + b.HasKey("Id") + .HasName("pk_groupname"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); - b.ToTable("groupname", (string)null); - }); + b.ToTable("groupname", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); + b.Property("AutoAssignRoleIds") + .HasColumnType("text") + .HasColumnName("autoassignroleids"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("boolean") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); + b.Property("CleverbotEnabled") + .HasColumnType("boolean") + .HasColumnName("cleverbotenabled"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("boolean") + .HasColumnName("deletemessageoncommand"); - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("boolean") + .HasColumnName("deletestreamonlinemessage"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); + b.Property("DisableGlobalExpressions") + .HasColumnType("boolean") + .HasColumnName("disableglobalexpressions"); - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("boolean") + .HasColumnName("exclusiveselfassignedroles"); - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); + b.Property("FilterInvites") + .HasColumnType("boolean") + .HasColumnName("filterinvites"); - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); + b.Property("FilterLinks") + .HasColumnType("boolean") + .HasColumnName("filterlinks"); - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); + b.Property("FilterWords") + .HasColumnType("boolean") + .HasColumnName("filterwords"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("GameVoiceChannel") + .HasColumnType("numeric(20,0)") + .HasColumnName("gamevoicechannel"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); + b.Property("Locale") + .HasColumnType("text") + .HasColumnName("locale"); - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); + b.Property("MuteRoleName") + .HasColumnType("text") + .HasColumnName("muterolename"); - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); + b.Property("NotifyStreamOffline") + .HasColumnType("boolean") + .HasColumnName("notifystreamoffline"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); + b.Property("PermissionRole") + .HasColumnType("text") + .HasColumnName("permissionrole"); - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); + b.Property("Prefix") + .HasColumnType("text") + .HasColumnName("prefix"); - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); + b.Property("StickyRoles") + .HasColumnType("boolean") + .HasColumnName("stickyroles"); - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); + b.Property("TimeZoneId") + .HasColumnType("text") + .HasColumnName("timezoneid"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); + b.Property("VerbosePermissions") + .HasColumnType("boolean") + .HasColumnName("verbosepermissions"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("WarnExpireAction") + .HasColumnType("integer") + .HasColumnName("warnexpireaction"); - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); + b.Property("WarnExpireHours") + .HasColumnType("integer") + .HasColumnName("warnexpirehours"); - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); + b.Property("WarningsInitialized") + .HasColumnType("boolean") + .HasColumnName("warningsinitialized"); - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); + b.HasKey("Id") + .HasName("pk_guildconfigs"); - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); + b.ToTable("guildconfigs", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); + b.HasKey("GuildId") + .HasName("pk_honeypotchannels"); - b.ToTable("honeypotchannels", (string)null); - }); + b.ToTable("honeypotchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); + b.Property("LogItemId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logitemid"); - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); + b.Property("LogSettingId") + .HasColumnType("integer") + .HasColumnName("logsettingid"); - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - b.ToTable("ignoredlogchannels", (string)null); - }); + b.ToTable("ignoredlogchannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_imageonlychannels"); + b.HasKey("Id") + .HasName("pk_imageonlychannels"); - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); - b.ToTable("imageonlychannels", (string)null); - }); + b.ToTable("imageonlychannels", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); + b.Property("ChannelCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); + b.Property("ChannelDestroyedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); + b.Property("ChannelUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelupdatedid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); + b.Property("LogOtherId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); + b.Property("LogUserPresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); + b.Property("LogVoicePresenceId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); + b.Property("LogWarnsId") + .HasColumnType("numeric(20,0)") + .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); + b.Property("MessageDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); + b.Property("MessageUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); + b.Property("ThreadCreatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); + b.Property("ThreadDeletedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); + b.Property("UserBannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); + b.Property("UserJoinedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); + b.Property("UserLeftId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); + b.Property("UserMutedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); + b.Property("UserUnbannedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); + b.Property("UserUpdatedId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userupdatedid"); - b.HasKey("Id") - .HasName("pk_logsettings"); + b.HasKey("Id") + .HasName("pk_logsettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); - b.ToTable("logsettings", (string)null); - }); + b.ToTable("logsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); + b.Property("AutoDisconnect") + .HasColumnType("boolean") + .HasColumnName("autodisconnect"); - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); + b.Property("AutoPlay") + .HasColumnType("boolean") + .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); + b.Property("MusicChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("musicchannelid"); - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); + b.Property("PlayerRepeat") + .HasColumnType("integer") + .HasColumnName("playerrepeat"); - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); + b.Property("QualityPreset") + .HasColumnType("integer") + .HasColumnName("qualitypreset"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(100) + .HasColumnName("volume"); - b.HasKey("Id") - .HasName("pk_musicplayersettings"); + b.HasKey("Id") + .HasName("pk_musicplayersettings"); - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); - b.ToTable("musicplayersettings", (string)null); - }); + b.ToTable("musicplayersettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); + b.Property("Author") + .HasColumnType("text") + .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.HasKey("Id") - .HasName("pk_musicplaylists"); + b.HasKey("Id") + .HasName("pk_musicplaylists"); - b.ToTable("musicplaylists", (string)null); - }); + b.ToTable("musicplaylists", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_muteduserid"); + b.HasKey("Id") + .HasName("pk_muteduserid"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); - b.ToTable("muteduserid", (string)null); - }); + b.ToTable("muteduserid", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); + b.Property("AllowTarget") + .HasColumnType("boolean") + .HasColumnName("allowtarget"); - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); + b.Property("AutoDeleteTrigger") + .HasColumnType("boolean") + .HasColumnName("autodeletetrigger"); - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); + b.Property("ContainsAnywhere") + .HasColumnType("boolean") + .HasColumnName("containsanywhere"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); + b.Property("DmResponse") + .HasColumnType("boolean") + .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); + b.Property("Reactions") + .HasColumnType("text") + .HasColumnName("reactions"); - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); + b.Property("Response") + .HasColumnType("text") + .HasColumnName("response"); - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); - b.HasKey("Id") - .HasName("pk_expressions"); + b.HasKey("Id") + .HasName("pk_expressions"); - b.ToTable("expressions", (string)null); - }); + b.ToTable("expressions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); + b.Property("AmountCents") + .HasColumnType("integer") + .HasColumnName("amountcents"); - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); + b.Property("LastCharge") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastcharge"); - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); + b.Property("UniquePlatformUserId") + .HasColumnType("text") + .HasColumnName("uniqueplatformuserid"); - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); + b.Property("ValidThru") + .HasColumnType("timestamp without time zone") + .HasColumnName("validthru"); - b.HasKey("UserId") - .HasName("pk_patrons"); + b.HasKey("UserId") + .HasName("pk_patrons"); - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - b.ToTable("patrons", (string)null); - }); + b.ToTable("patrons", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); + b.Property("IsCustomCommand") + .HasColumnType("boolean") + .HasColumnName("iscustomcommand"); - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); + b.Property("PrimaryTarget") + .HasColumnType("integer") + .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); + b.Property("PrimaryTargetId") + .HasColumnType("numeric(20,0)") + .HasColumnName("primarytargetid"); - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); + b.Property("SecondaryTarget") + .HasColumnType("integer") + .HasColumnName("secondarytarget"); - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); + b.Property("SecondaryTargetName") + .HasColumnType("text") + .HasColumnName("secondarytargetname"); - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); + b.Property("State") + .HasColumnType("boolean") + .HasColumnName("state"); - b.HasKey("Id") - .HasName("pk_permissions"); + b.HasKey("Id") + .HasName("pk_permissions"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); - b.ToTable("permissions", (string)null); - }); + b.ToTable("permissions", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); + b.Property("Password") + .HasColumnType("text") + .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_plantedcurrency"); + b.HasKey("Id") + .HasName("pk_plantedcurrency"); - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); - b.ToTable("plantedcurrency", (string)null); - }); + b.ToTable("plantedcurrency", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); + b.Property("MusicPlaylistId") + .HasColumnType("integer") + .HasColumnName("musicplaylistid"); - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); + b.Property("Provider") + .HasColumnType("text") + .HasColumnName("provider"); - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); + b.Property("ProviderType") + .HasColumnType("integer") + .HasColumnName("providertype"); - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); + b.Property("Query") + .HasColumnType("text") + .HasColumnName("query"); - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); + b.Property("Title") + .HasColumnType("text") + .HasColumnName("title"); - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); + b.Property("Uri") + .HasColumnType("text") + .HasColumnName("uri"); - b.HasKey("Id") - .HasName("pk_playlistsong"); + b.HasKey("Id") + .HasName("pk_playlistsong"); - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); - b.ToTable("playlistsong", (string)null); - }); + b.ToTable("playlistsong", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("authorname"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("text") + .HasColumnName("keyword"); - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .IsRequired() + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_quotes"); + b.HasKey("Id") + .HasName("pk_quotes"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); - b.ToTable("quotes", (string)null); - }); + b.ToTable("quotes", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("emote"); - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); + b.Property("Group") + .HasColumnType("integer") + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); + b.Property("LevelReq") + .HasColumnType("integer") + .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_reactionroles"); + b.HasKey("Id") + .HasName("pk_reactionroles"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); - b.ToTable("reactionroles", (string)null); - }); + b.ToTable("reactionroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); + b.Property("IsPrivate") + .HasColumnType("boolean") + .HasColumnName("isprivate"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); + b.Property("ServerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("serverid"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); + b.Property("When") + .HasColumnType("timestamp without time zone") + .HasColumnName("when"); - b.HasKey("Id") - .HasName("pk_reminders"); + b.HasKey("Id") + .HasName("pk_reminders"); - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); - b.ToTable("reminders", (string)null); - }); + b.ToTable("reminders", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); + b.Property("Interval") + .HasColumnType("interval") + .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); + b.Property("LastMessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("lastmessageid"); - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); + b.Property("NoRedundant") + .HasColumnType("boolean") + .HasColumnName("noredundant"); - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); + b.Property("StartTimeOfDay") + .HasColumnType("interval") + .HasColumnName("starttimeofday"); - b.HasKey("Id") - .HasName("pk_repeaters"); + b.HasKey("Id") + .HasName("pk_repeaters"); - b.ToTable("repeaters", (string)null); - }); + b.ToTable("repeaters", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); + b.Property("LastReward") + .HasColumnType("timestamp without time zone") + .HasColumnName("lastreward"); - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); + b.Property("PlatformUserId") + .HasColumnType("text") + .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_rewardedusers"); + b.HasKey("Id") + .HasName("pk_rewardedusers"); - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); - b.ToTable("rewardedusers", (string)null); - }); + b.ToTable("rewardedusers", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); + b.Property("Status") + .HasColumnType("text") + .HasColumnName("status"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_rotatingstatus"); + b.HasKey("Id") + .HasName("pk_rotatingstatus"); - b.ToTable("rotatingstatus", (string)null); - }); + b.ToTable("rotatingstatus", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); + b.Property("LevelRequirement") + .HasColumnType("integer") + .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_selfassignableroles"); + b.HasKey("Id") + .HasName("pk_selfassignableroles"); - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - b.ToTable("selfassignableroles", (string)null); - }); + b.ToTable("selfassignableroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); + b.Property("AuthorId") + .HasColumnType("numeric(20,0)") + .HasColumnName("authorid"); - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); + b.Property("Command") + .HasColumnType("text") + .HasColumnName("command"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); + b.Property("Index") + .HasColumnType("integer") + .HasColumnName("index"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("integer") + .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); + b.Property("RoleName") + .HasColumnType("text") + .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); + b.Property("RoleRequirement") + .HasColumnType("numeric(20,0)") + .HasColumnName("rolerequirement"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_shopentry"); + b.HasKey("Id") + .HasName("pk_shopentry"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); - b.ToTable("shopentry", (string)null); - }); + b.ToTable("shopentry", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); + b.Property("ShopEntryId") + .HasColumnType("integer") + .HasColumnName("shopentryid"); - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); + b.Property("Text") + .HasColumnType("text") + .HasColumnName("text"); - b.HasKey("Id") - .HasName("pk_shopentryitem"); + b.HasKey("Id") + .HasName("pk_shopentryitem"); - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); - b.ToTable("shopentryitem", (string)null); - }); + b.ToTable("shopentryitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - b.ToTable("slowmodeignoredrole", (string)null); - }); + b.ToTable("slowmodeignoredrole", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - b.ToTable("slowmodeignoreduser", (string)null); - }); + b.ToTable("slowmodeignoreduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); + b.Property("RoleIds") + .HasColumnType("text") + .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_stickyroles"); + b.HasKey("Id") + .HasName("pk_stickyroles"); - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); - b.ToTable("stickyroles", (string)null); - }); + b.ToTable("stickyroles", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); + b.Property("MessageId") + .HasColumnType("numeric(20,0)") + .HasColumnName("messageid"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("type"); - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); - b.ToTable("streamonlinemessages", (string)null); - }); + b.ToTable("streamonlinemessages", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - b.ToTable("streamroleblacklisteduser", (string)null); - }); + b.ToTable("streamroleblacklisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); + b.Property("AddRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("addroleid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); + b.Property("Enabled") + .HasColumnType("boolean") + .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); + b.Property("FromRoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("fromroleid"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); + b.Property("Keyword") + .HasColumnType("text") + .HasColumnName("keyword"); - b.HasKey("Id") - .HasName("pk_streamrolesettings"); + b.HasKey("Id") + .HasName("pk_streamrolesettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - b.ToTable("streamrolesettings", (string)null); - }); + b.ToTable("streamrolesettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); + b.Property("StreamRoleSettingsId") + .HasColumnType("integer") + .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); + b.Property("Username") + .HasColumnType("text") + .HasColumnName("username"); - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - b.ToTable("streamrolewhitelisteduser", (string)null); - }); + b.ToTable("streamrolewhitelisteduser", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); + b.Property("ArchiveId") + .HasColumnType("integer") + .HasColumnName("archiveid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); + b.Property("IsDone") + .HasColumnType("boolean") + .HasColumnName("isdone"); - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); + b.Property("Todo") + .HasColumnType("text") + .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_todos"); + b.HasKey("Id") + .HasName("pk_todos"); - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); - b.ToTable("todos", (string)null); - }); + b.ToTable("todos", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unbantimer"); + b.HasKey("Id") + .HasName("pk_unbantimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); - b.ToTable("unbantimer", (string)null); - }); + b.ToTable("unbantimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); + b.Property("UnmuteAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unmutetimer"); + b.HasKey("Id") + .HasName("pk_unmutetimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); - b.ToTable("unmutetimer", (string)null); - }); + b.ToTable("unmutetimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); + b.Property("UnbanAt") + .HasColumnType("timestamp without time zone") + .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_unroletimer"); + b.HasKey("Id") + .HasName("pk_unroletimer"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); - b.ToTable("unroletimer", (string)null); - }); + b.ToTable("unroletimer", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); + b.Property("NotifyOnLevelUp") + .HasColumnType("integer") + .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); - b.HasKey("Id") - .HasName("pk_userxpstats"); + b.HasKey("Id") + .HasName("pk_userxpstats"); - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); - b.ToTable("userxpstats", (string)null); - }); + b.ToTable("userxpstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); + b.Property("VoiceChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("voicechannelid"); - b.HasKey("Id") - .HasName("pk_vcroleinfo"); + b.HasKey("Id") + .HasName("pk_vcroleinfo"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - b.ToTable("vcroleinfo", (string)null); - }); + b.ToTable("vcroleinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); + b.Property("AffinityId") + .HasColumnType("integer") + .HasColumnName("affinityid"); - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); + b.Property("ClaimerId") + .HasColumnType("integer") + .HasColumnName("claimerid"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); + b.Property("WaifuId") + .HasColumnType("integer") + .HasColumnName("waifuid"); - b.HasKey("Id") - .HasName("pk_waifuinfo"); + b.HasKey("Id") + .HasName("pk_waifuinfo"); - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); - b.ToTable("waifuinfo", (string)null); - }); + b.ToTable("waifuinfo", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); + b.Property("ItemEmoji") + .HasColumnType("text") + .HasColumnName("itememoji"); - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); + b.Property("WaifuInfoId") + .HasColumnType("integer") + .HasColumnName("waifuinfoid"); - b.HasKey("Id") - .HasName("pk_waifuitem"); + b.HasKey("Id") + .HasName("pk_waifuitem"); - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); - b.ToTable("waifuitem", (string)null); - }); + b.ToTable("waifuitem", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); + b.Property("NewId") + .HasColumnType("integer") + .HasColumnName("newid"); - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); + b.Property("OldId") + .HasColumnType("integer") + .HasColumnName("oldid"); - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); + b.Property("UpdateType") + .HasColumnType("integer") + .HasColumnName("updatetype"); - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("integer") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_waifuupdates"); + b.HasKey("Id") + .HasName("pk_waifuupdates"); - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); - b.ToTable("waifuupdates", (string)null); - }); + b.ToTable("waifuupdates", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); + b.Property("Forgiven") + .HasColumnType("boolean") + .HasColumnName("forgiven"); - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); + b.Property("ForgivenBy") + .HasColumnType("text") + .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); + b.Property("Moderator") + .HasColumnType("text") + .HasColumnName("moderator"); - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); + b.Property("Reason") + .HasColumnType("text") + .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); - b.HasKey("Id") - .HasName("pk_warnings"); + b.HasKey("Id") + .HasName("pk_warnings"); - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); - b.ToTable("warnings", (string)null); - }); + b.ToTable("warnings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("count"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); + b.Property("Punishment") + .HasColumnType("integer") + .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); + b.Property("Time") + .HasColumnType("integer") + .HasColumnName("time"); - b.HasKey("Id") - .HasName("pk_warningpunishment"); + b.HasKey("Id") + .HasName("pk_warningpunishment"); - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); - b.ToTable("warningpunishment", (string)null); - }); + b.ToTable("warningpunishment", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); + b.Property("Amount") + .HasColumnType("integer") + .HasColumnName("amount"); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - b.ToTable("xpcurrencyreward", (string)null); - }); + b.ToTable("xpcurrencyreward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); + b.Property("Remove") + .HasColumnType("boolean") + .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); + b.Property("RoleId") + .HasColumnType("numeric(20,0)") + .HasColumnName("roleid"); - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); + b.Property("XpSettingsId") + .HasColumnType("integer") + .HasColumnName("xpsettingsid"); - b.HasKey("Id") - .HasName("pk_xprolereward"); + b.HasKey("Id") + .HasName("pk_xprolereward"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - b.ToTable("xprolereward", (string)null); - }); + b.ToTable("xprolereward", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); + b.Property("ServerExcluded") + .HasColumnType("boolean") + .HasColumnName("serverexcluded"); - b.HasKey("Id") - .HasName("pk_xpsettings"); + b.HasKey("Id") + .HasName("pk_xpsettings"); - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); - b.ToTable("xpsettings", (string)null); - }); + b.ToTable("xpsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); + b.Property("IsUsing") + .HasColumnType("boolean") + .HasColumnName("isusing"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("text") + .HasColumnName("itemkey"); - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); + b.Property("ItemType") + .HasColumnType("integer") + .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - b.ToTable("xpshopowneditem", (string)null); - }); + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AutoDeleteTimer") + .HasColumnType("integer") + .HasColumnName("autodeletetimer"); + + b.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); + + b.Property("GreetType") + .HasColumnType("integer") + .HasColumnName("greettype"); + + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + b.Property("IsEnabled") + .HasColumnType("boolean") + .HasColumnName("isenabled"); + + b.Property("MessageText") + .HasColumnType("text") + .HasColumnName("messagetext"); + + b.HasKey("Id") + .HasName("pk_greetsettings"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique() + .HasDatabaseName("ix_greetsettings_guildid_greettype"); + + b.ToTable("greetsettings", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs new file mode 100644 index 0000000..54ccb84 --- /dev/null +++ b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs @@ -0,0 +1,2925 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Db; + +#nullable disable + +namespace EllieBot.Migrations +{ + [DbContext(typeof(SqliteContext))] + [Migration("20240911104847_greet-settings")] + partial class greetsettings + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Action") + .HasColumnType("INTEGER"); + + b.Property("ActionDurationMinutes") + .HasColumnType("INTEGER"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("MinAge") + .HasColumnType("TEXT"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiAltSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Action") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("PunishDuration") + .HasColumnType("INTEGER"); + + b.Property("Seconds") + .HasColumnType("INTEGER"); + + b.Property("UserThreshold") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AntiSpamSettingId") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Action") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("MessageThreshold") + .HasColumnType("INTEGER"); + + b.Property("MuteTime") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("TodosArchive"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("ChannelName") + .HasColumnType("TEXT"); + + b.Property("CommandText") + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("GuildName") + .HasColumnType("TEXT"); + + b.Property("Interval") + .HasColumnType("INTEGER"); + + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); + + b.Property("VoiceChannelName") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("AutoCommands"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.ToTable("AutoPublishChannel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoDelete") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ChannelId") + .IsUnique(); + + b.HasIndex("GuildId"); + + b.ToTable("AutoTranslateChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Source") + .HasColumnType("TEXT"); + + b.Property("Target") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasAlternateKey("ChannelId", "UserId"); + + b.ToTable("AutoTranslateUsers"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("PruneDays") + .HasColumnType("INTEGER"); + + b.Property("Text") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.ToTable("BanTemplates"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Balance") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("BankUsers"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("ItemId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Blacklist"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubApplicants"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubBans"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("ImageUrl") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("TEXT"); + + b.Property("OwnerId") + .HasColumnType("INTEGER"); + + b.Property("Xp") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.HasIndex("OwnerId") + .IsUnique(); + + b.ToTable("Clubs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Mapping") + .HasColumnType("TEXT"); + + b.Property("Trigger") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CommandName") + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Seconds") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Note") + .HasColumnType("TEXT"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("State") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("DelMsgOnCmdChannel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Command") + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Perm") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "Command") + .IsUnique(); + + b.ToTable("DiscordPermOverrides"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AvatarId") + .HasColumnType("TEXT"); + + b.Property("ClubId") + .HasColumnType("INTEGER"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Discriminator") + .HasColumnType("TEXT"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Username") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.HasIndex("ClubId"); + + b.HasIndex("CurrencyAmount"); + + b.HasIndex("TotalXp"); + + b.HasIndex("UserId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("ItemId") + .HasColumnType("INTEGER"); + + b.Property("ItemType") + .HasColumnType("INTEGER"); + + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("ExcludedItem"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("Url") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildConfigId", "Url"); + + b.ToTable("FeedSub"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilterLinksChannelId"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilterWordsChannelId"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Word") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("Username") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Bet") + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Feature") + .HasColumnType("TEXT"); + + b.Property("PaidOut") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Feature") + .IsUnique(); + + b.ToTable("GamblingStats"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("EndsAt") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("MessageId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("GiveawayModel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("GiveawayId") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GiveawayId", "UserId") + .IsUnique(); + + b.ToTable("GiveawayUser"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("Number") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique(); + + b.ToTable("GroupName"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("TEXT"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("INTEGER"); + + b.Property("CleverbotEnabled") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("INTEGER"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("INTEGER"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("INTEGER"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("INTEGER"); + + b.Property("FilterInvites") + .HasColumnType("INTEGER"); + + b.Property("FilterLinks") + .HasColumnType("INTEGER"); + + b.Property("FilterWords") + .HasColumnType("INTEGER"); + + b.Property("GameVoiceChannel") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Locale") + .HasColumnType("TEXT"); + + b.Property("MuteRoleName") + .HasColumnType("TEXT"); + + b.Property("NotifyStreamOffline") + .HasColumnType("INTEGER"); + + b.Property("PermissionRole") + .HasColumnType("TEXT"); + + b.Property("Prefix") + .HasColumnType("TEXT"); + + b.Property("StickyRoles") + .HasColumnType("INTEGER"); + + b.Property("TimeZoneId") + .HasColumnType("TEXT"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(true); + + b.Property("VerbosePermissions") + .HasColumnType("INTEGER"); + + b.Property("WarnExpireAction") + .HasColumnType("INTEGER"); + + b.Property("WarnExpireHours") + .HasColumnType("INTEGER"); + + b.Property("WarningsInitialized") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("WarnExpireHours"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.HasKey("GuildId"); + + b.ToTable("HoneyPotChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("INTEGER"); + + b.Property("LogItemId") + .HasColumnType("INTEGER"); + + b.Property("LogSettingId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique(); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ChannelId") + .IsUnique(); + + b.ToTable("ImageOnlyChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelCreatedId") + .HasColumnType("INTEGER"); + + b.Property("ChannelDestroyedId") + .HasColumnType("INTEGER"); + + b.Property("ChannelUpdatedId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("LogOtherId") + .HasColumnType("INTEGER"); + + b.Property("LogUserPresenceId") + .HasColumnType("INTEGER"); + + b.Property("LogVoicePresenceId") + .HasColumnType("INTEGER"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("INTEGER"); + + b.Property("LogWarnsId") + .HasColumnType("INTEGER"); + + b.Property("MessageDeletedId") + .HasColumnType("INTEGER"); + + b.Property("MessageUpdatedId") + .HasColumnType("INTEGER"); + + b.Property("ThreadCreatedId") + .HasColumnType("INTEGER"); + + b.Property("ThreadDeletedId") + .HasColumnType("INTEGER"); + + b.Property("UserBannedId") + .HasColumnType("INTEGER"); + + b.Property("UserJoinedId") + .HasColumnType("INTEGER"); + + b.Property("UserLeftId") + .HasColumnType("INTEGER"); + + b.Property("UserMutedId") + .HasColumnType("INTEGER"); + + b.Property("UserUnbannedId") + .HasColumnType("INTEGER"); + + b.Property("UserUpdatedId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoDisconnect") + .HasColumnType("INTEGER"); + + b.Property("AutoPlay") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("MusicChannelId") + .HasColumnType("INTEGER"); + + b.Property("PlayerRepeat") + .HasColumnType("INTEGER"); + + b.Property("QualityPreset") + .HasColumnType("INTEGER"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(100); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.ToTable("MusicPlayerSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .HasColumnType("TEXT"); + + b.Property("AuthorId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowTarget") + .HasColumnType("INTEGER"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("INTEGER"); + + b.Property("ContainsAnywhere") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("DmResponse") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Reactions") + .HasColumnType("TEXT"); + + b.Property("Response") + .HasColumnType("TEXT"); + + b.Property("Trigger") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Expressions"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AmountCents") + .HasColumnType("INTEGER"); + + b.Property("LastCharge") + .HasColumnType("TEXT"); + + b.Property("UniquePlatformUserId") + .HasColumnType("TEXT"); + + b.Property("ValidThru") + .HasColumnType("TEXT"); + + b.HasKey("UserId"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique(); + + b.ToTable("Patrons"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsCustomCommand") + .HasColumnType("INTEGER"); + + b.Property("PrimaryTarget") + .HasColumnType("INTEGER"); + + b.Property("PrimaryTargetId") + .HasColumnType("INTEGER"); + + b.Property("SecondaryTarget") + .HasColumnType("INTEGER"); + + b.Property("SecondaryTargetName") + .HasColumnType("TEXT"); + + b.Property("State") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissions"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("MessageId") + .HasColumnType("INTEGER"); + + b.Property("Password") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ChannelId"); + + b.HasIndex("MessageId") + .IsUnique(); + + b.ToTable("PlantedCurrency"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("MusicPlaylistId") + .HasColumnType("INTEGER"); + + b.Property("Provider") + .HasColumnType("TEXT"); + + b.Property("ProviderType") + .HasColumnType("INTEGER"); + + b.Property("Query") + .HasColumnType("TEXT"); + + b.Property("Title") + .HasColumnType("TEXT"); + + b.Property("Uri") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AuthorId") + .HasColumnType("INTEGER"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Text") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId"); + + b.HasIndex("Keyword"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Group") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("LevelReq") + .HasColumnType("INTEGER"); + + b.Property("MessageId") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId"); + + b.HasIndex("MessageId", "Emote") + .IsUnique(); + + b.ToTable("ReactionRoles"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("IsPrivate") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("ServerId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("When") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("When"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Interval") + .HasColumnType("TEXT"); + + b.Property("LastMessageId") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("NoRedundant") + .HasColumnType("INTEGER"); + + b.Property("StartTimeOfDay") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Repeaters"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("LastReward") + .HasColumnType("TEXT"); + + b.Property("PlatformUserId") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("PlatformUserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Status") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("RotatingStatus"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("LevelRequirement") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AuthorId") + .HasColumnType("INTEGER"); + + b.Property("Command") + .HasColumnType("TEXT"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("RoleName") + .HasColumnType("TEXT"); + + b.Property("RoleRequirement") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("ShopEntryId") + .HasColumnType("INTEGER"); + + b.Property("Text") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("RoleIds") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "UserId") + .IsUnique(); + + b.ToTable("StickyRoles"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("MessageId") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("StreamOnlineMessages"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Username") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleBlacklistedUser"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AddRoleId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("FromRoleId") + .HasColumnType("INTEGER"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Keyword") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Username") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleWhitelistedUser"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArchiveId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("IsDone") + .HasColumnType("INTEGER"); + + b.Property("Todo") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ArchiveId"); + + b.HasIndex("UserId"); + + b.ToTable("Todos"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("UnbanAt") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnbanTimer"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("UnmuteAt") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("UnbanAt") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnroleTimer"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AwardedXp") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Xp") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("AwardedXp"); + + b.HasIndex("GuildId"); + + b.HasIndex("UserId"); + + b.HasIndex("Xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique(); + + b.ToTable("UserXpStats"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AffinityId") + .HasColumnType("INTEGER"); + + b.Property("ClaimerId") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("INTEGER"); + + b.Property("WaifuId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("Price"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("ItemEmoji") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("WaifuInfoId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("WaifuInfoId"); + + b.ToTable("WaifuItem"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("NewId") + .HasColumnType("INTEGER"); + + b.Property("OldId") + .HasColumnType("INTEGER"); + + b.Property("UpdateType") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Forgiven") + .HasColumnType("INTEGER"); + + b.Property("ForgivenBy") + .HasColumnType("TEXT"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Moderator") + .HasColumnType("TEXT"); + + b.Property("Reason") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(1L); + + b.HasKey("Id"); + + b.HasIndex("DateAdded"); + + b.HasIndex("GuildId"); + + b.HasIndex("UserId"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Count") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("Punishment") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("Time") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Amount") + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Level") + .HasColumnType("INTEGER"); + + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("XpCurrencyReward"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("Level") + .HasColumnType("INTEGER"); + + b.Property("Remove") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); + + b.ToTable("XpRoleReward"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); + + b.Property("ServerExcluded") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("IsUsing") + .HasColumnType("INTEGER"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ItemType") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique(); + + b.ToTable("XpShopOwnedItem"); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoDeleteTimer") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("GreetType") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("IsEnabled") + .HasColumnType("INTEGER"); + + b.Property("MessageText") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique(); + + b.ToTable("GreetSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StreamRoleSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Navigation("Participants"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs new file mode 100644 index 0000000..12448ba --- /dev/null +++ b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs @@ -0,0 +1,219 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations +{ + /// + public partial class greetsettings : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "GreetSettings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + GuildId = table.Column(type: "INTEGER", nullable: false), + GreetType = table.Column(type: "INTEGER", nullable: false), + MessageText = table.Column(type: "TEXT", nullable: true), + IsEnabled = table.Column(type: "INTEGER", nullable: false), + ChannelId = table.Column(type: "INTEGER", nullable: true), + AutoDeleteTimer = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GreetSettings", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_GreetSettings_GuildId_GreetType", + table: "GreetSettings", + columns: new[] { "GuildId", "GreetType" }, + unique: true); + + + migrationBuilder.Sql(""" + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer + FROM GuildConfigs + WHERE SendChannelGreetMessage = 1; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0 + FROM GuildConfigs + WHERE SendDmGreetMessage = 1; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer + FROM GuildConfigs + WHERE SendChannelByeMessage = 1; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter + FROM GuildConfigs + WHERE SendBoostMessage = 1; + """); + + + migrationBuilder.DropColumn( + name: "AutoDeleteByeMessagesTimer", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "AutoDeleteGreetMessagesTimer", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "BoostMessage", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "BoostMessageChannelId", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "BoostMessageDeleteAfter", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "ByeMessageChannelId", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "ChannelByeMessageText", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "ChannelGreetMessageText", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "DmGreetMessageText", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "GreetMessageChannelId", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "SendBoostMessage", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "SendChannelByeMessage", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "SendChannelGreetMessage", + table: "GuildConfigs"); + + migrationBuilder.DropColumn( + name: "SendDmGreetMessage", + table: "GuildConfigs"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "GreetSettings"); + + migrationBuilder.AddColumn( + name: "AutoDeleteByeMessagesTimer", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "AutoDeleteGreetMessagesTimer", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "BoostMessage", + table: "GuildConfigs", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "BoostMessageChannelId", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "BoostMessageDeleteAfter", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "ByeMessageChannelId", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "ChannelByeMessageText", + table: "GuildConfigs", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "ChannelGreetMessageText", + table: "GuildConfigs", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "DmGreetMessageText", + table: "GuildConfigs", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "GreetMessageChannelId", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: 0ul); + + migrationBuilder.AddColumn( + name: "SendBoostMessage", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "SendChannelByeMessage", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "SendChannelGreetMessage", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "SendDmGreetMessage", + table: "GuildConfigs", + type: "INTEGER", + nullable: false, + defaultValue: false); + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs index 0b6c04d..0891194 100644 --- a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs @@ -15,2917 +15,2907 @@ namespace EllieBot.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); + modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); + b.Property("ActionDurationMinutes") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MinAge") - .HasColumnType("TEXT"); + b.Property("MinAge") + .HasColumnType("TEXT"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiAltSetting"); - }); + b.ToTable("AntiAltSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("PunishDuration") - .HasColumnType("INTEGER"); + b.Property("PunishDuration") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.Property("UserThreshold") - .HasColumnType("INTEGER"); + b.Property("UserThreshold") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiRaidSetting"); - }); + b.ToTable("AntiRaidSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); + b.Property("AntiSpamSettingId") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AntiSpamSettingId"); + b.HasIndex("AntiSpamSettingId"); - b.ToTable("AntiSpamIgnore"); - }); + b.ToTable("AntiSpamIgnore"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Action") - .HasColumnType("INTEGER"); + b.Property("Action") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); + b.Property("MessageThreshold") + .HasColumnType("INTEGER"); - b.Property("MuteTime") - .HasColumnType("INTEGER"); + b.Property("MuteTime") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("AntiSpamSetting"); - }); + b.ToTable("AntiSpamSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("TodosArchive"); - }); + b.ToTable("TodosArchive"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("ChannelName") - .HasColumnType("TEXT"); + b.Property("ChannelName") + .HasColumnType("TEXT"); - b.Property("CommandText") - .HasColumnType("TEXT"); + b.Property("CommandText") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("GuildName") - .HasColumnType("TEXT"); + b.Property("GuildName") + .HasColumnType("TEXT"); - b.Property("Interval") - .HasColumnType("INTEGER"); + b.Property("Interval") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); + b.Property("VoiceChannelName") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("AutoCommands"); - }); + b.ToTable("AutoCommands"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("AutoPublishChannel"); - }); + b.ToTable("AutoPublishChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDelete") - .HasColumnType("INTEGER"); + b.Property("AutoDelete") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.ToTable("AutoTranslateChannels"); - }); + b.ToTable("AutoTranslateChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Source") - .HasColumnType("TEXT"); + b.Property("Source") + .HasColumnType("TEXT"); - b.Property("Target") - .HasColumnType("TEXT"); + b.Property("Target") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("ChannelId", "UserId"); + b.HasAlternateKey("ChannelId", "UserId"); - b.ToTable("AutoTranslateUsers"); - }); + b.ToTable("AutoTranslateUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("PruneDays") - .HasColumnType("INTEGER"); + b.Property("PruneDays") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("BanTemplates"); - }); + b.ToTable("BanTemplates"); + }); modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Balance") - .HasColumnType("INTEGER"); + b.Property("Balance") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId") - .IsUnique(); + b.HasIndex("UserId") + .IsUnique(); - b.ToTable("BankUsers"); - }); + b.ToTable("BankUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Blacklist"); - }); + b.ToTable("Blacklist"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubApplicants"); - }); + b.ToTable("ClubApplicants"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); + { + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("ClubId", "UserId"); + b.HasKey("ClubId", "UserId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("ClubBans"); - }); + b.ToTable("ClubBans"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Description") - .HasColumnType("TEXT"); + b.Property("Description") + .HasColumnType("TEXT"); - b.Property("ImageUrl") - .HasColumnType("TEXT"); + b.Property("ImageUrl") + .HasColumnType("TEXT"); - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("TEXT"); - b.Property("OwnerId") - .HasColumnType("INTEGER"); + b.Property("OwnerId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Name") - .IsUnique(); + b.HasIndex("Name") + .IsUnique(); - b.HasIndex("OwnerId") - .IsUnique(); + b.HasIndex("OwnerId") + .IsUnique(); - b.ToTable("Clubs"); - }); + b.ToTable("Clubs"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Mapping") - .HasColumnType("TEXT"); + b.Property("Mapping") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandAlias"); - }); + b.ToTable("CommandAlias"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("CommandName") - .HasColumnType("TEXT"); + b.Property("CommandName") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Seconds") - .HasColumnType("INTEGER"); + b.Property("Seconds") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("CommandCooldown"); - }); + b.ToTable("CommandCooldown"); + }); modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Extra") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Note") - .HasColumnType("TEXT"); + b.Property("Note") + .HasColumnType("TEXT"); - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValueSql("NULL"); - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Type") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("CurrencyTransactions"); - }); + b.ToTable("CurrencyTransactions"); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("DelMsgOnCmdChannel"); - }); + b.ToTable("DelMsgOnCmdChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Perm") - .HasColumnType("INTEGER"); + b.Property("Perm") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "Command") - .IsUnique(); + b.HasIndex("GuildId", "Command") + .IsUnique(); - b.ToTable("DiscordPermOverrides"); - }); + b.ToTable("DiscordPermOverrides"); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AvatarId") - .HasColumnType("TEXT"); + b.Property("AvatarId") + .HasColumnType("TEXT"); - b.Property("ClubId") - .HasColumnType("INTEGER"); + b.Property("ClubId") + .HasColumnType("INTEGER"); - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Discriminator") - .HasColumnType("TEXT"); + b.Property("Discriminator") + .HasColumnType("TEXT"); - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("UserId"); + b.HasAlternateKey("UserId"); - b.HasIndex("ClubId"); + b.HasIndex("ClubId"); - b.HasIndex("CurrencyAmount"); + b.HasIndex("CurrencyAmount"); - b.HasIndex("TotalXp"); + b.HasIndex("TotalXp"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("DiscordUser"); - }); + b.ToTable("DiscordUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemId") - .HasColumnType("INTEGER"); + b.Property("ItemId") + .HasColumnType("INTEGER"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("ExcludedItem"); - }); + b.ToTable("ExcludedItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Url") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasAlternateKey("GuildConfigId", "Url"); + b.HasAlternateKey("GuildConfigId", "Url"); - b.ToTable("FeedSub"); - }); + b.ToTable("FeedSub"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterChannelId"); - }); + b.ToTable("FilterChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterLinksChannelId"); - }); + b.ToTable("FilterLinksChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilterWordsChannelId"); - }); + b.ToTable("FilterWordsChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Word") - .HasColumnType("TEXT"); + b.Property("Word") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FilteredWord"); - }); + b.ToTable("FilteredWord"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("FollowedStream"); - }); + b.ToTable("FollowedStream"); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("GCChannelId"); - }); + b.ToTable("GCChannelId"); + }); modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Bet") - .HasColumnType("TEXT"); + b.Property("Bet") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Feature") - .HasColumnType("TEXT"); + b.Property("Feature") + .HasColumnType("TEXT"); - b.Property("PaidOut") - .HasColumnType("TEXT"); + b.Property("PaidOut") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Feature") - .IsUnique(); + b.HasIndex("Feature") + .IsUnique(); - b.ToTable("GamblingStats"); - }); + b.ToTable("GamblingStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("EndsAt") - .HasColumnType("TEXT"); + b.Property("EndsAt") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("GiveawayModel"); - }); + b.ToTable("GiveawayModel"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("GiveawayId") - .HasColumnType("INTEGER"); + b.Property("GiveawayId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); + b.HasIndex("GiveawayId", "UserId") + .IsUnique(); - b.ToTable("GiveawayUser"); - }); + b.ToTable("GiveawayUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Number") - .HasColumnType("INTEGER"); + b.Property("Number") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); + b.HasIndex("GuildConfigId", "Number") + .IsUnique(); - b.ToTable("GroupName"); - }); + b.ToTable("GroupName"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); + b.Property("AutoAssignRoleIds") + .HasColumnType("TEXT"); - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); + b.Property("CleverbotEnabled") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("BoostMessage") - .HasColumnType("TEXT"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("INTEGER"); - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("INTEGER"); - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); + b.Property("DisableGlobalExpressions") + .HasColumnType("INTEGER"); - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("INTEGER"); - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); + b.Property("FilterInvites") + .HasColumnType("INTEGER"); - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); + b.Property("FilterLinks") + .HasColumnType("INTEGER"); - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); + b.Property("FilterWords") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("GameVoiceChannel") + .HasColumnType("INTEGER"); - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); + b.Property("Locale") + .HasColumnType("TEXT"); - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); + b.Property("MuteRoleName") + .HasColumnType("TEXT"); - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); + b.Property("NotifyStreamOffline") + .HasColumnType("INTEGER"); - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); + b.Property("PermissionRole") + .HasColumnType("TEXT"); - b.Property("FilterInvites") - .HasColumnType("INTEGER"); + b.Property("Prefix") + .HasColumnType("TEXT"); - b.Property("FilterLinks") - .HasColumnType("INTEGER"); + b.Property("StickyRoles") + .HasColumnType("INTEGER"); - b.Property("FilterWords") - .HasColumnType("INTEGER"); + b.Property("TimeZoneId") + .HasColumnType("TEXT"); - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(true); - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); + b.Property("VerbosePermissions") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("WarnExpireAction") + .HasColumnType("INTEGER"); - b.Property("Locale") - .HasColumnType("TEXT"); + b.Property("WarnExpireHours") + .HasColumnType("INTEGER"); - b.Property("MuteRoleName") - .HasColumnType("TEXT"); + b.Property("WarningsInitialized") + .HasColumnType("INTEGER"); - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); + b.HasKey("Id"); - b.Property("PermissionRole") - .HasColumnType("TEXT"); + b.HasIndex("GuildId") + .IsUnique(); - b.Property("Prefix") - .HasColumnType("TEXT"); + b.HasIndex("WarnExpireHours"); - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); + b.ToTable("GuildConfigs"); + }); modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("GuildId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.HasKey("GuildId"); + b.HasKey("GuildId"); - b.ToTable("HoneyPotChannels"); - }); + b.ToTable("HoneyPotChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("LogItemId") - .HasColumnType("INTEGER"); + b.Property("LogItemId") + .HasColumnType("INTEGER"); - b.Property("LogSettingId") - .HasColumnType("INTEGER"); + b.Property("LogSettingId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique(); - b.ToTable("IgnoredLogChannels"); - }); + b.ToTable("IgnoredLogChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId") - .IsUnique(); + b.HasIndex("ChannelId") + .IsUnique(); - b.ToTable("ImageOnlyChannels"); - }); + b.ToTable("ImageOnlyChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelCreatedId") + .HasColumnType("INTEGER"); - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); + b.Property("ChannelDestroyedId") + .HasColumnType("INTEGER"); - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); + b.Property("ChannelUpdatedId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LogOtherId") - .HasColumnType("INTEGER"); + b.Property("LogOtherId") + .HasColumnType("INTEGER"); - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); + b.Property("LogUserPresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceId") + .HasColumnType("INTEGER"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); + b.Property("LogVoicePresenceTTSId") + .HasColumnType("INTEGER"); - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); + b.Property("LogWarnsId") + .HasColumnType("INTEGER"); - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); + b.Property("MessageDeletedId") + .HasColumnType("INTEGER"); - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); + b.Property("MessageUpdatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); + b.Property("ThreadCreatedId") + .HasColumnType("INTEGER"); - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); + b.Property("ThreadDeletedId") + .HasColumnType("INTEGER"); - b.Property("UserBannedId") - .HasColumnType("INTEGER"); + b.Property("UserBannedId") + .HasColumnType("INTEGER"); - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); + b.Property("UserJoinedId") + .HasColumnType("INTEGER"); - b.Property("UserLeftId") - .HasColumnType("INTEGER"); + b.Property("UserLeftId") + .HasColumnType("INTEGER"); - b.Property("UserMutedId") - .HasColumnType("INTEGER"); + b.Property("UserMutedId") + .HasColumnType("INTEGER"); - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); + b.Property("UserUnbannedId") + .HasColumnType("INTEGER"); - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); + b.Property("UserUpdatedId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("LogSettings"); - }); + b.ToTable("LogSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); + b.Property("AutoDisconnect") + .HasColumnType("INTEGER"); - b.Property("AutoPlay") - .HasColumnType("INTEGER"); + b.Property("AutoPlay") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); + b.Property("MusicChannelId") + .HasColumnType("INTEGER"); - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); + b.Property("PlayerRepeat") + .HasColumnType("INTEGER"); - b.Property("QualityPreset") - .HasColumnType("INTEGER"); + b.Property("QualityPreset") + .HasColumnType("INTEGER"); - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(100); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId") - .IsUnique(); + b.HasIndex("GuildId") + .IsUnique(); - b.ToTable("MusicPlayerSettings"); - }); + b.ToTable("MusicPlayerSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Author") - .HasColumnType("TEXT"); + b.Property("Author") + .HasColumnType("TEXT"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("MusicPlaylists"); - }); + b.ToTable("MusicPlaylists"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("MutedUserId"); - }); + b.ToTable("MutedUserId"); + }); modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AllowTarget") - .HasColumnType("INTEGER"); + b.Property("AllowTarget") + .HasColumnType("INTEGER"); - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); + b.Property("AutoDeleteTrigger") + .HasColumnType("INTEGER"); - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); + b.Property("ContainsAnywhere") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("DmResponse") - .HasColumnType("INTEGER"); + b.Property("DmResponse") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Reactions") - .HasColumnType("TEXT"); + b.Property("Reactions") + .HasColumnType("TEXT"); - b.Property("Response") - .HasColumnType("TEXT"); + b.Property("Response") + .HasColumnType("TEXT"); - b.Property("Trigger") - .HasColumnType("TEXT"); + b.Property("Trigger") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Expressions"); - }); + b.ToTable("Expressions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountCents") - .HasColumnType("INTEGER"); + b.Property("AmountCents") + .HasColumnType("INTEGER"); - b.Property("LastCharge") - .HasColumnType("TEXT"); + b.Property("LastCharge") + .HasColumnType("TEXT"); - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); + b.Property("UniquePlatformUserId") + .HasColumnType("TEXT"); - b.Property("ValidThru") - .HasColumnType("TEXT"); + b.Property("ValidThru") + .HasColumnType("TEXT"); - b.HasKey("UserId"); + b.HasKey("UserId"); - b.HasIndex("UniquePlatformUserId") - .IsUnique(); + b.HasIndex("UniquePlatformUserId") + .IsUnique(); - b.ToTable("Patrons"); - }); + b.ToTable("Patrons"); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); + b.Property("IsCustomCommand") + .HasColumnType("INTEGER"); - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); + b.Property("PrimaryTarget") + .HasColumnType("INTEGER"); - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); + b.Property("PrimaryTargetId") + .HasColumnType("INTEGER"); - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); + b.Property("SecondaryTarget") + .HasColumnType("INTEGER"); - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); + b.Property("SecondaryTargetName") + .HasColumnType("TEXT"); - b.Property("State") - .HasColumnType("INTEGER"); + b.Property("State") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("Permissions"); - }); + b.ToTable("Permissions"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Password") - .HasColumnType("TEXT"); + b.Property("Password") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ChannelId"); + b.HasIndex("ChannelId"); - b.HasIndex("MessageId") - .IsUnique(); + b.HasIndex("MessageId") + .IsUnique(); - b.ToTable("PlantedCurrency"); - }); + b.ToTable("PlantedCurrency"); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); + b.Property("MusicPlaylistId") + .HasColumnType("INTEGER"); - b.Property("Provider") - .HasColumnType("TEXT"); + b.Property("Provider") + .HasColumnType("TEXT"); - b.Property("ProviderType") - .HasColumnType("INTEGER"); + b.Property("ProviderType") + .HasColumnType("INTEGER"); - b.Property("Query") - .HasColumnType("TEXT"); + b.Property("Query") + .HasColumnType("TEXT"); - b.Property("Title") - .HasColumnType("TEXT"); + b.Property("Title") + .HasColumnType("TEXT"); - b.Property("Uri") - .HasColumnType("TEXT"); + b.Property("Uri") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MusicPlaylistId"); + b.HasIndex("MusicPlaylistId"); - b.ToTable("PlaylistSong"); - }); + b.ToTable("PlaylistSong"); + }); modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("AuthorName") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Keyword") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("Text") + .IsRequired() + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("Keyword"); + b.HasIndex("Keyword"); - b.ToTable("Quotes"); - }); + b.ToTable("Quotes"); + }); modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("TEXT"); - b.Property("Group") - .HasColumnType("INTEGER"); + b.Property("Group") + .HasColumnType("INTEGER"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelReq") - .HasColumnType("INTEGER"); + b.Property("LevelReq") + .HasColumnType("INTEGER"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("MessageId", "Emote") - .IsUnique(); + b.HasIndex("MessageId", "Emote") + .IsUnique(); - b.ToTable("ReactionRoles"); - }); + b.ToTable("ReactionRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsPrivate") - .HasColumnType("INTEGER"); + b.Property("IsPrivate") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("ServerId") - .HasColumnType("INTEGER"); + b.Property("ServerId") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("When") - .HasColumnType("TEXT"); + b.Property("When") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("When"); + b.HasIndex("When"); - b.ToTable("Reminders"); - }); + b.ToTable("Reminders"); + }); modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Interval") - .HasColumnType("TEXT"); + b.Property("Interval") + .HasColumnType("TEXT"); - b.Property("LastMessageId") - .HasColumnType("INTEGER"); + b.Property("LastMessageId") + .HasColumnType("INTEGER"); - b.Property("Message") - .HasColumnType("TEXT"); + b.Property("Message") + .HasColumnType("TEXT"); - b.Property("NoRedundant") - .HasColumnType("INTEGER"); + b.Property("NoRedundant") + .HasColumnType("INTEGER"); - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); + b.Property("StartTimeOfDay") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("Repeaters"); - }); + b.ToTable("Repeaters"); + }); modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); + b.Property("AmountRewardedThisMonth") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("LastReward") - .HasColumnType("TEXT"); + b.Property("LastReward") + .HasColumnType("TEXT"); - b.Property("PlatformUserId") - .HasColumnType("TEXT"); + b.Property("PlatformUserId") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PlatformUserId") - .IsUnique(); + b.HasIndex("PlatformUserId") + .IsUnique(); - b.ToTable("RewardedUsers"); - }); + b.ToTable("RewardedUsers"); + }); modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Status") - .HasColumnType("TEXT"); + b.Property("Status") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("RotatingStatus"); - }); + b.ToTable("RotatingStatus"); + }); modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); + b.Property("LevelRequirement") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "RoleId") - .IsUnique(); + b.HasIndex("GuildId", "RoleId") + .IsUnique(); - b.ToTable("SelfAssignableRoles"); - }); + b.ToTable("SelfAssignableRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AuthorId") - .HasColumnType("INTEGER"); + b.Property("AuthorId") + .HasColumnType("INTEGER"); - b.Property("Command") - .HasColumnType("TEXT"); + b.Property("Command") + .HasColumnType("TEXT"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Index") - .HasColumnType("INTEGER"); + b.Property("Index") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("RoleName") - .HasColumnType("TEXT"); + b.Property("RoleName") + .HasColumnType("TEXT"); - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); + b.Property("RoleRequirement") + .HasColumnType("INTEGER"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("ShopEntry"); - }); + b.ToTable("ShopEntry"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); + b.Property("ShopEntryId") + .HasColumnType("INTEGER"); - b.Property("Text") - .HasColumnType("TEXT"); + b.Property("Text") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ShopEntryId"); + b.HasIndex("ShopEntryId"); - b.ToTable("ShopEntryItem"); - }); + b.ToTable("ShopEntryItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredRole"); - }); + b.ToTable("SlowmodeIgnoredRole"); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("SlowmodeIgnoredUser"); - }); + b.ToTable("SlowmodeIgnoredUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("RoleIds") - .HasColumnType("TEXT"); + b.Property("RoleIds") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildId", "UserId") - .IsUnique(); + b.HasIndex("GuildId", "UserId") + .IsUnique(); - b.ToTable("StickyRoles"); - }); + b.ToTable("StickyRoles"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ChannelId") - .HasColumnType("INTEGER"); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("MessageId") - .HasColumnType("INTEGER"); + b.Property("MessageId") + .HasColumnType("INTEGER"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("Type") - .HasColumnType("INTEGER"); + b.Property("Type") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("StreamOnlineMessages"); - }); + b.ToTable("StreamOnlineMessages"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleBlacklistedUser"); - }); + b.ToTable("StreamRoleBlacklistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AddRoleId") - .HasColumnType("INTEGER"); + b.Property("AddRoleId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Enabled") - .HasColumnType("INTEGER"); + b.Property("Enabled") + .HasColumnType("INTEGER"); - b.Property("FromRoleId") - .HasColumnType("INTEGER"); + b.Property("FromRoleId") + .HasColumnType("INTEGER"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Keyword") - .HasColumnType("TEXT"); + b.Property("Keyword") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("StreamRoleSettings"); - }); + b.ToTable("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); + b.Property("StreamRoleSettingsId") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Username") - .HasColumnType("TEXT"); + b.Property("Username") + .HasColumnType("TEXT"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StreamRoleSettingsId"); + b.HasIndex("StreamRoleSettingsId"); - b.ToTable("StreamRoleWhitelistedUser"); - }); + b.ToTable("StreamRoleWhitelistedUser"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ArchiveId") - .HasColumnType("INTEGER"); + b.Property("ArchiveId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsDone") - .HasColumnType("INTEGER"); + b.Property("IsDone") + .HasColumnType("INTEGER"); - b.Property("Todo") - .HasColumnType("TEXT"); + b.Property("Todo") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ArchiveId"); + b.HasIndex("ArchiveId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Todos"); - }); + b.ToTable("Todos"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnbanTimer"); - }); + b.ToTable("UnbanTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("UnmuteAt") - .HasColumnType("TEXT"); + b.Property("UnmuteAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnmuteTimer"); - }); + b.ToTable("UnmuteTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("UnbanAt") - .HasColumnType("TEXT"); + b.Property("UnbanAt") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("UnroleTimer"); - }); + b.ToTable("UnroleTimer"); + }); modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AwardedXp") - .HasColumnType("INTEGER"); + b.Property("AwardedXp") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); + b.Property("NotifyOnLevelUp") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Xp") - .HasColumnType("INTEGER"); + b.Property("Xp") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AwardedXp"); + b.HasIndex("AwardedXp"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.HasIndex("Xp"); + b.HasIndex("Xp"); - b.HasIndex("UserId", "GuildId") - .IsUnique(); + b.HasIndex("UserId", "GuildId") + .IsUnique(); - b.ToTable("UserXpStats"); - }); + b.ToTable("UserXpStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); + b.Property("VoiceChannelId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("VcRoleInfo"); - }); + b.ToTable("VcRoleInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("AffinityId") - .HasColumnType("INTEGER"); + b.Property("AffinityId") + .HasColumnType("INTEGER"); - b.Property("ClaimerId") - .HasColumnType("INTEGER"); + b.Property("ClaimerId") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Price") - .HasColumnType("INTEGER"); + b.Property("Price") + .HasColumnType("INTEGER"); - b.Property("WaifuId") - .HasColumnType("INTEGER"); + b.Property("WaifuId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AffinityId"); + b.HasIndex("AffinityId"); - b.HasIndex("ClaimerId"); + b.HasIndex("ClaimerId"); - b.HasIndex("Price"); + b.HasIndex("Price"); - b.HasIndex("WaifuId") - .IsUnique(); + b.HasIndex("WaifuId") + .IsUnique(); - b.ToTable("WaifuInfo"); - }); + b.ToTable("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("ItemEmoji") - .HasColumnType("TEXT"); + b.Property("ItemEmoji") + .HasColumnType("TEXT"); - b.Property("Name") - .HasColumnType("TEXT"); + b.Property("Name") + .HasColumnType("TEXT"); - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); + b.Property("WaifuInfoId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("WaifuInfoId"); + b.HasIndex("WaifuInfoId"); - b.ToTable("WaifuItem"); - }); + b.ToTable("WaifuItem"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("NewId") - .HasColumnType("INTEGER"); + b.Property("NewId") + .HasColumnType("INTEGER"); - b.Property("OldId") - .HasColumnType("INTEGER"); + b.Property("OldId") + .HasColumnType("INTEGER"); - b.Property("UpdateType") - .HasColumnType("INTEGER"); + b.Property("UpdateType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("NewId"); + b.HasIndex("NewId"); - b.HasIndex("OldId"); + b.HasIndex("OldId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("WaifuUpdates"); - }); + b.ToTable("WaifuUpdates"); + }); modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Forgiven") - .HasColumnType("INTEGER"); + b.Property("Forgiven") + .HasColumnType("INTEGER"); - b.Property("ForgivenBy") - .HasColumnType("TEXT"); + b.Property("ForgivenBy") + .HasColumnType("TEXT"); - b.Property("GuildId") - .HasColumnType("INTEGER"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Property("Moderator") - .HasColumnType("TEXT"); + b.Property("Moderator") + .HasColumnType("TEXT"); - b.Property("Reason") - .HasColumnType("TEXT"); + b.Property("Reason") + .HasColumnType("TEXT"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(1L); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DateAdded"); + b.HasIndex("DateAdded"); - b.HasIndex("GuildId"); + b.HasIndex("GuildId"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("Warnings"); - }); + b.ToTable("Warnings"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Count") - .HasColumnType("INTEGER"); + b.Property("Count") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("Punishment") - .HasColumnType("INTEGER"); + b.Property("Punishment") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("Time") - .HasColumnType("INTEGER"); + b.Property("Time") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId"); + b.HasIndex("GuildConfigId"); - b.ToTable("WarningPunishment"); - }); + b.ToTable("WarningPunishment"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("Amount") - .HasColumnType("INTEGER"); + b.Property("Amount") + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId"); + b.HasIndex("XpSettingsId"); - b.ToTable("XpCurrencyReward"); - }); + b.ToTable("XpCurrencyReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("Level") - .HasColumnType("INTEGER"); + b.Property("Level") + .HasColumnType("INTEGER"); - b.Property("Remove") - .HasColumnType("INTEGER"); + b.Property("Remove") + .HasColumnType("INTEGER"); - b.Property("RoleId") - .HasColumnType("INTEGER"); + b.Property("RoleId") + .HasColumnType("INTEGER"); - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); + b.Property("XpSettingsId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); - b.ToTable("XpRoleReward"); - }); + b.ToTable("XpRoleReward"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); + b.Property("ServerExcluded") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GuildConfigId") - .IsUnique(); + b.HasIndex("GuildConfigId") + .IsUnique(); - b.ToTable("XpSettings"); - }); + b.ToTable("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("DateAdded") - .HasColumnType("TEXT"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Property("IsUsing") - .HasColumnType("INTEGER"); + b.Property("IsUsing") + .HasColumnType("INTEGER"); - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); + b.Property("ItemKey") + .IsRequired() + .HasColumnType("TEXT"); - b.Property("ItemType") - .HasColumnType("INTEGER"); + b.Property("ItemType") + .HasColumnType("INTEGER"); - b.Property("UserId") - .HasColumnType("INTEGER"); + b.Property("UserId") + .HasColumnType("INTEGER"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique(); - b.ToTable("XpShopOwnedItem"); - }); + b.ToTable("XpShopOwnedItem"); + }); + + modelBuilder.Entity("EllieBot.Services.GreetSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoDeleteTimer") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("GreetType") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("IsEnabled") + .HasColumnType("INTEGER"); + + b.Property("MessageText") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique(); + + b.ToTable("GreetSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Channel"); - }); + b.Navigation("Channel"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Club"); + b.Navigation("Club"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull); - b.Navigation("Owner"); - }); + b.Navigation("Owner"); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction); - b.Navigation("Club"); - }); + b.Navigation("Club"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("LogSetting"); - }); + b.Navigation("LogSetting"); + }); modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("StreamRoleSettings"); - }); + b.Navigation("StreamRoleSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Affinity"); + b.Navigation("Affinity"); - b.Navigation("Claimer"); + b.Navigation("Claimer"); - b.Navigation("Waifu"); - }); + b.Navigation("Waifu"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); - b.Navigation("WaifuInfo"); - }); + b.Navigation("WaifuInfo"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("New"); + b.Navigation("New"); - b.Navigation("Old"); + b.Navigation("Old"); - b.Navigation("User"); - }); + b.Navigation("User"); + }); modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("GuildConfig"); - }); + b.Navigation("GuildConfig"); + }); modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); + { + b.Navigation("IgnoredChannels"); + }); modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); + { + b.Navigation("Users"); + }); modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); + { + b.Navigation("Applicants"); - b.Navigation("Bans"); + b.Navigation("Bans"); - b.Navigation("Members"); - }); + b.Navigation("Members"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + b.Navigation("Participants"); + }); modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); + { + b.Navigation("AntiAltSetting"); - b.Navigation("AntiRaidSetting"); + b.Navigation("AntiRaidSetting"); - b.Navigation("AntiSpamSetting"); + b.Navigation("AntiSpamSetting"); - b.Navigation("CommandAliases"); + b.Navigation("CommandAliases"); - b.Navigation("CommandCooldowns"); + b.Navigation("CommandCooldowns"); - b.Navigation("DelMsgOnCmdChannels"); + b.Navigation("DelMsgOnCmdChannels"); - b.Navigation("FeedSubs"); + b.Navigation("FeedSubs"); - b.Navigation("FilterInvitesChannelIds"); + b.Navigation("FilterInvitesChannelIds"); - b.Navigation("FilterLinksChannelIds"); + b.Navigation("FilterLinksChannelIds"); - b.Navigation("FilterWordsChannelIds"); + b.Navigation("FilterWordsChannelIds"); - b.Navigation("FilteredWords"); + b.Navigation("FilteredWords"); - b.Navigation("FollowedStreams"); + b.Navigation("FollowedStreams"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Navigation("GenerateCurrencyChannelIds"); - b.Navigation("MutedUsers"); + b.Navigation("MutedUsers"); - b.Navigation("Permissions"); + b.Navigation("Permissions"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Navigation("SelfAssignableRoleGroupNames"); - b.Navigation("ShopEntries"); + b.Navigation("ShopEntries"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Navigation("SlowmodeIgnoredRoles"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Navigation("SlowmodeIgnoredUsers"); - b.Navigation("StreamRole"); + b.Navigation("StreamRole"); - b.Navigation("UnbanTimer"); + b.Navigation("UnbanTimer"); - b.Navigation("UnmuteTimers"); + b.Navigation("UnmuteTimers"); - b.Navigation("UnroleTimer"); + b.Navigation("UnroleTimer"); - b.Navigation("VcRoleInfos"); + b.Navigation("VcRoleInfos"); - b.Navigation("WarnPunishments"); + b.Navigation("WarnPunishments"); - b.Navigation("XpSettings"); - }); + b.Navigation("XpSettings"); + }); modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); + { + b.Navigation("LogIgnores"); + }); modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); + { + b.Navigation("Songs"); + }); modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); + { + b.Navigation("Blacklist"); - b.Navigation("Whitelist"); - }); + b.Navigation("Whitelist"); + }); modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); + { + b.Navigation("Items"); + }); modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); + { + b.Navigation("CurrencyRewards"); - b.Navigation("ExclusionList"); + b.Navigation("ExclusionList"); - b.Navigation("RoleRewards"); - }); + b.Navigation("RoleRewards"); + }); #pragma warning restore 612, 618 } } diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs index 104e4e7..b473326 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs @@ -5,238 +5,223 @@ public partial class Administration [Group] public partial class GreetCommands : EllieModule { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task Boost() + public async Task Toggle(GreetType type) { - var enabled = await _service.ToggleBoost(ctx.Guild.Id, ctx.Channel.Id); + var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id, type); if (enabled) - await Response().Confirm(strs.boost_on).SendAsync(); + await Response() + .Confirm( + type switch + { + GreetType.Boost => strs.boost_on, + GreetType.Greet => strs.greet_on, + GreetType.Bye => strs.bye_on, + GreetType.GreetDm => strs.greetdm_on, + _ => strs.error + } + ) + .SendAsync(); else - await Response().Pending(strs.boost_off).SendAsync(); + await Response() + .Pending( + type switch + { + GreetType.Boost => strs.boost_off, + GreetType.Greet => strs.greet_off, + GreetType.Bye => strs.bye_off, + GreetType.GreetDm => strs.greetdm_off, + _ => strs.error + } + ) + .SendAsync(); } - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task BoostDel(int timer = 30) + + public async Task SetDel(GreetType type, int timer) { if (timer is < 0 or > 600) return; - await _service.SetBoostDel(ctx.Guild.Id, timer); + await _service.SetDeleteTimer(ctx.Guild.Id, type, timer); if (timer > 0) - await Response().Confirm(strs.boostdel_on(timer)).SendAsync(); + await Response() + .Confirm( + type switch + { + GreetType.Boost => strs.boostdel_on(timer), + GreetType.Greet => strs.greetdel_on(timer), + GreetType.Bye => strs.byedel_on(timer), + _ => strs.error + } + ) + .SendAsync(); else - await Response().Pending(strs.boostdel_off).SendAsync(); + await Response() + .Pending( + type switch + { + GreetType.Boost => strs.boostdel_off, + GreetType.Greet => strs.greetdel_off, + GreetType.Bye => strs.byedel_off, + _ => strs.error + }) + .SendAsync(); } - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task BoostMsg([Leftover] string? text = null) + + public async Task SetMsg(GreetType type, string? text = null) { if (string.IsNullOrWhiteSpace(text)) { - var boostMessage = _service.GetBoostMessage(ctx.Guild.Id); - await Response().Confirm(strs.boostmsg_cur(boostMessage?.SanitizeMentions())).SendAsync(); + await _service.SetMessage(ctx.Guild.Id, type, null); + var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); + var msg = conf?.MessageText ?? "No message set."; + await Response() + .Confirm( + type switch + { + GreetType.Boost => strs.boostmsg_cur(msg.SanitizeMentions()), + GreetType.Greet => strs.greetmsg_cur(msg.SanitizeMentions()), + GreetType.Bye => strs.byemsg_cur(msg.SanitizeMentions()), + GreetType.GreetDm => strs.greetdmmsg_cur(msg.SanitizeMentions()), + _ => strs.error + }) + .SendAsync(); return; } - var sendBoostEnabled = _service.SetBoostMessage(ctx.Guild.Id, ref text); + var isEnabled = await _service.SetMessage(ctx.Guild.Id, type, text); - await Response().Confirm(strs.boostmsg_new).SendAsync(); - if (!sendBoostEnabled) - await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); - } + await Response() + .Confirm(type switch + { + GreetType.Boost => strs.boostmsg_new, + GreetType.Greet => strs.greetmsg_new, + GreetType.Bye => strs.byemsg_new, + GreetType.GreetDm => strs.greetdmmsg_new, + _ => strs.error + }) + .SendAsync(); - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task GreetDel(int timer = 30) - { - if (timer is < 0 or > 600) - return; - await _service.SetGreetDel(ctx.Guild.Id, timer); - - if (timer > 0) - await Response().Confirm(strs.greetdel_on(timer)).SendAsync(); - else - await Response().Pending(strs.greetdel_off).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task Greet() - { - var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id); - - if (enabled) - await Response().Confirm(strs.greet_on).SendAsync(); - else - await Response().Pending(strs.greet_off).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public async Task GreetMsg([Leftover] string? text = null) - { - if (string.IsNullOrWhiteSpace(text)) + if (!isEnabled) { - var greetMsg = _service.GetGreetMsg(ctx.Guild.Id); - await Response().Confirm(strs.greetmsg_cur(greetMsg?.SanitizeMentions())).SendAsync(); - return; + var cmdName = type switch + { + GreetType.Greet => "greet", + GreetType.Bye => "bye", + GreetType.Boost => "boost", + GreetType.GreetDm => "greetdm", + _ => "unknown_command" + }; + + await Response().Pending(strs.boostmsg_enable($"`{prefix}{cmdName}`")).SendAsync(); } - - var sendGreetEnabled = _service.SetGreetMessage(ctx.Guild.Id, ref text); - - await Response().Confirm(strs.greetmsg_new).SendAsync(); - - if (!sendGreetEnabled) - await Response().Pending(strs.greetmsg_enable($"`{prefix}greet`")).SendAsync(); } [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public async Task GreetDm() - { - var enabled = await _service.SetGreetDm(ctx.Guild.Id); - - if (enabled) - await Response().Confirm(strs.greetdm_on).SendAsync(); - else - await Response().Confirm(strs.greetdm_off).SendAsync(); - } + public Task Boost() + => Toggle(GreetType.Boost); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public async Task GreetDmMsg([Leftover] string? text = null) - { - if (string.IsNullOrWhiteSpace(text)) - { - var dmGreetMsg = _service.GetDmGreetMsg(ctx.Guild.Id); - await Response().Confirm(strs.greetdmmsg_cur(dmGreetMsg?.SanitizeMentions())).SendAsync(); - return; - } - - var sendGreetEnabled = _service.SetGreetDmMessage(ctx.Guild.Id, ref text); - - await Response().Confirm(strs.greetdmmsg_new).SendAsync(); - if (!sendGreetEnabled) - await Response().Pending(strs.greetdmmsg_enable($"`{prefix}greetdm`")).SendAsync(); - } + public Task BoostDel(int timer = 30) + => SetDel(GreetType.Boost, timer); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public async Task Bye() - { - var enabled = await _service.SetBye(ctx.Guild.Id, ctx.Channel.Id); - - if (enabled) - await Response().Confirm(strs.bye_on).SendAsync(); - else - await Response().Confirm(strs.bye_off).SendAsync(); - } + public Task BoostMsg([Leftover] string? text = null) + => SetMsg(GreetType.Boost, text); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public async Task ByeMsg([Leftover] string? text = null) - { - if (string.IsNullOrWhiteSpace(text)) - { - var byeMsg = _service.GetByeMessage(ctx.Guild.Id); - await Response().Confirm(strs.byemsg_cur(byeMsg?.SanitizeMentions())).SendAsync(); - return; - } - - var sendByeEnabled = _service.SetByeMessage(ctx.Guild.Id, ref text); - - await Response().Confirm(strs.byemsg_new).SendAsync(); - if (!sendByeEnabled) - await Response().Pending(strs.byemsg_enable($"`{prefix}bye`")).SendAsync(); - } + public Task Greet() + => Toggle(GreetType.Greet); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public async Task ByeDel(int timer = 30) - { - await _service.SetByeDel(ctx.Guild.Id, timer); + public Task GreetDel(int timer = 30) + => SetDel(GreetType.Greet, timer); - if (timer > 0) - await Response().Confirm(strs.byedel_on(timer)).SendAsync(); - else - await Response().Pending(strs.byedel_off).SendAsync(); - } + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetMsg([Leftover] string? text = null) + => SetMsg(GreetType.Greet, text); + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDm() + => Toggle(GreetType.GreetDm); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDmMsg([Leftover] string? text = null) + => SetMsg(GreetType.GreetDm, text); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task Bye() + => Toggle(GreetType.Bye); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task ByeDel(int timer = 30) + => SetDel(GreetType.Bye, timer); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task ByeMsg([Leftover] string? text = null) + => SetMsg(GreetType.Bye, text); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] [Ratelimit(5)] - public async Task ByeTest([Leftover] IGuildUser? user = null) - { - user ??= (IGuildUser)ctx.User; - - await _service.ByeTest((ITextChannel)ctx.Channel, user); - var enabled = _service.GetByeEnabled(ctx.Guild.Id); - if (!enabled) - await Response().Pending(strs.byemsg_enable($"`{prefix}bye`")).SendAsync(); - } + public Task GreetTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Greet, user); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] [Ratelimit(5)] - public async Task GreetTest([Leftover] IGuildUser? user = null) - { - user ??= (IGuildUser)ctx.User; - - await _service.GreetTest((ITextChannel)ctx.Channel, user); - var enabled = _service.GetGreetEnabled(ctx.Guild.Id); - if (!enabled) - await Response().Pending(strs.greetmsg_enable($"`{prefix}greet`")).SendAsync(); - } + public Task GreetDmTest([Leftover] IGuildUser? user = null) + => Test(GreetType.GreetDm, user); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] [Ratelimit(5)] - public async Task GreetDmTest([Leftover] IGuildUser? user = null) - { - user ??= (IGuildUser)ctx.User; - - var success = await _service.GreetDmTest(user); - if (success) - await ctx.OkAsync(); - else - await ctx.WarningAsync(); - var enabled = _service.GetGreetDmEnabled(ctx.Guild.Id); - if (!enabled) - await Response().Pending(strs.greetdmmsg_enable($"`{prefix}greetdm`")).SendAsync(); - } + public Task ByeTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Bye, user); [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] [Ratelimit(5)] - public async Task BoostTest([Leftover] IGuildUser? user = null) + public Task BoostTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Boost, user); + + public async Task Test(GreetType type, IGuildUser? user = null) { user ??= (IGuildUser)ctx.User; - await _service.BoostTest((ITextChannel)ctx.Channel, user); - var enabled = _service.GetBoostEnabled(ctx.Guild.Id); - if (!enabled) + await _service.Test(ctx.Guild.Id, type, (ITextChannel)ctx.Channel, user); + var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); + if (conf?.IsEnabled is not true) await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); } } diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs deleted file mode 100644 index a92256e..0000000 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace EllieBot.Services; - -public class GreetGrouper -{ - private readonly Dictionary> _group; - private readonly object _locker = new(); - - public GreetGrouper() - => _group = new(); - - - /// - /// Creates a group, if group already exists, adds the specified user - /// - /// Id of the server for which to create group for - /// User to add if group already exists - /// - public bool CreateOrAdd(ulong guildId, T toAddIfExists) - { - lock (_locker) - { - if (_group.TryGetValue(guildId, out var list)) - { - list.Add(toAddIfExists); - return false; - } - - _group[guildId] = new(); - return true; - } - } - - /// - /// Remove the specified amount of items from the group. If all items are removed, group will be removed. - /// - /// Id of the group - /// Maximum number of items to retrieve - /// Items retrieved - /// Whether the group has no more items left and is deleted - public bool ClearGroup(ulong guildId, int count, out IReadOnlyCollection items) - { - lock (_locker) - { - if (_group.TryGetValue(guildId, out var set)) - { - // if we want more than there are, return everything - if (count >= set.Count) - { - items = set; - _group.Remove(guildId); - return true; - } - - // if there are more in the group than what's needed - // take the requested number, remove them from the set - // and return them - var toReturn = set.TakeWhile(_ => count-- != 0).ToList(); - foreach (var item in toReturn) - set.Remove(item); - - items = toReturn; - // returning falsemeans group is not yet deleted - // because there are items left - return false; - } - - items = Array.Empty(); - return true; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index 59fc1b7..e1fd0db 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -8,36 +8,38 @@ namespace EllieBot.Services; public class GreetService : IEService, IReadyExecutor { - public bool GroupGreets - => _bss.Data.GroupGreets; - private readonly DbService _db; - private ConcurrentHashSet _greetDmEnabledGuilds = new(); - private ConcurrentHashSet _boostEnabledGuilds = new(); - private ConcurrentHashSet _greetEnabledGuilds = new(); - private ConcurrentHashSet _byeEnabledGuilds = new(); + private ConcurrentDictionary> _enabled = new(); private readonly DiscordSocketClient _client; - private readonly GreetGrouper _greets = new(); - private readonly GreetGrouper _byes = new(); private readonly BotConfigService _bss; private readonly IReplacementService _repSvc; + private readonly IBotCache _cache; private readonly IMessageSenderService _sender; + private readonly Channel<(GreetSettings, IUser, ITextChannel?)> _greetQueue = + Channel.CreateBounded<(GreetSettings, IUser, ITextChannel?)>( + new BoundedChannelOptions(60) + { + FullMode = BoundedChannelFullMode.DropOldest + }); + public GreetService( DiscordSocketClient client, DbService db, BotConfigService bss, IMessageSenderService sender, - IReplacementService repSvc + IReplacementService repSvc, + IBotCache cache ) { _db = db; _client = client; _bss = bss; _repSvc = repSvc; + _cache = cache; _sender = sender; } @@ -49,16 +51,12 @@ public class GreetService : IEService, IReadyExecutor var guilds = _client.Guilds.Select(x => x.Id).ToList(); var enabled = await uow.GetTable() .Where(x => x.GuildId.In(guilds)) - .Where(x => x.SendChannelGreetMessage - || x.SendBoostMessage - || x.SendChannelByeMessage - || x.SendDmGreetMessage) + .Where(x => x.IsEnabled) .ToListAsync(); - _boostEnabledGuilds = new(enabled.Where(x => x.SendBoostMessage).Select(x => x.GuildId)); - _byeEnabledGuilds = new(enabled.Where(x => x.SendChannelByeMessage).Select(x => x.GuildId)); - _greetDmEnabledGuilds = new(enabled.Where(x => x.SendDmGreetMessage).Select(x => x.GuildId)); - _greetEnabledGuilds = new(enabled.Where(x => x.SendChannelGreetMessage).Select(x => x.GuildId)); + _enabled = enabled.GroupBy(x => x.GreetType, v => v.GuildId) + .ToDictionary(x => x.Key, x => x.ToHashSet().ToConcurrentSet()) + .ToConcurrent(); } _client.UserJoined += OnUserJoined; @@ -71,9 +69,8 @@ public class GreetService : IEService, IReadyExecutor var timer = new PeriodicTimer(TimeSpan.FromSeconds(2)); while (await timer.WaitForNextTickAsync()) { - var (conf, user, compl) = await _greetDmQueue.Reader.ReadAsync(); - var res = await GreetDmUserInternal(conf, user); - compl.TrySetResult(res); + var (conf, user, ch) = await _greetQueue.Reader.ReadAsync(); + await GreetUsers(conf, ch, user); } } @@ -88,62 +85,35 @@ public class GreetService : IEService, IReadyExecutor { _ = Task.Run(async () => { - var conf = await GetGreetSettingsAsync(newUser.Guild.Id); + var conf = await GetGreetSettingsAsync(newUser.Guild.Id, GreetType.Boost); - if (conf is null || !conf.SendBoostMessage) + if (conf is null || !conf.IsEnabled) return; - await TriggerBoostMessage(conf, newUser); + ITextChannel? channel = null; + if (conf.ChannelId is { } cid) + channel = newUser.Guild.GetTextChannel(cid); + + if (channel is null) + return; + + await GreetUsers(conf, channel, newUser); }); } return Task.CompletedTask; } - private async Task TriggerBoostMessage(GreetSettings conf, SocketGuildUser user) + private async Task OnClientLeftGuild(SocketGuild guild) { - var channel = user.Guild.GetTextChannel(conf.BoostMessageChannelId); - if (channel is null) - return; - - await SendBoostMessage(conf, user, channel); - } - - private async Task SendBoostMessage(GreetSettings conf, IGuildUser user, ITextChannel channel) - { - if (string.IsNullOrWhiteSpace(conf.BoostMessage)) - return false; - - var toSend = SmartText.CreateFrom(conf.BoostMessage); - - try + foreach (var gt in Enum.GetValues()) { - var newContent = await _repSvc.ReplaceAsync(toSend, - new(client: _client, guild: user.Guild, channel: channel, users: user)); - var toDelete = await _sender.Response(channel).Text(newContent).Sanitize(false).SendAsync(); - if (conf.BoostMessageDeleteAfter > 0) - toDelete.DeleteAfter(conf.BoostMessageDeleteAfter); - - return true; + _enabled[gt].TryRemove(guild.Id); } - catch (Exception ex) - { - Log.Error(ex, "Error sending boost message"); - } - - return false; - } - - private async Task OnClientLeftGuild(SocketGuild arg) - { - _boostEnabledGuilds.TryRemove(arg.Id); - _byeEnabledGuilds.TryRemove(arg.Id); - _greetDmEnabledGuilds.TryRemove(arg.Id); - _greetEnabledGuilds.TryRemove(arg.Id); await using var uow = _db.GetDbContext(); await uow.GetTable() - .Where(x => x.GuildId == arg.Id) + .Where(x => x.GuildId == guild.Id) .DeleteAsync(); } @@ -153,38 +123,20 @@ public class GreetService : IEService, IReadyExecutor { try { - var conf = await GetGreetSettingsAsync(guild.Id); + var conf = await GetGreetSettingsAsync(guild.Id, GreetType.Bye); if (conf is null) return; - var channel = guild.TextChannels.FirstOrDefault(c => c.Id == conf.ByeMessageChannelId); + var channel = guild.TextChannels.FirstOrDefault(c => c.Id == conf.ChannelId); if (channel is null) //maybe warn the server owner that the channel is missing + { + await SetGreet(guild.Id, null, GreetType.Bye, false); return; + } - if (GroupGreets) - { - // if group is newly created, greet that user right away, - // but any user which joins in the next 5 seconds will - // be greeted in a group greet - if (_byes.CreateOrAdd(guild.Id, user)) - { - // greet single user - await ByeUsers(conf, channel, new[] { user }); - var groupClear = false; - while (!groupClear) - { - await Task.Delay(5000); - groupClear = _byes.ClearGroup(guild.Id, 5, out var toBye); - await ByeUsers(conf, channel, toBye); - } - } - } - else - { - await ByeUsers(conf, channel, new[] { user }); - } + await _greetQueue.Writer.WriteAsync((conf, user, channel)); } catch { @@ -194,7 +146,14 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } + private readonly TypedKey _greetSettingsKey = new(); + public async Task GetGreetSettingsAsync(ulong gid, GreetType type) + => await _cache.GetOrAddAsync(_greetSettingsKey, + () => InternalGetGreetSettingsAsync(gid, type), + TimeSpan.FromSeconds(3)); + + private async Task InternalGetGreetSettingsAsync(ulong gid, GreetType type) { await using var uow = _db.GetDbContext(); var res = await uow.GetTable() @@ -204,62 +163,32 @@ public class GreetService : IEService, IReadyExecutor return res; } - private Task ByeUsers(GreetSettings conf, ITextChannel channel, IUser user) - => ByeUsers(conf, channel, new[] { user }); - - private async Task ByeUsers(GreetSettings conf, ITextChannel channel, IReadOnlyCollection users) + private async Task GreetUsers(GreetSettings conf, ITextChannel? channel, IUser user) { - if (!users.Any()) + if (conf.GreetType == GreetType.GreetDm) + { + if (user is not IGuildUser gu) + return; + + await GreetDmUserInternal(conf, gu); + return; + } + + if (channel is null) return; var repCtx = new ReplacementContext(client: _client, guild: channel.Guild, channel: channel, - users: users.ToArray()); + user: user); - var text = SmartText.CreateFrom(conf.ChannelByeMessageText); + var text = SmartText.CreateFrom(conf.MessageText); text = await _repSvc.ReplaceAsync(text, repCtx); try { var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - if (conf.AutoDeleteByeMessagesTimer > 0) - toDelete.DeleteAfter(conf.AutoDeleteByeMessagesTimer); - } - catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions - || ex.DiscordCode == DiscordErrorCode.MissingPermissions - || ex.DiscordCode == DiscordErrorCode.UnknownChannel) - { - Log.Warning(ex, - "Missing permissions to send a bye message, the bye message will be disabled on server: {GuildId}", - channel.GuildId); - await SetGreet(channel.GuildId, channel.Id, GreetType.Bye, false); - } - catch (Exception ex) - { - Log.Warning(ex, "Error embeding bye message"); - } - } - - private Task GreetUsers(GreetSettings conf, ITextChannel channel, IGuildUser user) - => GreetUsers(conf, channel, new[] { user }); - - private async Task GreetUsers(GreetSettings conf, ITextChannel channel, IReadOnlyCollection users) - { - if (users.Count == 0) - return; - - var repCtx = new ReplacementContext(client: _client, - guild: channel.Guild, - channel: channel, - users: users.ToArray()); - - var text = SmartText.CreateFrom(conf.ChannelGreetMessageText); - text = await _repSvc.ReplaceAsync(text, repCtx); - try - { - var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - if (conf.AutoDeleteGreetMessagesTimer > 0) - toDelete.DeleteAfter(conf.AutoDeleteGreetMessagesTimer); + if (conf.AutoDeleteTimer > 0) + toDelete.DeleteAfter(conf.AutoDeleteTimer); } catch (HttpException ex) when (ex.DiscordCode is DiscordErrorCode.InsufficientPermissions or DiscordErrorCode.MissingPermissions @@ -276,19 +205,11 @@ public class GreetService : IEService, IReadyExecutor } } - private readonly Channel<(GreetSettings, IGuildUser, TaskCompletionSource)> _greetDmQueue = - Channel.CreateBounded<(GreetSettings, IGuildUser, TaskCompletionSource)>(new BoundedChannelOptions(60) - { - // The limit of 60 users should be only hit when there's a raid. In that case - // probably the best thing to do is to drop newest (raiding) users - FullMode = BoundedChannelFullMode.DropNewest - }); - private async Task GreetDmUser(GreetSettings conf, IGuildUser user) { var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - await _greetDmQueue.Writer.WriteAsync((conf, user, completionSource)); + await _greetQueue.Writer.WriteAsync((conf, user, null)); return await completionSource.Task; } @@ -296,8 +217,8 @@ public class GreetService : IEService, IReadyExecutor { try { - var repCtx = new ReplacementContext(client: _client, guild: user.Guild, users: user); - var smartText = SmartText.CreateFrom(conf.DmGreetMessageText); + var repCtx = new ReplacementContext(client: _client, guild: user.Guild, user: user); + var smartText = SmartText.CreateFrom(conf.MessageText); smartText = await _repSvc.ReplaceAsync(smartText, repCtx); if (smartText is SmartPlainText pt) @@ -378,40 +299,21 @@ public class GreetService : IEService, IReadyExecutor { try { - var conf = await GetGreetSettingsAsync(user.GuildId); - if (conf is null) - return; + var conf = await GetGreetSettingsAsync(user.GuildId, GreetType.Greet); - if (conf.SendChannelGreetMessage) + if (conf is not null && conf.IsEnabled && conf.ChannelId is { } channelId) { - var channel = await user.Guild.GetTextChannelAsync(conf.GreetMessageChannelId); + var channel = await user.Guild.GetTextChannelAsync(channelId); if (channel is not null) { - if (GroupGreets) - { - // if group is newly created, greet that user right away, - // but any user which joins in the next 5 seconds will - // be greeted in a group greet - if (_greets.CreateOrAdd(user.GuildId, user)) - { - // greet single user - await GreetUsers(conf, channel, new[] { user }); - var groupClear = false; - while (!groupClear) - { - await Task.Delay(5000); - groupClear = _greets.ClearGroup(user.GuildId, 5, out var toGreet); - await GreetUsers(conf, channel, toGreet); - } - } - } - else - await GreetUsers(conf, channel, new[] { user }); + await _greetQueue.Writer.WriteAsync((conf, user, channel)); } } - if (conf.SendDmGreetMessage) - await GreetDmUser(conf, user); + var confDm = await GetGreetSettingsAsync(user.GuildId, GreetType.GreetDm); + + if (confDm?.IsEnabled ?? false) + await GreetDmUser(confDm, user); } catch { @@ -421,20 +323,16 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } - // public GreetSettings GetOrAddSettingsForGuild(ulong guildId) - // { - // if (_greetDmEnabledGuilds.TryGetValue(guildId, out var settings)) - // return settings; - // - // using (var uow = _db.GetDbContext()) - // { - // var gc = uow.GuildConfigsForId(guildId, set => set); - // settings = GreetSettings.Create(gc); - // } - // - // _greetDmEnabledGuilds.TryAdd(guildId, settings); - // return settings; - // } + + private static string GetDefaultGreet(GreetType greetType) + => greetType switch + { + GreetType.Boost => "%user.name% has boosted the server!", + GreetType.Greet => "%user.name% has joined the server!", + GreetType.Bye => "%user.name has left the server!", + GreetType.GreetDm => "Welcome to the server %user.name%", + _ => "%user.name% did something new!" + }; public async Task SetGreet( ulong guildId, @@ -447,9 +345,14 @@ public class GreetService : IEService, IReadyExecutor if (value is { } v) { + var defaultGreet = GetDefaultGreet(greetType); + await q .InsertOrUpdateAsync(() => new() { + GuildId = guildId, + GreetType = greetType, + MessageText = defaultGreet, IsEnabled = v, ChannelId = channelId, }, @@ -466,29 +369,45 @@ public class GreetService : IEService, IReadyExecutor } else { - await q - .Where(x => x.GuildId == guildId && x.GreetType == greetType) - .UpdateAsync((old) => new() - { - IsEnabled = !old.IsEnabled - }); + var result = await q + .Where(x => x.GuildId == guildId && x.GreetType == greetType) + .UpdateWithOutputAsync((old) => new() + { + IsEnabled = !old.IsEnabled + }, + (o, n) => n.IsEnabled); + + if (result.Length > 0) + value = result[0]; + } + + if (value is true) + { + _enabled[greetType].Add(guildId); + } + else + { + _enabled[greetType].TryRemove(guildId); } return true; } - public async Task SetGreetTypeMessage(ulong guildId, GreetType greetType, string message) + + public async Task SetMessage(ulong guildId, GreetType greetType, string? message) { - message = message.SanitizeMentions(); + message = message?.SanitizeMentions(); if (string.IsNullOrWhiteSpace(message)) - throw new ArgumentNullException(nameof(message)); + message = GetDefaultGreet(greetType); await using (var uow = _db.GetDbContext()) { await uow.GetTable() .InsertOrUpdateAsync(() => new() { + GuildId = guildId, + GreetType = greetType, MessageText = message }, x => new() @@ -502,11 +421,42 @@ public class GreetService : IEService, IReadyExecutor }); } - var conf = await GetGreetSettingsAsync(guildId, type); + var conf = await GetGreetSettingsAsync(guildId, greetType); return conf?.IsEnabled ?? false; } + public async Task SetDeleteTimer(ulong guildId, GreetType greetType, int timer) + { + if (timer < 0 || timer > 3600) + throw new ArgumentOutOfRangeException(nameof(timer)); + + await using (var uow = _db.GetDbContext()) + { + await uow.GetTable() + .InsertOrUpdateAsync(() => new() + { + GuildId = guildId, + GreetType = greetType, + AutoDeleteTimer = timer, + }, + x => new() + { + AutoDeleteTimer = timer + }, + () => new() + { + GuildId = guildId, + GreetType = greetType + }); + } + + var conf = await GetGreetSettingsAsync(guildId, greetType); + + return conf?.IsEnabled ?? false; + } + + public async Task Test( ulong guildId, GreetType type, @@ -514,14 +464,24 @@ public class GreetService : IEService, IReadyExecutor IGuildUser user) { var conf = await GetGreetSettingsAsync(guildId, type); - return SendMessage(conf, user, channel); + if (conf is null) + return false; + + await SendMessage(conf, channel, user); + return true; } public async Task SendMessage(GreetSettings conf, IMessageChannel channel, IGuildUser user) { if (conf.GreetType == GreetType.GreetDm) { - await GreetDmUser(conf, user); + return await GreetDmUser(conf, user); } + + if (channel is not ITextChannel ch) + return false; + + await GreetUsers(conf, ch, user); + return true; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs index 6e4f8ed..76579e6 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs @@ -2,44 +2,43 @@ using EllieBot.Db.Models; namespace EllieBot.Services; +public enum GreetType +{ + Greet, + GreetDm, + Bye, + Boost, +} + public class GreetSettings { - public int AutoDeleteGreetMessagesTimer { get; set; } - public int AutoDeleteByeMessagesTimer { get; set; } + public int Id { get; set; } - public ulong GreetMessageChannelId { get; set; } - public ulong ByeMessageChannelId { get; set; } + public ulong GuildId { get; set; } + public GreetType GreetType { get; set; } + public string? MessageText { get; set; } + public bool IsEnabled { get; set; } + public ulong? ChannelId { get; set; } - public bool SendDmGreetMessage { get; set; } - public string? DmGreetMessageText { get; set; } + public int AutoDeleteTimer { get; set; } - public bool SendChannelGreetMessage { get; set; } - public string? ChannelGreetMessageText { get; set; } - - public bool SendChannelByeMessage { get; set; } - public string? ChannelByeMessageText { get; set; } - - public bool SendBoostMessage { get; set; } - public string? BoostMessage { get; set; } - public int BoostMessageDeleteAfter { get; set; } - public ulong BoostMessageChannelId { get; set; } - - public static GreetSettings Create(GuildConfig g) - => new() - { - AutoDeleteByeMessagesTimer = g.AutoDeleteByeMessagesTimer, - AutoDeleteGreetMessagesTimer = g.AutoDeleteGreetMessagesTimer, - GreetMessageChannelId = g.GreetMessageChannelId, - ByeMessageChannelId = g.ByeMessageChannelId, - SendDmGreetMessage = g.SendDmGreetMessage, - DmGreetMessageText = g.DmGreetMessageText, - SendChannelGreetMessage = g.SendChannelGreetMessage, - ChannelGreetMessageText = g.ChannelGreetMessageText, - SendChannelByeMessage = g.SendChannelByeMessage, - ChannelByeMessageText = g.ChannelByeMessageText, - SendBoostMessage = g.SendBoostMessage, - BoostMessage = g.BoostMessage, - BoostMessageDeleteAfter = g.BoostMessageDeleteAfter, - BoostMessageChannelId = g.BoostMessageChannelId - }; + // public int AutoDeleteGreetMessagesTimer { get; set; } + // public int AutoDeleteByeMessagesTimer { get; set; } + // + // public ulong GreetMessageChannelId { get; set; } + // public ulong ByeMessageChannelId { get; set; } + // + // public bool SendDmGreetMessage { get; set; } + // public string? DmGreetMessageText { get; set; } + // + // public bool SendChannelGreetMessage { get; set; } + // public string? ChannelGreetMessageText { get; set; } + // + // public bool SendChannelByeMessage { get; set; } + // public string? ChannelByeMessageText { get; set; } + // + // public bool SendBoostMessage { get; set; } + // public string? BoostMessage { get; set; } + // public int BoostMessageDeleteAfter { get; set; } + // public ulong BoostMessageChannelId { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index a42a9f1..2b9e00d 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -243,14 +243,16 @@ public class UserPunishService : IEService, IReadyExecutor public async Task CheckAllWarnExpiresAsync() { await using var uow = _db.GetDbContext(); - var cleared = await uow.Set() - .Where(x => uow.Set() - .Any(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Clear) + + var cleared = await uow.GetTable() + .Where(x => uow.GetTable() + .Count(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Clear) + > 0 && x.Forgiven == false && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.Set() + < DateTime.UtcNow.AddHours(-uow.GetTable() .Where(y => x.GuildId == y.GuildId) .Select(y => y.WarnExpireHours) .First())) @@ -260,13 +262,14 @@ public class UserPunishService : IEService, IReadyExecutor ForgivenBy = "expiry" }); - var deleted = await uow.Set() - .Where(x => uow.Set() - .Any(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Delete) + var deleted = await uow.GetTable() + .Where(x => uow.GetTable() + .Count(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Delete) + > 0 && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.Set() + < DateTime.UtcNow.AddHours(-uow.GetTable() .Where(y => x.GuildId == y.GuildId) .Select(y => y.WarnExpireHours) .First())) @@ -278,8 +281,6 @@ public class UserPunishService : IEService, IReadyExecutor cleared, deleted); } - - await uow.SaveChangesAsync(); } public async Task CheckWarnExpiresAsync(ulong guildId) diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs b/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs index 0eeb68d..1ed9504 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs @@ -36,7 +36,7 @@ public static class EllieExpressionExtensions var repCtx = new ReplacementContext(client: client, guild: (ctx.Channel as ITextChannel)?.Guild as SocketGuild, channel: ctx.Channel, - users: ctx.Author + user: ctx.Author ) .WithOverride("%target%", () => canMentionEveryone diff --git a/src/EllieBot/Modules/Help/HelpService.cs b/src/EllieBot/Modules/Help/HelpService.cs index 5904c03..fd1b18b 100644 --- a/src/EllieBot/Modules/Help/HelpService.cs +++ b/src/EllieBot/Modules/Help/HelpService.cs @@ -31,7 +31,7 @@ public class HelpService : IExecNoCommand, IEService return; } - var repCtx = new ReplacementContext(guild: guild, channel: msg.Channel, users: msg.Author) + var repCtx = new ReplacementContext(guild: guild, channel: msg.Channel, user: msg.Author) .WithOverride("%prefix%", () => _bss.Data.Prefix) .WithOverride("%bot.prefix%", () => _bss.Data.Prefix); diff --git a/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs b/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs index 07d05cc..8d513cb 100644 --- a/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs +++ b/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs @@ -262,7 +262,7 @@ public sealed class RepeaterService : IReadyExecutor, IEService var repCtx = new ReplacementContext(client: _client, guild: guild, channel: channel, - users: guild.CurrentUser); + user: guild.CurrentUser); try { diff --git a/src/EllieBot/Services/Impl/BotCredsProvider.cs b/src/EllieBot/Services/Impl/BotCredsProvider.cs index 81c5a25..09cfcac 100644 --- a/src/EllieBot/Services/Impl/BotCredsProvider.cs +++ b/src/EllieBot/Services/Impl/BotCredsProvider.cs @@ -1,6 +1,5 @@ #nullable disable using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Primitives; using EllieBot.Common.Yml; namespace EllieBot.Services; @@ -22,7 +21,6 @@ public sealed class BotCredsProvider : IBotCredsProvider private readonly object _reloadLock = new(); - private readonly IDisposable _changeToken; public BotCredsProvider(int? totalShards = null, string credPath = null) { @@ -49,18 +47,18 @@ public sealed class BotCredsProvider : IBotCredsProvider // this can fail in docker containers } - MigrateCredentials(); - - if (!File.Exists(CredsPath)) - { - Log.Warning( - "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", - CredsPath, - CredsExamplePath); - } - try { + MigrateCredentials(); + + if (!File.Exists(CredsPath)) + { + Log.Warning( + "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", + CredsPath, + CredsExamplePath); + } + _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) .AddEnvironmentVariables("EllieBot_") .Build(); @@ -70,7 +68,6 @@ public sealed class BotCredsProvider : IBotCredsProvider Console.WriteLine(ex.ToString()); } - _changeToken = ChangeToken.OnChange(() => _config.GetReloadToken(), Reload); Reload(); } @@ -141,6 +138,7 @@ public sealed class BotCredsProvider : IBotCredsProvider { creds.BotCache = BotCacheImplemenation.Redis; } + if (creds.Version <= 6) { creds.Version = 7; diff --git a/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs b/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs index 3cedd0e..1a20437 100644 --- a/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs +++ b/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs @@ -72,6 +72,22 @@ public static class EnumerableExtensions where TKey : notnull => new(dict); + /// + /// Initializes a new instance of the class + /// that contains elements copied from the specified + /// has the default concurrency level, has the default initial capacity, + /// and uses the default comparer for the key type. + /// + /// + /// The whose elements are copied to the new + /// . + /// + /// A new instance of the class + public static ConcurrentHashSet ToConcurrentSet( + this IReadOnlyCollection dict) + where TValue : notnull + => new(dict); + public static IndexedCollection ToIndexed(this IEnumerable enumerable) where T : class, IIndexed => new(enumerable); diff --git a/src/EllieBot/_common/Configs/BotConfig.cs b/src/EllieBot/_common/Configs/BotConfig.cs index 0908577..c686ed7 100644 --- a/src/EllieBot/_common/Configs/BotConfig.cs +++ b/src/EllieBot/_common/Configs/BotConfig.cs @@ -84,19 +84,6 @@ public sealed partial class BotConfig : ICloneable [Comment("""Which string will be used to recognize the commands""")] public string Prefix { get; set; } - [Comment(""" - Toggles whether your bot will group greet/bye messages into a single message every 5 seconds. - 1st user who joins will get greeted immediately - If more users join within the next 5 seconds, they will be greeted in groups of 5. - This will cause %user.mention% and other placeholders to be replaced with multiple users. - Keep in mind this might break some of your embeds - for example if you have %user.avatar% in the thumbnail, - it will become invalid, as it will resolve to a list of avatars of grouped users. - note: This setting is primarily used if you're afraid of raids, or you're running medium/large bots where some - servers might get hundreds of people join at once. This is used to prevent the bot from getting ratelimited, - and (slightly) reduce the greet spam in those servers. - """)] - public bool GroupGreets { get; set; } - [Comment(""" Whether the bot will rotate through all specified statuses. This setting can be changed via .ropl command. @@ -144,7 +131,6 @@ public sealed partial class BotConfig : ICloneable Blocked = blocked; Prefix = "."; RotateStatuses = false; - GroupGreets = false; DmHelpTextKeywords = [ "help", diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs index b321941..184ba4e 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs @@ -7,7 +7,7 @@ public sealed class ReplacementContext public DiscordSocketClient? Client { get; } public IGuild? Guild { get; } public IMessageChannel? Channel { get; } - public IUser[]? Users { get; } + public IUser? User { get; } private readonly List _overrides = new(); private readonly HashSet _tokens = new(); @@ -21,10 +21,11 @@ public sealed class ReplacementContext public IReadOnlyList RegexOverrides => _regexOverrides.AsReadOnly(); - public ReplacementContext(ICommandContext cmdContext) : this(cmdContext.Client as DiscordSocketClient, - cmdContext.Guild, - cmdContext.Channel, - cmdContext.User) + public ReplacementContext(ICommandContext cmdContext) + : this(cmdContext.Client as DiscordSocketClient, + cmdContext.Guild, + cmdContext.Channel, + cmdContext.User) { } @@ -32,12 +33,12 @@ public sealed class ReplacementContext DiscordSocketClient? client = null, IGuild? guild = null, IMessageChannel? channel = null, - params IUser[]? users) + IUser? user = null) { Client = client; Guild = guild; Channel = channel; - Users = users; + User = user; } public ReplacementContext WithOverride(string key, Func> repFactory) diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs index 4d17213..18712d8 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs @@ -40,8 +40,8 @@ public sealed class ReplacementService : IReplacementService, IEService if (repCtx.Guild is not null) obj.Add(repCtx.Guild); - if (repCtx.Users is not null) - obj.Add(repCtx.Users); + if (repCtx.User is not null) + obj.Add(repCtx.User); if (repCtx.Channel is not null) obj.Add(repCtx.Channel); @@ -86,9 +86,9 @@ public sealed class ReplacementService : IReplacementService, IEService objs.Add(repCtx.Channel); } - if (repCtx.Users is not null) + if (repCtx.User is not null) { - objs.Add(repCtx.Users); + objs.Add(repCtx.User); } if (repCtx.Guild is not null) @@ -117,9 +117,9 @@ public sealed class ReplacementService : IReplacementService, IEService objs.Add(repCtx.Channel); } - if (repCtx.Users is not null) + if (repCtx.User is not null) { - objs.Add(repCtx.Users); + objs.Add(repCtx.User); } if (repCtx.Guild is not null) diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index 303bdec..de8c200 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -1623,12 +1623,12 @@ gencurlist: - page: desc: "The current page number for pagination." choose: - desc: Chooses a thing from a list of things + desc: Chooses a thing from a list of things. Seperate items with a semicolon ; ex: - Get up;Sleep;Sleep more params: - list: - desc: "The type of items in the collection being searched." + desc: "The items separated by ;" rps: desc: |- Play a game of Rocket-Paperclip-Scissors with Ellie. -- 2.43.0 From 52b15131b98e446303b58d6bb7c8cd53052b2df0 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 14 Sep 2024 00:30:31 +1200 Subject: [PATCH 138/253] greet rework should be finished. Fixed postgres, removed mysql --- src/EllieBot/Db/EllieContext.cs | 11 + src/EllieBot/Db/EllieDbService.cs | 2 - src/EllieBot/Db/MysqlContext.cs | 38 - src/EllieBot/EllieBot.csproj | 1 - src/EllieBot/Migrations/MigrationQueries.cs | 43 +- .../20220409170652_mysql-init.Designer.cs | 3425 --------------- .../Mysql/20220409170652_mysql-init.cs | 2342 ---------- .../Mysql/20220428044612_stondel.Designer.cs | 3429 --------------- .../Mysql/20220428044612_stondel.cs | 26 - .../Mysql/20220429044757_bank.Designer.cs | 3458 --------------- .../Migrations/Mysql/20220429044757_bank.cs | 41 - .../Mysql/20220504162509_new-rero.Designer.cs | 3411 --------------- .../Mysql/20220504162509_new-rero.cs | 120 - ...0220614071410_patronage-system.Designer.cs | 3481 --------------- .../Mysql/20220614071410_patronage-system.cs | 175 - ...0220623090718_stondel-db-cache.Designer.cs | 3514 --------------- .../Mysql/20220623090718_stondel-db-cache.cs | 38 - .../Mysql/20220703194400_logwarns.Designer.cs | 3518 --------------- .../Mysql/20220703194400_logwarns.cs | 25 - .../20220725155953_xpitemshop.Designer.cs | 3556 --------------- .../Mysql/20220725155953_xpitemshop.cs | 44 - ...220727033931_linkonly-channels.Designer.cs | 3560 --------------- .../Mysql/20220727033931_linkonly-channels.cs | 26 - ...855_remove-obsolete-xp-columns.Designer.cs | 3542 --------------- ...220808141855_remove-obsolete-xp-columns.cs | 48 - .../Mysql/20220831142722_banprune.Designer.cs | 3546 --------------- .../Mysql/20220831142722_banprune.cs | 25 - .../20220913192520_shop-role-req.Designer.cs | 3550 --------------- .../Mysql/20220913192520_shop-role-req.cs | 25 - .../Mysql/20220916194514_autopub.Designer.cs | 3579 --------------- .../Mysql/20220916194514_autopub.cs | 41 - .../20221003175743_gambling-stats.Designer.cs | 3612 ---------------- .../Mysql/20221003175743_gambling-stats.cs | 43 - ...2758_toggle-global-expressions.Designer.cs | 3616 ---------------- ...0221021192758_toggle-global-expressions.cs | 26 - .../20221118195208_log-thread.Designer.cs | 3624 ---------------- .../Mysql/20221118195208_log-thread.cs | 35 - .../20221122204432_feed-text.Designer.cs | 3628 ---------------- .../Mysql/20221122204432_feed-text.cs | 26 - .../Mysql/20240502233216_v5.Designer.cs | 3830 ----------------- .../Migrations/Mysql/20240502233216_v5.cs | 1614 ------- ...0518221440_guidlconfig-cleanup.Designer.cs | 3819 ---------------- .../20240518221440_guidlconfig-cleanup.cs | 702 --- ...611180516_remove-patron-limits.Designer.cs | 3784 ---------------- .../20240611180516_remove-patron-limits.cs | 44 - .../Mysql/20240627033532_honeypot.Designer.cs | 3803 ---------------- .../Mysql/20240627033532_honeypot.cs | 36 - .../20240911104906_greet-settings.Designer.cs | 3790 ---------------- .../Mysql/20240911104906_greet-settings.cs | 202 - .../Mysql/MysqlContextModelSnapshot.cs | 3787 ---------------- src/EllieBot/creds_example.yml | 3 +- 51 files changed, 39 insertions(+), 88625 deletions(-) delete mode 100644 src/EllieBot/Db/MysqlContext.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220429044757_bank.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240502233216_v5.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs delete mode 100644 src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs delete mode 100644 src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index 724a862..11a3d65 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -690,6 +690,17 @@ public abstract class EllieContext : DbContext }) .IsUnique()); + modelBuilder.Entity(gs => + { + gs + .Property(x => x.IsEnabled) + .HasDefaultValue(false); + + gs + .Property(x => x.AutoDeleteTimer) + .HasDefaultValue(0); + }); + #endregion } diff --git a/src/EllieBot/Db/EllieDbService.cs b/src/EllieBot/Db/EllieDbService.cs index 2a3382e..d117c86 100644 --- a/src/EllieBot/Db/EllieDbService.cs +++ b/src/EllieBot/Db/EllieDbService.cs @@ -44,8 +44,6 @@ public sealed class EllieDbService : DbService case "postgres": case "pgsql": return new PostgreSqlContext(connString); - case "mysql": - return new MysqlContext(connString); case "sqlite": return new SqliteContext(connString); default: diff --git a/src/EllieBot/Db/MysqlContext.cs b/src/EllieBot/Db/MysqlContext.cs deleted file mode 100644 index 7563640..0000000 --- a/src/EllieBot/Db/MysqlContext.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public sealed class MysqlContext : EllieContext -{ - private readonly string _connStr; - private readonly string _version; - - protected override string CurrencyTransactionOtherIdDefaultValue - => "NULL"; - - public MysqlContext(string connStr = "Server=localhost", string version = "8.0") - { - _connStr = connStr; - _version = version; - } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder - .UseLowerCaseNamingConvention() - .UseMySql(_connStr, ServerVersion.Parse(_version)); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - // mysql is case insensitive by default - // we can set binary collation to change that - modelBuilder.Entity() - .Property(x => x.Name) - .UseCollation("utf8mb4_bin"); - } -} \ No newline at end of file diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 49817b1..ebcd4b2 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -91,7 +91,6 @@ - diff --git a/src/EllieBot/Migrations/MigrationQueries.cs b/src/EllieBot/Migrations/MigrationQueries.cs index a20f4a3..93f4249 100644 --- a/src/EllieBot/Migrations/MigrationQueries.cs +++ b/src/EllieBot/Migrations/MigrationQueries.cs @@ -7,16 +7,7 @@ public static class MigrationQueries { public static void MigrateRero(MigrationBuilder migrationBuilder) { - if (migrationBuilder.IsMySql()) - { - migrationBuilder.Sql( - @"INSERT IGNORE into reactionroles(guildid, channelid, messageid, emote, roleid, `group`, levelreq, dateadded) -select guildid, channelid, messageid, emotename, roleid, exclusive, 0, reactionrolemessage.dateadded -from reactionrole -left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid -left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;"); - } - else if (migrationBuilder.IsSqlite()) + if (migrationBuilder.IsSqlite()) { migrationBuilder.Sql( @"insert or ignore into reactionroles(guildid, channelid, messageid, emote, roleid, 'group', levelreq, dateadded) @@ -27,7 +18,8 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;") } else if (migrationBuilder.IsNpgsql()) { - migrationBuilder.Sql(@"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded) + migrationBuilder.Sql( + @"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded) select guildid, channelid, messageid, emotename, roleid, exclusive::int, 0, reactionrolemessage.dateadded from reactionrole left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid @@ -43,15 +35,34 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;") public static void GuildConfigCleanup(MigrationBuilder builder) { builder.Sql($""" + DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; + DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); DELETE FROM "StreamRoleBlacklistedUser" WHERE "StreamRoleSettingsId" is NULL; """); + } - builder.Sql($""" - DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; - """); - + public static void GreetSettingsCopy(MigrationBuilder builder) + { builder.Sql(""" - DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer + FROM GuildConfigs + WHERE SendChannelGreetMessage = TRUE; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0 + FROM GuildConfigs + WHERE SendDmGreetMessage = TRUE; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer + FROM GuildConfigs + WHERE SendChannelByeMessage = TRUE; + + INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) + SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter + FROM GuildConfigs + WHERE SendBoostMessage = TRUE; """); } } \ No newline at end of file diff --git a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs deleted file mode 100644 index 458c74a..0000000 --- a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs +++ /dev/null @@ -1,3425 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220409170652_mysql-init")] - partial class mysqlinit - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("tinyint(1)") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("longtext") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("int") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("int") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("varchar(255)") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("int") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs deleted file mode 100644 index b857ff5..0000000 --- a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs +++ /dev/null @@ -1,2342 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class mysqlinit : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "autocommands", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - commandtext = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - channelid = table.Column(type: "bigint unsigned", nullable: false), - channelname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildid = table.Column(type: "bigint unsigned", nullable: true), - guildname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - voicechannelid = table.Column(type: "bigint unsigned", nullable: true), - voicechannelname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - interval = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autocommands", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "autotranslatechannels", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - autodelete = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autotranslatechannels", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "bantemplates", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - text = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_bantemplates", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "blacklist", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - itemid = table.Column(type: "bigint unsigned", nullable: false), - type = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_blacklist", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "currencytransactions", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - amount = table.Column(type: "bigint", nullable: false), - note = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - userid = table.Column(type: "bigint unsigned", nullable: false), - type = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - extra = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - otherid = table.Column(type: "bigint unsigned", nullable: true, defaultValueSql: "NULL"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_currencytransactions", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "discordpermoverrides", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - perm = table.Column(type: "bigint unsigned", nullable: false), - guildid = table.Column(type: "bigint unsigned", nullable: true), - command = table.Column(type: "varchar(255)", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_discordpermoverrides", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "expressions", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: true), - response = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - trigger = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - autodeletetrigger = table.Column(type: "tinyint(1)", nullable: false), - dmresponse = table.Column(type: "tinyint(1)", nullable: false), - containsanywhere = table.Column(type: "tinyint(1)", nullable: false), - allowtarget = table.Column(type: "tinyint(1)", nullable: false), - reactions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_expressions", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "guildconfigs", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - prefix = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - deletemessageoncommand = table.Column(type: "tinyint(1)", nullable: false), - autoassignroleids = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - autodeletegreetmessagestimer = table.Column(type: "int", nullable: false), - autodeletebyemessagestimer = table.Column(type: "int", nullable: false), - greetmessagechannelid = table.Column(type: "bigint unsigned", nullable: false), - byemessagechannelid = table.Column(type: "bigint unsigned", nullable: false), - senddmgreetmessage = table.Column(type: "tinyint(1)", nullable: false), - dmgreetmessagetext = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - sendchannelgreetmessage = table.Column(type: "tinyint(1)", nullable: false), - channelgreetmessagetext = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - sendchannelbyemessage = table.Column(type: "tinyint(1)", nullable: false), - channelbyemessagetext = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - exclusiveselfassignedroles = table.Column(type: "tinyint(1)", nullable: false), - autodeleteselfassignedrolemessages = table.Column(type: "tinyint(1)", nullable: false), - verbosepermissions = table.Column(type: "tinyint(1)", nullable: false), - permissionrole = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - filterinvites = table.Column(type: "tinyint(1)", nullable: false), - filterlinks = table.Column(type: "tinyint(1)", nullable: false), - filterwords = table.Column(type: "tinyint(1)", nullable: false), - muterolename = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - cleverbotenabled = table.Column(type: "tinyint(1)", nullable: false), - locale = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - timezoneid = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - warningsinitialized = table.Column(type: "tinyint(1)", nullable: false), - gamevoicechannel = table.Column(type: "bigint unsigned", nullable: true), - verboseerrors = table.Column(type: "tinyint(1)", nullable: false), - notifystreamoffline = table.Column(type: "tinyint(1)", nullable: false), - warnexpirehours = table.Column(type: "int", nullable: false), - warnexpireaction = table.Column(type: "int", nullable: false), - sendboostmessage = table.Column(type: "tinyint(1)", nullable: false), - boostmessage = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - boostmessagechannelid = table.Column(type: "bigint unsigned", nullable: false), - boostmessagedeleteafter = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_guildconfigs", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "imageonlychannels", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_imageonlychannels", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "logsettings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - logotherid = table.Column(type: "bigint unsigned", nullable: true), - messageupdatedid = table.Column(type: "bigint unsigned", nullable: true), - messagedeletedid = table.Column(type: "bigint unsigned", nullable: true), - userjoinedid = table.Column(type: "bigint unsigned", nullable: true), - userleftid = table.Column(type: "bigint unsigned", nullable: true), - userbannedid = table.Column(type: "bigint unsigned", nullable: true), - userunbannedid = table.Column(type: "bigint unsigned", nullable: true), - userupdatedid = table.Column(type: "bigint unsigned", nullable: true), - channelcreatedid = table.Column(type: "bigint unsigned", nullable: true), - channeldestroyedid = table.Column(type: "bigint unsigned", nullable: true), - channelupdatedid = table.Column(type: "bigint unsigned", nullable: true), - usermutedid = table.Column(type: "bigint unsigned", nullable: true), - loguserpresenceid = table.Column(type: "bigint unsigned", nullable: true), - logvoicepresenceid = table.Column(type: "bigint unsigned", nullable: true), - logvoicepresencettsid = table.Column(type: "bigint unsigned", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_logsettings", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "musicplayersettings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - playerrepeat = table.Column(type: "int", nullable: false), - musicchannelid = table.Column(type: "bigint unsigned", nullable: true), - volume = table.Column(type: "int", nullable: false, defaultValue: 100), - autodisconnect = table.Column(type: "tinyint(1)", nullable: false), - qualitypreset = table.Column(type: "int", nullable: false), - autoplay = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_musicplayersettings", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "musicplaylists", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - author = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - authorid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_musicplaylists", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "nsfwblacklistedtags", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - tag = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "plantedcurrency", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - amount = table.Column(type: "bigint", nullable: false), - password = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - userid = table.Column(type: "bigint unsigned", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_plantedcurrency", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "poll", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - question = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_poll", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "quotes", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - keyword = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - authorname = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - authorid = table.Column(type: "bigint unsigned", nullable: false), - text = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_quotes", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "reminders", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - when = table.Column(type: "datetime(6)", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - serverid = table.Column(type: "bigint unsigned", nullable: false), - userid = table.Column(type: "bigint unsigned", nullable: false), - message = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - isprivate = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reminders", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "repeaters", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - lastmessageid = table.Column(type: "bigint unsigned", nullable: true), - message = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - interval = table.Column(type: "time(6)", nullable: false), - starttimeofday = table.Column(type: "time(6)", nullable: true), - noredundant = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_repeaters", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "rewardedusers", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - patreonuserid = table.Column(type: "varchar(255)", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - amountrewardedthismonth = table.Column(type: "int", nullable: false), - lastreward = table.Column(type: "datetime(6)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_rewardedusers", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "rotatingstatus", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - status = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - type = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_rotatingstatus", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "selfassignableroles", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: false), - group = table.Column(type: "int", nullable: false, defaultValue: 0), - levelrequirement = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_selfassignableroles", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "userxpstats", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - guildid = table.Column(type: "bigint unsigned", nullable: false), - xp = table.Column(type: "int", nullable: false), - awardedxp = table.Column(type: "int", nullable: false), - notifyonlevelup = table.Column(type: "int", nullable: false), - lastlevelup = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP)"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_userxpstats", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "warnings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - userid = table.Column(type: "bigint unsigned", nullable: false), - reason = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - forgiven = table.Column(type: "tinyint(1)", nullable: false), - forgivenby = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - moderator = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - weight = table.Column(type: "bigint", nullable: false, defaultValue: 1L), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_warnings", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "autotranslateusers", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "int", nullable: false), - userid = table.Column(type: "bigint unsigned", nullable: false), - source = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - target = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autotranslateusers", x => x.id); - table.UniqueConstraint("ak_autotranslateusers_channelid_userid", x => new { x.channelid, x.userid }); - table.ForeignKey( - name: "fk_autotranslateusers_autotranslatechannels_channelid", - column: x => x.channelid, - principalTable: "autotranslatechannels", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "antialtsetting", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - minage = table.Column(type: "time(6)", nullable: false), - action = table.Column(type: "int", nullable: false), - actiondurationminutes = table.Column(type: "int", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antialtsetting", x => x.id); - table.ForeignKey( - name: "fk_antialtsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "antiraidsetting", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - userthreshold = table.Column(type: "int", nullable: false), - seconds = table.Column(type: "int", nullable: false), - action = table.Column(type: "int", nullable: false), - punishduration = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antiraidsetting", x => x.id); - table.ForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "antispamsetting", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - action = table.Column(type: "int", nullable: false), - messagethreshold = table.Column(type: "int", nullable: false), - mutetime = table.Column(type: "int", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antispamsetting", x => x.id); - table.ForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "commandalias", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - trigger = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - mapping = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_commandalias", x => x.id); - table.ForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "commandcooldown", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - seconds = table.Column(type: "int", nullable: false), - commandname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_commandcooldown", x => x.id); - table.ForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "delmsgoncmdchannel", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - state = table.Column(type: "tinyint(1)", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_delmsgoncmdchannel", x => x.id); - table.ForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feedsub", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - url = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_feedsub", x => x.id); - table.UniqueConstraint("ak_feedsub_guildconfigid_url", x => new { x.guildconfigid, x.url }); - table.ForeignKey( - name: "fk_feedsub_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "filterchannelid", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterchannelid", x => x.id); - table.ForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "filteredword", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - word = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filteredword", x => x.id); - table.ForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "filterlinkschannelid", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterlinkschannelid", x => x.id); - table.ForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "filterwordschannelid", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterwordschannelid", x => x.id); - table.ForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "followedstream", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - username = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - type = table.Column(type: "int", nullable: false), - message = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_followedstream", x => x.id); - table.ForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "gcchannelid", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: true), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_gcchannelid", x => x.id); - table.ForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "groupname", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - number = table.Column(type: "int", nullable: false), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_groupname", x => x.id); - table.ForeignKey( - name: "fk_groupname_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "muteduserid", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_muteduserid", x => x.id); - table.ForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "permissions", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: true), - index = table.Column(type: "int", nullable: false), - primarytarget = table.Column(type: "int", nullable: false), - primarytargetid = table.Column(type: "bigint unsigned", nullable: false), - secondarytarget = table.Column(type: "int", nullable: false), - secondarytargetname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - iscustomcommand = table.Column(type: "tinyint(1)", nullable: false), - state = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_permissions", x => x.id); - table.ForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "reactionrolemessage", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - index = table.Column(type: "int", nullable: false), - guildconfigid = table.Column(type: "int", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false), - exclusive = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrolemessage", x => x.id); - table.ForeignKey( - name: "fk_reactionrolemessage_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "shopentry", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - index = table.Column(type: "int", nullable: false), - price = table.Column(type: "int", nullable: false), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - authorid = table.Column(type: "bigint unsigned", nullable: false), - type = table.Column(type: "int", nullable: false), - rolename = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - roleid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_shopentry", x => x.id); - table.ForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "slowmodeignoredrole", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - roleid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_slowmodeignoredrole", x => x.id); - table.ForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "slowmodeignoreduser", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_slowmodeignoreduser", x => x.id); - table.ForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "streamrolesettings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - enabled = table.Column(type: "tinyint(1)", nullable: false), - addroleid = table.Column(type: "bigint unsigned", nullable: false), - fromroleid = table.Column(type: "bigint unsigned", nullable: false), - keyword = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamrolesettings", x => x.id); - table.ForeignKey( - name: "fk_streamrolesettings_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "unbantimer", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - unbanat = table.Column(type: "datetime(6)", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unbantimer", x => x.id); - table.ForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "unmutetimer", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - unmuteat = table.Column(type: "datetime(6)", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unmutetimer", x => x.id); - table.ForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "unroletimer", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: false), - unbanat = table.Column(type: "datetime(6)", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unroletimer", x => x.id); - table.ForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "vcroleinfo", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - voicechannelid = table.Column(type: "bigint unsigned", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: false), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_vcroleinfo", x => x.id); - table.ForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "warningpunishment", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - count = table.Column(type: "int", nullable: false), - punishment = table.Column(type: "int", nullable: false), - time = table.Column(type: "int", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: true), - guildconfigid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_warningpunishment", x => x.id); - table.ForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "xpsettings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - serverexcluded = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpsettings", x => x.id); - table.ForeignKey( - name: "fk_xpsettings_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ignoredlogchannels", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - logsettingid = table.Column(type: "int", nullable: false), - logitemid = table.Column(type: "bigint unsigned", nullable: false), - itemtype = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredlogchannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredlogchannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ignoredvoicepresencechannels", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - logsettingid = table.Column(type: "int", nullable: true), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "playlistsong", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - provider = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - providertype = table.Column(type: "int", nullable: false), - title = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - uri = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - query = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - musicplaylistid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_playlistsong", x => x.id); - table.ForeignKey( - name: "fk_playlistsong_musicplaylists_musicplaylistid", - column: x => x.musicplaylistid, - principalTable: "musicplaylists", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "pollanswer", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - index = table.Column(type: "int", nullable: false), - text = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - pollid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_pollanswer", x => x.id); - table.ForeignKey( - name: "fk_pollanswer_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "pollvote", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - voteindex = table.Column(type: "int", nullable: false), - pollid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_pollvote", x => x.id); - table.ForeignKey( - name: "fk_pollvote_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "antispamignore", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - antispamsettingid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antispamignore", x => x.id); - table.ForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - column: x => x.antispamsettingid, - principalTable: "antispamsetting", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "reactionrole", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - emotename = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - roleid = table.Column(type: "bigint unsigned", nullable: false), - reactionrolemessageid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrole", x => x.id); - table.ForeignKey( - name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", - column: x => x.reactionrolemessageid, - principalTable: "reactionrolemessage", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "shopentryitem", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - text = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - shopentryid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_shopentryitem", x => x.id); - table.ForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - column: x => x.shopentryid, - principalTable: "shopentry", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "streamroleblacklisteduser", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - username = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - streamrolesettingsid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamroleblacklisteduser", x => x.id); - table.ForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", - column: x => x.streamrolesettingsid, - principalTable: "streamrolesettings", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "streamrolewhitelisteduser", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - username = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - streamrolesettingsid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamrolewhitelisteduser", x => x.id); - table.ForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", - column: x => x.streamrolesettingsid, - principalTable: "streamrolesettings", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "excludeditem", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - itemid = table.Column(type: "bigint unsigned", nullable: false), - itemtype = table.Column(type: "int", nullable: false), - xpsettingsid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_excludeditem", x => x.id); - table.ForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "xpcurrencyreward", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - xpsettingsid = table.Column(type: "int", nullable: false), - level = table.Column(type: "int", nullable: false), - amount = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpcurrencyreward", x => x.id); - table.ForeignKey( - name: "fk_xpcurrencyreward_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "xprolereward", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - xpsettingsid = table.Column(type: "int", nullable: false), - level = table.Column(type: "int", nullable: false), - roleid = table.Column(type: "bigint unsigned", nullable: false), - remove = table.Column(type: "tinyint(1)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xprolereward", x => x.id); - table.ForeignKey( - name: "fk_xprolereward_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "clubapplicants", - columns: table => new - { - clubid = table.Column(type: "int", nullable: false), - userid = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_clubapplicants", x => new { x.clubid, x.userid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "clubbans", - columns: table => new - { - clubid = table.Column(type: "int", nullable: false), - userid = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_clubbans", x => new { x.clubid, x.userid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "clubs", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, collation: "utf8mb4_bin") - .Annotation("MySql:CharSet", "utf8mb4"), - description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - imageurl = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - xp = table.Column(type: "int", nullable: false), - ownerid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_clubs", x => x.id); - table.UniqueConstraint("ak_clubs_name", x => x.name); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "discorduser", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - username = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - discriminator = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - avatarid = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - clubid = table.Column(type: "int", nullable: true), - isclubadmin = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - totalxp = table.Column(type: "int", nullable: false, defaultValue: 0), - lastlevelup = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP)"), - lastxpgain = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)"), - notifyonlevelup = table.Column(type: "int", nullable: false, defaultValue: 0), - currencyamount = table.Column(type: "bigint", nullable: false, defaultValue: 0L), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_discorduser", x => x.id); - table.UniqueConstraint("ak_discorduser_userid", x => x.userid); - table.ForeignKey( - name: "fk_discorduser_clubs_clubid", - column: x => x.clubid, - principalTable: "clubs", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "waifuinfo", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - waifuid = table.Column(type: "int", nullable: false), - claimerid = table.Column(type: "int", nullable: true), - affinityid = table.Column(type: "int", nullable: true), - price = table.Column(type: "bigint", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuinfo", x => x.id); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_affinityid", - column: x => x.affinityid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_claimerid", - column: x => x.claimerid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_waifuid", - column: x => x.waifuid, - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "waifuupdates", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "int", nullable: false), - updatetype = table.Column(type: "int", nullable: false), - oldid = table.Column(type: "int", nullable: true), - newid = table.Column(type: "int", nullable: true), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuupdates", x => x.id); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_newid", - column: x => x.newid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_oldid", - column: x => x.oldid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_userid", - column: x => x.userid, - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "waifuitem", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - waifuinfoid = table.Column(type: "int", nullable: true), - itememoji = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuitem", x => x.id); - table.ForeignKey( - name: "fk_waifuitem_waifuinfo_waifuinfoid", - column: x => x.waifuinfoid, - principalTable: "waifuinfo", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_antialtsetting_guildconfigid", - table: "antialtsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_antiraidsetting_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_antispamignore_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid"); - - migrationBuilder.CreateIndex( - name: "ix_antispamsetting_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_autotranslatechannels_channelid", - table: "autotranslatechannels", - column: "channelid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_autotranslatechannels_guildid", - table: "autotranslatechannels", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_bantemplates_guildid", - table: "bantemplates", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_clubapplicants_userid", - table: "clubapplicants", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_clubbans_userid", - table: "clubbans", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_clubs_ownerid", - table: "clubs", - column: "ownerid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_commandalias_guildconfigid", - table: "commandalias", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_commandcooldown_guildconfigid", - table: "commandcooldown", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_currencytransactions_userid", - table: "currencytransactions", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_delmsgoncmdchannel_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_discordpermoverrides_guildid_command", - table: "discordpermoverrides", - columns: new[] { "guildid", "command" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_clubid", - table: "discorduser", - column: "clubid"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_currencyamount", - table: "discorduser", - column: "currencyamount"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_totalxp", - table: "discorduser", - column: "totalxp"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_userid", - table: "discorduser", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_excludeditem_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_filterchannelid_guildconfigid", - table: "filterchannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filteredword_guildconfigid", - table: "filteredword", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filterlinkschannelid_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filterwordschannelid_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_followedstream_guildconfigid", - table: "followedstream", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_gcchannelid_guildconfigid", - table: "gcchannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_groupname_guildconfigid_number", - table: "groupname", - columns: new[] { "guildconfigid", "number" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_guildconfigs_guildid", - table: "guildconfigs", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_guildconfigs_warnexpirehours", - table: "guildconfigs", - column: "warnexpirehours"); - - migrationBuilder.CreateIndex( - name: "ix_ignoredlogchannels_logsettingid_logitemid_itemtype", - table: "ignoredlogchannels", - columns: new[] { "logsettingid", "logitemid", "itemtype" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_ignoredvoicepresencechannels_logsettingid", - table: "ignoredvoicepresencechannels", - column: "logsettingid"); - - migrationBuilder.CreateIndex( - name: "ix_imageonlychannels_channelid", - table: "imageonlychannels", - column: "channelid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_logsettings_guildid", - table: "logsettings", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_musicplayersettings_guildid", - table: "musicplayersettings", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_muteduserid_guildconfigid", - table: "muteduserid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_nsfwblacklistedtags_guildid", - table: "nsfwblacklistedtags", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_permissions_guildconfigid", - table: "permissions", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_plantedcurrency_channelid", - table: "plantedcurrency", - column: "channelid"); - - migrationBuilder.CreateIndex( - name: "ix_plantedcurrency_messageid", - table: "plantedcurrency", - column: "messageid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_playlistsong_musicplaylistid", - table: "playlistsong", - column: "musicplaylistid"); - - migrationBuilder.CreateIndex( - name: "ix_poll_guildid", - table: "poll", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_pollanswer_pollid", - table: "pollanswer", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_pollvote_pollid", - table: "pollvote", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_quotes_guildid", - table: "quotes", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_quotes_keyword", - table: "quotes", - column: "keyword"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrole_reactionrolemessageid", - table: "reactionrole", - column: "reactionrolemessageid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrolemessage_guildconfigid", - table: "reactionrolemessage", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_reminders_when", - table: "reminders", - column: "when"); - - migrationBuilder.CreateIndex( - name: "ix_rewardedusers_patreonuserid", - table: "rewardedusers", - column: "patreonuserid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_selfassignableroles_guildid_roleid", - table: "selfassignableroles", - columns: new[] { "guildid", "roleid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_shopentry_guildconfigid", - table: "shopentry", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_shopentryitem_shopentryid", - table: "shopentryitem", - column: "shopentryid"); - - migrationBuilder.CreateIndex( - name: "ix_slowmodeignoredrole_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_slowmodeignoreduser_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_streamroleblacklisteduser_streamrolesettingsid", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_streamrolesettings_guildconfigid", - table: "streamrolesettings", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_streamrolewhitelisteduser_streamrolesettingsid", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_unbantimer_guildconfigid", - table: "unbantimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_unmutetimer_guildconfigid", - table: "unmutetimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_unroletimer_guildconfigid", - table: "unroletimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_awardedxp", - table: "userxpstats", - column: "awardedxp"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_guildid", - table: "userxpstats", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_userid", - table: "userxpstats", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_userid_guildid", - table: "userxpstats", - columns: new[] { "userid", "guildid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_xp", - table: "userxpstats", - column: "xp"); - - migrationBuilder.CreateIndex( - name: "ix_vcroleinfo_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_affinityid", - table: "waifuinfo", - column: "affinityid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_claimerid", - table: "waifuinfo", - column: "claimerid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_price", - table: "waifuinfo", - column: "price"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_waifuid", - table: "waifuinfo", - column: "waifuid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_waifuitem_waifuinfoid", - table: "waifuitem", - column: "waifuinfoid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_newid", - table: "waifuupdates", - column: "newid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_oldid", - table: "waifuupdates", - column: "oldid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_userid", - table: "waifuupdates", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_warningpunishment_guildconfigid", - table: "warningpunishment", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_dateadded", - table: "warnings", - column: "dateadded"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_guildid", - table: "warnings", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_userid", - table: "warnings", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_xpcurrencyreward_xpsettingsid", - table: "xpcurrencyreward", - column: "xpsettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_xprolereward_xpsettingsid_level", - table: "xprolereward", - columns: new[] { "xpsettingsid", "level" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_xpsettings_guildconfigid", - table: "xpsettings", - column: "guildconfigid", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_clubapplicants_clubs_clubid", - table: "clubapplicants", - column: "clubid", - principalTable: "clubs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubapplicants_discorduser_userid", - table: "clubapplicants", - column: "userid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubbans_clubs_clubid", - table: "clubbans", - column: "clubid", - principalTable: "clubs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubbans_discorduser_userid", - table: "clubbans", - column: "userid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubs_discorduser_ownerid", - table: "clubs", - column: "ownerid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.SetNull); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_discorduser_clubs_clubid", - table: "discorduser"); - - migrationBuilder.DropTable( - name: "antialtsetting"); - - migrationBuilder.DropTable( - name: "antiraidsetting"); - - migrationBuilder.DropTable( - name: "antispamignore"); - - migrationBuilder.DropTable( - name: "autocommands"); - - migrationBuilder.DropTable( - name: "autotranslateusers"); - - migrationBuilder.DropTable( - name: "bantemplates"); - - migrationBuilder.DropTable( - name: "blacklist"); - - migrationBuilder.DropTable( - name: "clubapplicants"); - - migrationBuilder.DropTable( - name: "clubbans"); - - migrationBuilder.DropTable( - name: "commandalias"); - - migrationBuilder.DropTable( - name: "commandcooldown"); - - migrationBuilder.DropTable( - name: "currencytransactions"); - - migrationBuilder.DropTable( - name: "delmsgoncmdchannel"); - - migrationBuilder.DropTable( - name: "discordpermoverrides"); - - migrationBuilder.DropTable( - name: "excludeditem"); - - migrationBuilder.DropTable( - name: "expressions"); - - migrationBuilder.DropTable( - name: "feedsub"); - - migrationBuilder.DropTable( - name: "filterchannelid"); - - migrationBuilder.DropTable( - name: "filteredword"); - - migrationBuilder.DropTable( - name: "filterlinkschannelid"); - - migrationBuilder.DropTable( - name: "filterwordschannelid"); - - migrationBuilder.DropTable( - name: "followedstream"); - - migrationBuilder.DropTable( - name: "gcchannelid"); - - migrationBuilder.DropTable( - name: "groupname"); - - migrationBuilder.DropTable( - name: "ignoredlogchannels"); - - migrationBuilder.DropTable( - name: "ignoredvoicepresencechannels"); - - migrationBuilder.DropTable( - name: "imageonlychannels"); - - migrationBuilder.DropTable( - name: "musicplayersettings"); - - migrationBuilder.DropTable( - name: "muteduserid"); - - migrationBuilder.DropTable( - name: "nsfwblacklistedtags"); - - migrationBuilder.DropTable( - name: "permissions"); - - migrationBuilder.DropTable( - name: "plantedcurrency"); - - migrationBuilder.DropTable( - name: "playlistsong"); - - migrationBuilder.DropTable( - name: "pollanswer"); - - migrationBuilder.DropTable( - name: "pollvote"); - - migrationBuilder.DropTable( - name: "quotes"); - - migrationBuilder.DropTable( - name: "reactionrole"); - - migrationBuilder.DropTable( - name: "reminders"); - - migrationBuilder.DropTable( - name: "repeaters"); - - migrationBuilder.DropTable( - name: "rewardedusers"); - - migrationBuilder.DropTable( - name: "rotatingstatus"); - - migrationBuilder.DropTable( - name: "selfassignableroles"); - - migrationBuilder.DropTable( - name: "shopentryitem"); - - migrationBuilder.DropTable( - name: "slowmodeignoredrole"); - - migrationBuilder.DropTable( - name: "slowmodeignoreduser"); - - migrationBuilder.DropTable( - name: "streamroleblacklisteduser"); - - migrationBuilder.DropTable( - name: "streamrolewhitelisteduser"); - - migrationBuilder.DropTable( - name: "unbantimer"); - - migrationBuilder.DropTable( - name: "unmutetimer"); - - migrationBuilder.DropTable( - name: "unroletimer"); - - migrationBuilder.DropTable( - name: "userxpstats"); - - migrationBuilder.DropTable( - name: "vcroleinfo"); - - migrationBuilder.DropTable( - name: "waifuitem"); - - migrationBuilder.DropTable( - name: "waifuupdates"); - - migrationBuilder.DropTable( - name: "warningpunishment"); - - migrationBuilder.DropTable( - name: "warnings"); - - migrationBuilder.DropTable( - name: "xpcurrencyreward"); - - migrationBuilder.DropTable( - name: "xprolereward"); - - migrationBuilder.DropTable( - name: "antispamsetting"); - - migrationBuilder.DropTable( - name: "autotranslatechannels"); - - migrationBuilder.DropTable( - name: "logsettings"); - - migrationBuilder.DropTable( - name: "musicplaylists"); - - migrationBuilder.DropTable( - name: "poll"); - - migrationBuilder.DropTable( - name: "reactionrolemessage"); - - migrationBuilder.DropTable( - name: "shopentry"); - - migrationBuilder.DropTable( - name: "streamrolesettings"); - - migrationBuilder.DropTable( - name: "waifuinfo"); - - migrationBuilder.DropTable( - name: "xpsettings"); - - migrationBuilder.DropTable( - name: "guildconfigs"); - - migrationBuilder.DropTable( - name: "clubs"); - - migrationBuilder.DropTable( - name: "discorduser"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs deleted file mode 100644 index 3eef208..0000000 --- a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs +++ /dev/null @@ -1,3429 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220428044612_stondel")] - partial class stondel - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("tinyint(1)") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("longtext") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("int") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("int") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("varchar(255)") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("int") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs deleted file mode 100644 index 2daa4c0..0000000 --- a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class stondel : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "deletestreamonlinemessage", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "deletestreamonlinemessage", - table: "guildconfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs b/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs deleted file mode 100644 index f47381e..0000000 --- a/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs +++ /dev/null @@ -1,3458 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220429044757_bank")] - partial class bank - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("tinyint(1)") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("longtext") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("int") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("int") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("varchar(255)") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("int") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs b/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs deleted file mode 100644 index 3fe3ee6..0000000 --- a/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class bank : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "bankusers", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - balance = table.Column(type: "bigint", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_bankusers", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_bankusers_userid", - table: "bankusers", - column: "userid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "bankusers"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs deleted file mode 100644 index ef0f91b..0000000 --- a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs +++ /dev/null @@ -1,3411 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220504162509_new-rero")] - partial class newrero - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("tinyint(1)") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("int") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("varchar(255)") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("int") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs deleted file mode 100644 index 9090ab2..0000000 --- a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class newrero : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - - migrationBuilder.CreateTable( - name: "reactionroles", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false), - emote = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - roleid = table.Column(type: "bigint unsigned", nullable: false), - group = table.Column(type: "int", nullable: false), - levelreq = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionroles", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_reactionroles_guildid", - table: "reactionroles", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionroles_messageid_emote", - table: "reactionroles", - columns: new[] { "messageid", "emote" }, - unique: true); - - MigrationQueries.MigrateRero(migrationBuilder); - - migrationBuilder.DropTable( - name: "reactionrole"); - - migrationBuilder.DropTable( - name: "reactionrolemessage"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "reactionroles"); - - migrationBuilder.CreateTable( - name: "reactionrolemessage", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildconfigid = table.Column(type: "int", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true), - exclusive = table.Column(type: "tinyint(1)", nullable: false), - index = table.Column(type: "int", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrolemessage", x => x.id); - table.ForeignKey( - name: "fk_reactionrolemessage_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "reactionrole", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - dateadded = table.Column(type: "datetime(6)", nullable: true), - emotename = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - reactionrolemessageid = table.Column(type: "int", nullable: true), - roleid = table.Column(type: "bigint unsigned", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrole", x => x.id); - table.ForeignKey( - name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", - column: x => x.reactionrolemessageid, - principalTable: "reactionrolemessage", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrole_reactionrolemessageid", - table: "reactionrole", - column: "reactionrolemessageid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrolemessage_guildconfigid", - table: "reactionrolemessage", - column: "guildconfigid"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs deleted file mode 100644 index 9ae3e46..0000000 --- a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs +++ /dev/null @@ -1,3481 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220614071410_patronage-system")] - partial class patronagesystem - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs deleted file mode 100644 index eb04272..0000000 --- a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs +++ /dev/null @@ -1,175 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class patronagesystem : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "patreonuserid", - table: "rewardedusers", - newName: "platformuserid"); - - migrationBuilder.RenameIndex( - name: "ix_rewardedusers_patreonuserid", - table: "rewardedusers", - newName: "ix_rewardedusers_platformuserid"); - - migrationBuilder.AlterColumn( - name: "xp", - table: "userxpstats", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "awardedxp", - table: "userxpstats", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "amountrewardedthismonth", - table: "rewardedusers", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "verboseerrors", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: true, - oldClrType: typeof(bool), - oldType: "tinyint(1)"); - - migrationBuilder.AlterColumn( - name: "totalxp", - table: "discorduser", - type: "bigint", - nullable: false, - defaultValue: 0L, - oldClrType: typeof(int), - oldType: "int", - oldDefaultValue: 0); - - migrationBuilder.CreateTable( - name: "patronquotas", - columns: table => new - { - userid = table.Column(type: "bigint unsigned", nullable: false), - featuretype = table.Column(type: "int", nullable: false), - feature = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - hourlycount = table.Column(type: "int unsigned", nullable: false), - dailycount = table.Column(type: "int unsigned", nullable: false), - monthlycount = table.Column(type: "int unsigned", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "patrons", - columns: table => new - { - userid = table.Column(type: "bigint unsigned", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - uniqueplatformuserid = table.Column(type: "varchar(255)", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - amountcents = table.Column(type: "int", nullable: false), - lastcharge = table.Column(type: "datetime(6)", nullable: false), - validthru = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patrons", x => x.userid); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_patronquotas_userid", - table: "patronquotas", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_patrons_uniqueplatformuserid", - table: "patrons", - column: "uniqueplatformuserid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "patronquotas"); - - migrationBuilder.DropTable( - name: "patrons"); - - migrationBuilder.RenameColumn( - name: "platformuserid", - table: "rewardedusers", - newName: "patreonuserid"); - - migrationBuilder.RenameIndex( - name: "ix_rewardedusers_platformuserid", - table: "rewardedusers", - newName: "ix_rewardedusers_patreonuserid"); - - migrationBuilder.AlterColumn( - name: "xp", - table: "userxpstats", - type: "int", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "awardedxp", - table: "userxpstats", - type: "int", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "amountrewardedthismonth", - table: "rewardedusers", - type: "int", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "verboseerrors", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - oldClrType: typeof(bool), - oldType: "tinyint(1)", - oldDefaultValue: true); - - migrationBuilder.AlterColumn( - name: "totalxp", - table: "discorduser", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(long), - oldType: "bigint", - oldDefaultValue: 0L); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs deleted file mode 100644 index 3b4cb17..0000000 --- a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs +++ /dev/null @@ -1,3514 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220623090718_stondel-db-cache")] - partial class stondeldbcache - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs deleted file mode 100644 index b3e2d00..0000000 --- a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class stondeldbcache : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "streamonlinemessages", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false), - type = table.Column(type: "int", nullable: false), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamonlinemessages", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "streamonlinemessages"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs deleted file mode 100644 index 9a940a3..0000000 --- a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs +++ /dev/null @@ -1,3518 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220703194400_logwarns")] - partial class logwarns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs deleted file mode 100644 index 02adc4e..0000000 --- a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class logwarns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "logwarnsid", - table: "logsettings", - type: "bigint unsigned", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "logwarnsid", - table: "logsettings"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs deleted file mode 100644 index e887ab4..0000000 --- a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs +++ /dev/null @@ -1,3556 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220725155953_xpitemshop")] - partial class xpitemshop - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs deleted file mode 100644 index be9530f..0000000 --- a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class xpitemshop : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "xpshopowneditem", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - itemtype = table.Column(type: "int", nullable: false), - isusing = table.Column(type: "tinyint(1)", nullable: false), - itemkey = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpshopowneditem", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_xpshopowneditem_userid_itemtype_itemkey", - table: "xpshopowneditem", - columns: new[] { "userid", "itemtype", "itemkey" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "xpshopowneditem"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs deleted file mode 100644 index 11a1e05..0000000 --- a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs +++ /dev/null @@ -1,3560 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220727033931_linkonly-channels")] - partial class linkonlychannels - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("datetime(6)") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("(UTC_TIMESTAMP)"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs deleted file mode 100644 index 95a31e3..0000000 --- a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class linkonlychannels : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "type", - table: "imageonlychannels", - type: "int", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "type", - table: "imageonlychannels"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs deleted file mode 100644 index 26d81e5..0000000 --- a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs +++ /dev/null @@ -1,3542 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220808141855_remove-obsolete-xp-columns")] - partial class removeobsoletexpcolumns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs deleted file mode 100644 index 96daeaf..0000000 --- a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class removeobsoletexpcolumns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "lastlevelup", - table: "userxpstats"); - - migrationBuilder.DropColumn( - name: "lastlevelup", - table: "discorduser"); - - migrationBuilder.DropColumn( - name: "lastxpgain", - table: "discorduser"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "lastlevelup", - table: "userxpstats", - type: "datetime(6)", - nullable: false, - defaultValueSql: "(UTC_TIMESTAMP)"); - - migrationBuilder.AddColumn( - name: "lastlevelup", - table: "discorduser", - type: "datetime(6)", - nullable: false, - defaultValueSql: "(UTC_TIMESTAMP)"); - - migrationBuilder.AddColumn( - name: "lastxpgain", - table: "discorduser", - type: "datetime(6)", - nullable: false, - defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs deleted file mode 100644 index 19d21c1..0000000 --- a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs +++ /dev/null @@ -1,3546 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220831142722_banprune")] - partial class banprune - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs deleted file mode 100644 index 5a1c7b7..0000000 --- a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class banprune : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "prunedays", - table: "bantemplates", - type: "int", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "prunedays", - table: "bantemplates"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs deleted file mode 100644 index 031585a..0000000 --- a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs +++ /dev/null @@ -1,3550 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220913192520_shop-role-req")] - partial class shoprolereq - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs deleted file mode 100644 index 6d52a2c..0000000 --- a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class shoprolereq : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "rolerequirement", - table: "shopentry", - type: "bigint unsigned", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "rolerequirement", - table: "shopentry"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs deleted file mode 100644 index af77b12..0000000 --- a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs +++ /dev/null @@ -1,3579 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20220916194514_autopub")] - partial class autopub - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs deleted file mode 100644 index b3f24dc..0000000 --- a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class autopub : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "autopublishchannel", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autopublishchannel", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_autopublishchannel_guildid", - table: "autopublishchannel", - column: "guildid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "autopublishchannel"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs deleted file mode 100644 index c2041d8..0000000 --- a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs +++ /dev/null @@ -1,3612 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20221003175743_gambling-stats")] - partial class gamblingstats - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs deleted file mode 100644 index 351ed01..0000000 --- a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class gamblingstats : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "gamblingstats", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - feature = table.Column(type: "varchar(255)", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - bet = table.Column(type: "decimal(65,30)", nullable: false), - paidout = table.Column(type: "decimal(65,30)", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_gamblingstats", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_gamblingstats_feature", - table: "gamblingstats", - column: "feature", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "gamblingstats"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs deleted file mode 100644 index a953c5f..0000000 --- a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs +++ /dev/null @@ -1,3616 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20221021192758_toggle-global-expressions")] - partial class toggleglobalexpressions - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs deleted file mode 100644 index ebbcc38..0000000 --- a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class toggleglobalexpressions : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "disableglobalexpressions", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "disableglobalexpressions", - table: "guildconfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs deleted file mode 100644 index ba0d48a..0000000 --- a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs +++ /dev/null @@ -1,3624 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20221118195208_log-thread")] - partial class logthread - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs deleted file mode 100644 index 5b2b38d..0000000 --- a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class logthread : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "threadcreatedid", - table: "logsettings", - type: "bigint unsigned", - nullable: true); - - migrationBuilder.AddColumn( - name: "threaddeletedid", - table: "logsettings", - type: "bigint unsigned", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "threadcreatedid", - table: "logsettings"); - - migrationBuilder.DropColumn( - name: "threaddeletedid", - table: "logsettings"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs deleted file mode 100644 index d21380b..0000000 --- a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs +++ /dev/null @@ -1,3628 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20221122204432_feed-text")] - partial class feedtext - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("longtext") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("longtext") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("int") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("int") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs deleted file mode 100644 index c9760b4..0000000 --- a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - public partial class feedtext : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "message", - table: "feedsub", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "message", - table: "feedsub"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs b/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs deleted file mode 100644 index 4c8220f..0000000 --- a/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs +++ /dev/null @@ -1,3830 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20240502233216_v5")] - partial class v5 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs b/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs deleted file mode 100644 index 24234b4..0000000 --- a/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs +++ /dev/null @@ -1,1614 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - /// - public partial class v5 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "nsfwblacklistedtags"); - - migrationBuilder.DropTable( - name: "pollanswer"); - - migrationBuilder.DropTable( - name: "pollvote"); - - migrationBuilder.DropTable( - name: "poll"); - - migrationBuilder.DropUniqueConstraint( - name: "ak_clubs_name", - table: "clubs"); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpshopowneditem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpsettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xprolereward", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpcurrencyreward", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "warnings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "warningpunishment", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuupdates", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuitem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuinfo", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "vcroleinfo", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "userxpstats", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unroletimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unmutetimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unbantimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamrolewhitelisteduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamrolesettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamroleblacklisteduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamonlinemessages", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "slowmodeignoreduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "slowmodeignoredrole", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "shopentryitem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "shopentry", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddColumn( - name: "command", - table: "shopentry", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "id", - table: "selfassignableroles", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "rotatingstatus", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "rewardedusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "repeaters", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "reminders", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddColumn( - name: "type", - table: "reminders", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AlterColumn( - name: "id", - table: "reactionroles", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "quotes", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "playlistsong", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "plantedcurrency", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "permissions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "userid", - table: "patrons", - type: "bigint unsigned", - nullable: false, - oldClrType: typeof(ulong), - oldType: "bigint unsigned") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "muteduserid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "musicplaylists", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "musicplayersettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "logsettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "imageonlychannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "ignoredvoicepresencechannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "ignoredlogchannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "guildconfigs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddColumn( - name: "stickyroles", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "id", - table: "groupname", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "gcchannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "gamblingstats", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "followedstream", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterwordschannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterlinkschannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filteredword", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterchannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "feedsub", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "expressions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "excludeditem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "discorduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "discordpermoverrides", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "delmsgoncmdchannel", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "currencytransactions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "commandcooldown", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "commandalias", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "name", - table: "clubs", - type: "varchar(20)", - maxLength: 20, - nullable: true, - collation: "utf8mb4_bin", - oldClrType: typeof(string), - oldType: "varchar(20)", - oldMaxLength: 20, - oldCollation: "utf8mb4_bin") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "id", - table: "clubs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "blacklist", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "bantemplates", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "bankusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autotranslateusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autotranslatechannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autopublishchannel", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autocommands", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antispamsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antispamignore", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antiraidsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antialtsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.CreateTable( - name: "giveawaymodel", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - messageid = table.Column(type: "bigint unsigned", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - message = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - endsat = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_giveawaymodel", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "stickyroles", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - roleids = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - userid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_stickyroles", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "todosarchive", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("pk_todosarchive", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "giveawayuser", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - giveawayid = table.Column(type: "int", nullable: false), - userid = table.Column(type: "bigint unsigned", nullable: false), - name = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("pk_giveawayuser", x => x.id); - table.ForeignKey( - name: "fk_giveawayuser_giveawaymodel_giveawayid", - column: x => x.giveawayid, - principalTable: "giveawaymodel", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "todos", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - userid = table.Column(type: "bigint unsigned", nullable: false), - todo = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - dateadded = table.Column(type: "datetime(6)", nullable: false), - isdone = table.Column(type: "tinyint(1)", nullable: false), - archiveid = table.Column(type: "int", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_todos", x => x.id); - table.ForeignKey( - name: "fk_todos_todosarchive_archiveid", - column: x => x.archiveid, - principalTable: "todosarchive", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_clubs_name", - table: "clubs", - column: "name", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_giveawayuser_giveawayid_userid", - table: "giveawayuser", - columns: new[] { "giveawayid", "userid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_stickyroles_guildid_userid", - table: "stickyroles", - columns: new[] { "guildid", "userid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_todos_archiveid", - table: "todos", - column: "archiveid"); - - migrationBuilder.CreateIndex( - name: "ix_todos_userid", - table: "todos", - column: "userid"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "giveawayuser"); - - migrationBuilder.DropTable( - name: "stickyroles"); - - migrationBuilder.DropTable( - name: "todos"); - - migrationBuilder.DropTable( - name: "giveawaymodel"); - - migrationBuilder.DropTable( - name: "todosarchive"); - - migrationBuilder.DropIndex( - name: "ix_clubs_name", - table: "clubs"); - - migrationBuilder.DropColumn( - name: "command", - table: "shopentry"); - - migrationBuilder.DropColumn( - name: "type", - table: "reminders"); - - migrationBuilder.DropColumn( - name: "stickyroles", - table: "guildconfigs"); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpshopowneditem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpsettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xprolereward", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "xpcurrencyreward", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "warnings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "warningpunishment", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuupdates", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuitem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "waifuinfo", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "vcroleinfo", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "userxpstats", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unroletimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unmutetimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "unbantimer", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamrolewhitelisteduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamrolesettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamroleblacklisteduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "streamonlinemessages", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "slowmodeignoreduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "slowmodeignoredrole", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "shopentryitem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "shopentry", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "selfassignableroles", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "rotatingstatus", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "rewardedusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "repeaters", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "reminders", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "reactionroles", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "quotes", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "playlistsong", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "plantedcurrency", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "permissions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "userid", - table: "patrons", - type: "bigint unsigned", - nullable: false, - oldClrType: typeof(ulong), - oldType: "bigint unsigned") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "muteduserid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "musicplaylists", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "musicplayersettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "logsettings", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "imageonlychannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "ignoredvoicepresencechannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "ignoredlogchannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "guildconfigs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "groupname", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "gcchannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "gamblingstats", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "followedstream", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterwordschannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterlinkschannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filteredword", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "filterchannelid", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "feedsub", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "expressions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "excludeditem", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "discorduser", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "discordpermoverrides", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "delmsgoncmdchannel", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "currencytransactions", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "commandcooldown", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "commandalias", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.UpdateData( - table: "clubs", - keyColumn: "name", - keyValue: null, - column: "name", - value: ""); - - migrationBuilder.AlterColumn( - name: "name", - table: "clubs", - type: "varchar(20)", - maxLength: 20, - nullable: false, - collation: "utf8mb4_bin", - oldClrType: typeof(string), - oldType: "varchar(20)", - oldMaxLength: 20, - oldNullable: true, - oldCollation: "utf8mb4_bin") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "id", - table: "clubs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "blacklist", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "bantemplates", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "bankusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autotranslateusers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autotranslatechannels", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autopublishchannel", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "autocommands", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antispamsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antispamignore", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antiraidsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "id", - table: "antialtsetting", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddUniqueConstraint( - name: "ak_clubs_name", - table: "clubs", - column: "name"); - - migrationBuilder.CreateTable( - name: "nsfwblacklistedtags", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true), - guildid = table.Column(type: "bigint unsigned", nullable: false), - tag = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "poll", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true), - guildid = table.Column(type: "bigint unsigned", nullable: false), - question = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("pk_poll", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "pollanswer", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true), - index = table.Column(type: "int", nullable: false), - pollid = table.Column(type: "int", nullable: true), - text = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("pk_pollanswer", x => x.id); - table.ForeignKey( - name: "fk_pollanswer_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "pollvote", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true), - pollid = table.Column(type: "int", nullable: true), - userid = table.Column(type: "bigint unsigned", nullable: false), - voteindex = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_pollvote", x => x.id); - table.ForeignKey( - name: "fk_pollvote_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_nsfwblacklistedtags_guildid", - table: "nsfwblacklistedtags", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_poll_guildid", - table: "poll", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_pollanswer_pollid", - table: "pollanswer", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_pollvote_pollid", - table: "pollvote", - column: "pollid"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs deleted file mode 100644 index 7c2b93b..0000000 --- a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs +++ /dev/null @@ -1,3819 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20240518221440_guidlconfig-cleanup")] - partial class guidlconfigcleanup - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("int") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("int unsigned") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("int unsigned") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("int unsigned") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs deleted file mode 100644 index b76512c..0000000 --- a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs +++ /dev/null @@ -1,702 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - /// - public partial class guidlconfigcleanup : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias"); - - migrationBuilder.DropForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown"); - - migrationBuilder.DropForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel"); - - migrationBuilder.DropForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem"); - - migrationBuilder.DropForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword"); - - migrationBuilder.DropForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream"); - - migrationBuilder.DropForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid"); - - migrationBuilder.DropForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", - table: "streamroleblacklisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", - table: "streamrolewhitelisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer"); - - migrationBuilder.DropForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo"); - - migrationBuilder.DropForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.DropTable( - name: "ignoredvoicepresencechannels"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamrolewhitelisteduser", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "int", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamroleblacklisteduser", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "int", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "guildconfigid", - table: "delmsgoncmdchannel", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "int", - oldNullable: true); - - migrationBuilder.AddForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid", - principalTable: "antispamsetting", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid", - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem", - column: "shopentryid", - principalTable: "shopentry", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias"); - - migrationBuilder.DropForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown"); - - migrationBuilder.DropForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel"); - - migrationBuilder.DropForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem"); - - migrationBuilder.DropForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword"); - - migrationBuilder.DropForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream"); - - migrationBuilder.DropForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid"); - - migrationBuilder.DropForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", - table: "streamroleblacklisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", - table: "streamrolewhitelisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer"); - - migrationBuilder.DropForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo"); - - migrationBuilder.DropForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamrolewhitelisteduser", - type: "int", - nullable: true, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamroleblacklisteduser", - type: "int", - nullable: true, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "guildconfigid", - table: "delmsgoncmdchannel", - type: "int", - nullable: true, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.CreateTable( - name: "ignoredvoicepresencechannels", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - logsettingid = table.Column(type: "int", nullable: true), - channelid = table.Column(type: "bigint unsigned", nullable: false), - dateadded = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_ignoredvoicepresencechannels_logsettingid", - table: "ignoredvoicepresencechannels", - column: "logsettingid"); - - migrationBuilder.AddForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid", - principalTable: "antispamsetting", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid", - principalTable: "xpsettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem", - column: "shopentryid", - principalTable: "shopentry", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs deleted file mode 100644 index fb9293b..0000000 --- a/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs +++ /dev/null @@ -1,3784 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20240611180516_remove-patron-limits")] - partial class removepatronlimits - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs deleted file mode 100644 index 745636a..0000000 --- a/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - /// - public partial class removepatronlimits : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "patronquotas"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "patronquotas", - columns: table => new - { - userid = table.Column(type: "bigint unsigned", nullable: false), - featuretype = table.Column(type: "int", nullable: false), - feature = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - dailycount = table.Column(type: "int unsigned", nullable: false), - hourlycount = table.Column(type: "int unsigned", nullable: false), - monthlycount = table.Column(type: "int unsigned", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_patronquotas_userid", - table: "patronquotas", - column: "userid"); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs deleted file mode 100644 index 8d0bf29..0000000 --- a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs +++ /dev/null @@ -1,3803 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20240627033532_honeypot")] - partial class honeypot - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("int") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("longtext") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("int") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("longtext") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("longtext") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs deleted file mode 100644 index 5032d23..0000000 --- a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - /// - public partial class honeypot : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "honeypotchannels", - columns: table => new - { - guildid = table.Column(type: "bigint unsigned", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - channelid = table.Column(type: "bigint unsigned", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_honeypotchannels", x => x.guildid); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "honeypotchannels"); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs deleted file mode 100644 index d9fd474..0000000 --- a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.Designer.cs +++ /dev/null @@ -1,3790 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - [Migration("20240911104906_greet-settings")] - partial class greetsettings - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDeleteTimer") - .HasColumnType("int") - .HasColumnName("autodeletetimer"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("GreetType") - .HasColumnType("int") - .HasColumnName("greettype"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("isenabled"); - - b.Property("MessageText") - .HasColumnType("longtext") - .HasColumnName("messagetext"); - - b.HasKey("Id") - .HasName("pk_greetsettings"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique() - .HasDatabaseName("ix_greetsettings_guildid_greettype"); - - b.ToTable("greetsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs b/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs deleted file mode 100644 index 5bbb193..0000000 --- a/src/EllieBot/Migrations/Mysql/20240911104906_greet-settings.cs +++ /dev/null @@ -1,202 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - /// - public partial class greetsettings : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "byemessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelbyemessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "dmgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "greetmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendboostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelbyemessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "senddmgreetmessage", - table: "guildconfigs"); - - migrationBuilder.CreateTable( - name: "greetsettings", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - guildid = table.Column(type: "bigint unsigned", nullable: false), - greettype = table.Column(type: "int", nullable: false), - messagetext = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - isenabled = table.Column(type: "tinyint(1)", nullable: false), - channelid = table.Column(type: "bigint unsigned", nullable: true), - autodeletetimer = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_greetsettings", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "ix_greetsettings_guildid_greettype", - table: "greetsettings", - columns: new[] { "guildid", "greettype" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "greetsettings"); - - migrationBuilder.AddColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "boostmessage", - table: "guildconfigs", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "boostmessagechannelid", - table: "guildconfigs", - type: "bigint unsigned", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "byemessagechannelid", - table: "guildconfigs", - type: "bigint unsigned", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "channelbyemessagetext", - table: "guildconfigs", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "channelgreetmessagetext", - table: "guildconfigs", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "dmgreetmessagetext", - table: "guildconfigs", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "greetmessagechannelid", - table: "guildconfigs", - type: "bigint unsigned", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "sendboostmessage", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelbyemessage", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "senddmgreetmessage", - table: "guildconfigs", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - } -} diff --git a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs deleted file mode 100644 index 2f4a13d..0000000 --- a/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs +++ /dev/null @@ -1,3787 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations.Mysql -{ - [DbContext(typeof(MysqlContext))] - partial class MysqlContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("int") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("time(6)") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("int") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("int") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("int") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("int") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("int") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("longtext") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("longtext") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("longtext") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("int") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("longtext") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("tinyint(1)") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("int") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("longtext") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("longtext") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("int") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("longtext") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("longtext") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("name") - .UseCollation("utf8mb4_bin"); - - b.Property("OwnerId") - .HasColumnType("int") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("int") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("longtext") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("longtext") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("int") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("longtext") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("varchar(255)") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("bigint unsigned") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("longtext") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("int") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("longtext") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("longtext") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("decimal(65,30)") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("varchar(255)") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("decimal(65,30)") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("datetime(6)") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("int") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("int") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("longtext") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("CleverbotEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("tinyint(1)") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("tinyint(1)") - .HasColumnName("disableglobalexpressions"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("tinyint(1)") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("tinyint(1)") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("tinyint(1)") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("bigint unsigned") - .HasColumnName("gamevoicechannel"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("longtext") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("longtext") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("tinyint(1)") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("longtext") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasColumnName("prefix"); - - b.Property("StickyRoles") - .HasColumnType("tinyint(1)") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("longtext") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("tinyint(1)") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("int") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("int") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("tinyint(1)") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("bigint unsigned") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("int") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("bigint unsigned") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("bigint unsigned") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("bigint unsigned") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("bigint unsigned") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("bigint unsigned") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("bigint unsigned") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("bigint unsigned") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("tinyint(1)") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("tinyint(1)") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("int") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("int") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("longtext") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("tinyint(1)") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("tinyint(1)") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("tinyint(1)") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("tinyint(1)") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("longtext") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("longtext") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("longtext") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); - - b.Property("AmountCents") - .HasColumnType("int") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("datetime(6)") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("datetime(6)") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("tinyint(1)") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("int") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("bigint unsigned") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("int") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("longtext") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("tinyint(1)") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("longtext") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("int") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("longtext") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("int") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("longtext") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("longtext") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("longtext") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("int") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("int") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("tinyint(1)") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("bigint unsigned") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("datetime(6)") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("time(6)") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("longtext") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("tinyint(1)") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("time(6)") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("datetime(6)") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("varchar(255)") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("longtext") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("int") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("bigint unsigned") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("longtext") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("int") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("int") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("longtext") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("bigint unsigned") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("int") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("longtext") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("longtext") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("bigint unsigned") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("longtext") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("int") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("longtext") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("int") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("tinyint(1)") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("longtext") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("datetime(6)") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("datetime(6)") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("int") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("int") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("int") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("int") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("longtext") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("longtext") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("int") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("int") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("int") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("int") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("int") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("tinyint(1)") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("longtext") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("longtext") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("int") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("int") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("int") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("tinyint(1)") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("bigint unsigned") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("int") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("int") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("tinyint(1)") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("datetime(6)") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("tinyint(1)") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("int") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("bigint unsigned") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AutoDeleteTimer") - .HasColumnType("int") - .HasColumnName("autodeletetimer"); - - b.Property("ChannelId") - .HasColumnType("bigint unsigned") - .HasColumnName("channelid"); - - b.Property("GreetType") - .HasColumnType("int") - .HasColumnName("greettype"); - - b.Property("GuildId") - .HasColumnType("bigint unsigned") - .HasColumnName("guildid"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)") - .HasColumnName("isenabled"); - - b.Property("MessageText") - .HasColumnType("longtext") - .HasColumnName("messagetext"); - - b.HasKey("Id") - .HasName("pk_greetsettings"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique() - .HasDatabaseName("ix_greetsettings_guildid_greettype"); - - b.ToTable("greetsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index 17e45e9..1e0b338 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -80,9 +80,8 @@ db: # Database connection string. # You MUST change this if you're not using "sqlite" type. # Default is "Data Source=data/EllieBot.db" - # Example for mysql: "Server=localhost;Port=3306;Uid=root;Pwd=my_super_secret_mysql_password;Database=ellie" # Example for postgresql: "Server=localhost;Port=5432;User Id=postgres;Password=my_super_secret_postgres_password;Database=ellie;" - connectionString: Data Source=data/EllieBot.db + connectionString: "Server=localhost;Port=3306;Uid=root;Pwd=BFrjAHS9gAzdNcyMN2kg;Database=ellie" # Address and port of the coordinator endpoint. Leave empty for default. # Change only if you've changed the coordinator address or port. coordinatorUrl: http://localhost:3442 -- 2.43.0 From 892eed4196f72270ed66a01f5e68e45a248c5df1 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 14 Sep 2024 00:45:49 +1200 Subject: [PATCH 139/253] Added custom status overload for .adpl. Removed some mentions of nsfw in strings' --- .../PlayingRotate/PlayingRotateCommands.cs | 9 +++- .../Modules/Expressions/EllieExpressions.cs | 6 +-- .../data/strings/commands/commands.en-US.yml | 44 ++++++++++--------- .../strings/responses/responses.en-US.json | 1 - 4 files changed, 34 insertions(+), 26 deletions(-) diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs index bf4909e..cb0384f 100644 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs +++ b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs @@ -20,9 +20,14 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task AddPlaying(ActivityType t, [Leftover] string status) + public Task AddPlaying([Leftover] string status) + => AddPlaying(ActivityType.CustomStatus, status); + + [Cmd] + [OwnerOnly] + public async Task AddPlaying(ActivityType statusType, [Leftover] string status) { - await _service.AddPlaying(t, status); + await _service.AddPlaying(statusType, status); await Response().Confirm(strs.ropl_added).SendAsync(); } diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index e034ad5..d79539c 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -57,14 +57,14 @@ public partial class EllieExpressions : EllieModule [Cmd] [UserPerm(GuildPerm.Administrator)] - public async Task ExprAddServer(string key, [Leftover] string message) + public async Task ExprAddServer(string trigger, [Leftover] string response) { - if (string.IsNullOrWhiteSpace(message) || string.IsNullOrWhiteSpace(key)) + if (string.IsNullOrWhiteSpace(response) || string.IsNullOrWhiteSpace(trigger)) { return; } - await ExprAddInternalAsync(key, message); + await ExprAddInternalAsync(trigger, response); } diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index de8c200..a86baed 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -175,9 +175,9 @@ logignore: params: - { } - target: - desc: "The channel to ignore or show the list of ignored channels for." + desc: "The channel to ignore." - target: - desc: "The user or channel being targeted for logging ignore or inclusion." + desc: "The user to ignore." repeatlist: desc: Lists currently repeating messages and their indexes. ex: @@ -283,10 +283,12 @@ addplaying: - Playing with you - Watching you sleep params: - - t: + - statusType: desc: "The type of status, allowed values are `Playing`, `Watching`, or `Listening`." status: desc: "The status text." + - status: + desc: "The status text." listplaying: desc: Lists all playing statuses and their indexes. ex: @@ -387,18 +389,18 @@ expradd: - '"hello" Hi there %user.mention%' params: - trigger: - desc: "The trigger word or phrase for the bot to respond to users typing." + desc: "The trigger word or phrase (phrase must be in quotes)." response: - desc: "The text of the message that shows up when a user types the trigger word." + desc: "The text of the message that shows up when a user types the trigger word or phrase." expraddserver: desc: 'Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `{0}dpo`. Guide [here]().' ex: - '"hello" Hi there %user.mention%' params: - - key: - desc: "The trigger word or phrase for the bot to respond to users typing." - message: - desc: "The text of the message that shows up when a user types the trigger word." + - trigger: + desc: "The trigger word or phrase (phrase must be in quotes)." + response: + desc: "The text of the message that shows up when a user types the trigger word or phrase." exprlist: desc: |- Lists global or server expressions (20 expressions per page). @@ -496,21 +498,21 @@ delmsgoncmd: - list params: - _: - desc: "The list of channels or servers where the automatic deletion is enabled, disabled, or inherited." + desc: "The word 'list'" - _: - desc: "The server where the command is being executed or monitored for chat flood prevention." + desc: "The word 'server'" - _: - desc: "The channel where the automatic deletion of successful command messages should be toggled." + desc: "The word 'channel'" s: - desc: "The state of whether automatic deletion is enabled or disabled for a specific channel." + desc: "The state to set. One of 'enable', 'disable', or 'inherit'." ch: - desc: "The channel where the automatic deletion of successful command messages should be toggled for." + desc: "Channel in which to set" - _: - desc: "The channel where the automatic deletion of successful command messages should be toggled." + desc: "The word 'channel'" s: - desc: "The state of whether automatic deletion is enabled or disabled for a specific channel." + desc: "The state to set. One of 'enable', 'disable', or 'inherit'." chId: - desc: "The ID of a channel where the automatic deletion should be toggled or inherited." + desc: "Optional channel id. If omitted, defaults to the current channel." restart: desc: Restarts the bot. Might not work. ex: @@ -1623,7 +1625,7 @@ gencurlist: - page: desc: "The current page number for pagination." choose: - desc: Chooses a thing from a list of things. Seperate items with a semicolon ; + desc: Chooses a thing from a list of things. Separate items with a semicolon ; ex: - Get up;Sleep;Sleep more params: @@ -3341,7 +3343,7 @@ globalcommand: globalmodule: desc: Toggles whether a module can be used on any server. ex: - - nsfw + - 'Gambling' params: - module: desc: "The type of module or configuration information being toggled." @@ -4563,4 +4565,6 @@ leaveunkeptservers: - '' params: - shardId: - desc: "Shard id from which to start leaving unkept servers." \ No newline at end of file + desc: "Shard id from which to start leaving unkept servers." + - delay: + desc: "Delay in miliseconds between leaves" \ No newline at end of file diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 3402440..a1ff710 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -991,7 +991,6 @@ "module_description_help": "Get command help, descriptions and usage examples", "module_description_gambling": "Bet on dice rolls, blackjack, slots, coinflips and others", "module_description_games": "Play trivia, nunchi, hangman, connect4 and other games", - "module_description_nsfw": "NSFW commands.", "module_description_music": "Play music from youtube, local files and radio streams", "module_description_utility": "Manage custom quotes, repeating messages and check facts about the server", "module_description_administration": "Moderation, punish users, setup self assignable roles and greet messages", -- 2.43.0 From 81a61715268a3a830f5366a5cc9442e9c5046049 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 14 Sep 2024 00:49:35 +1200 Subject: [PATCH 140/253] Fixed some string replacements not working (fixed default help string). Removed some references to nsfw stuff --- src/EllieBot/Modules/Help/Help.cs | 4 -- .../_common/Replacements/Impl/Replacer.cs | 43 ++++++++++--------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/EllieBot/Modules/Help/Help.cs b/src/EllieBot/Modules/Help/Help.cs index 95fabd6..aedb8e8 100644 --- a/src/EllieBot/Modules/Help/Help.cs +++ b/src/EllieBot/Modules/Help/Help.cs @@ -175,8 +175,6 @@ public sealed partial class Help : EllieModule return strs.module_description_gambling; case "music": return strs.module_description_music; - case "nsfw": - return strs.module_description_nsfw; case "permissions": return strs.module_description_permissions; case "xp": @@ -211,8 +209,6 @@ public sealed partial class Help : EllieModule return "💰"; case "music": return "🎶"; - case "nsfw": - return "😳"; case "permissions": return "🚓"; case "xp": diff --git a/src/EllieBot/_common/Replacements/Impl/Replacer.cs b/src/EllieBot/_common/Replacements/Impl/Replacer.cs index 9b43331..0bf092c 100644 --- a/src/EllieBot/_common/Replacements/Impl/Replacer.cs +++ b/src/EllieBot/_common/Replacements/Impl/Replacer.cs @@ -9,8 +9,8 @@ public sealed partial class Replacer private readonly IEnumerable _regexReps; private readonly object[] _inputData; - [GeneratedRegex(@"\%[\p{L}\p{N}\._]*[\p{L}\p{N}]+[\p{L}\p{N}\._]*\%")] - private static partial Regex TokenExtractionRegex(); + // [GeneratedRegex(@"\%[\p{L}\p{N}\._]*[\p{L}\p{N}]+[\p{L}\p{N}\._]*\%")] + // private static partial Regex TokenExtractionRegex(); public Replacer(IEnumerable reps, IEnumerable regexReps, object[] inputData) { @@ -24,19 +24,19 @@ public sealed partial class Replacer if (string.IsNullOrWhiteSpace(input)) return input; - var matches = TokenExtractionRegex().IsMatch(input); + // var matches = TokenExtractionRegex().IsMatch(input); - if (matches) + // if (matches) + // { + foreach (var rep in _reps) { - foreach (var rep in _reps) + if (input.Contains(rep.Token, StringComparison.InvariantCulture)) { - if (input.Contains(rep.Token, StringComparison.InvariantCulture)) - { - var objs = GetParams(rep.InputTypes); - input = input.Replace(rep.Token, await rep.GetValueAsync(objs), StringComparison.InvariantCulture); - } + var objs = GetParams(rep.InputTypes); + input = input.Replace(rep.Token, await rep.GetValueAsync(objs), StringComparison.InvariantCulture); } } + // } foreach (var rep in _regexReps) { @@ -47,7 +47,7 @@ public sealed partial class Replacer if (match.Success) { sb.Append(input, 0, match.Index) - .Append(await rep.GetValueAsync(match, objs)); + .Append(await rep.GetValueAsync(match, objs)); var lastIndex = match.Index + match.Length; sb.Append(input, lastIndex, input.Length - lastIndex); @@ -93,14 +93,16 @@ public sealed partial class Replacer Embeds = await embedArr.Embeds.Map(async e => await ReplaceAsync(e) with { Color = e.Color - }).WhenAll(), + }) + .WhenAll(), Content = await ReplaceAsync(embedArr.Content) }; private async ValueTask ReplaceAsync(SmartPlainText plain) => await ReplaceAsync(plain.Text); - private async Task ReplaceAsync(T embedData) where T : SmartEmbedTextBase, new() + private async Task ReplaceAsync(T embedData) + where T : SmartEmbedTextBase, new() { var newEmbedData = new T { @@ -117,13 +119,14 @@ public sealed partial class Replacer IconUrl = await ReplaceAsync(embedData.Author.IconUrl) }, Fields = await Task.WhenAll(embedData - .Fields? - .Map(async f => new SmartTextEmbedField - { - Name = await ReplaceAsync(f.Name), - Value = await ReplaceAsync(f.Value), - Inline = f.Inline - }) ?? []), + .Fields? + .Map(async f => new SmartTextEmbedField + { + Name = await ReplaceAsync(f.Name), + Value = await ReplaceAsync(f.Value), + Inline = f.Inline + }) + ?? []), Footer = embedData.Footer is null ? null : new() -- 2.43.0 From 3e35c6ffc7338847b3f52ee7f0b76dc15b98d824 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 14 Sep 2024 01:29:48 +1200 Subject: [PATCH 141/253] Updated Bot.cs with a fix that stopped builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why was this a glitch? ¯\_(ツ)_/¯ --- src/EllieBot/Bot.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index d6101ea..af69cee 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -90,21 +90,17 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - private async Task AddServices() private async Task AddServices() { var startingGuildIdList = GetCurrentGuildIds().ToList(); var startTime = Stopwatch.GetTimestamp(); var bot = Client.CurrentUser; - await using (var uow = _db.GetDbContext()) await using (var uow = _db.GetDbContext()) { AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); - AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); } // var svcs = new StandardKernel(new NinjectSettings() @@ -272,7 +268,6 @@ public sealed class Bot : IBot try { await AddServices(); - await AddServices(); } catch (Exception ex) { -- 2.43.0 From 5b451cee74308f35f9c1b34072d436e866352b23 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sat, 14 Sep 2024 15:11:14 +1200 Subject: [PATCH 142/253] Fixed some countries, replacements, updated bot.yml --- .../Administration/GreetBye/GreetCommands.cs | 198 +++++++++--------- .../Administration/GreetBye/GreetService.cs | 67 +++--- .../Modules/Searches/Search/SearchCommands.cs | 2 +- src/EllieBot/_common/Configs/BotConfig.cs | 2 +- .../Impl/ReplacementRegistrator.default.cs | 12 ++ .../_common/Settings/BotConfigService.cs | 6 + src/EllieBot/data/bot.yml | 12 +- src/EllieBot/data/hangman/countries.yml | 20 +- 8 files changed, 159 insertions(+), 160 deletions(-) diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs index b473326..c7ee52a 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs @@ -5,6 +5,99 @@ public partial class Administration [Group] public partial class GreetCommands : EllieModule { + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task Boost() + => Toggle(GreetType.Boost); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task BoostDel(int timer = 30) + => SetDel(GreetType.Boost, timer); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task BoostMsg([Leftover] string? text = null) + => SetMsg(GreetType.Boost, text); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task Greet() + => Toggle(GreetType.Greet); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDel(int timer = 30) + => SetDel(GreetType.Greet, timer); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetMsg([Leftover] string? text = null) + => SetMsg(GreetType.Greet, text); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDm() + => Toggle(GreetType.GreetDm); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDmMsg([Leftover] string? text = null) + => SetMsg(GreetType.GreetDm, text); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task Bye() + => Toggle(GreetType.Bye); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task ByeDel(int timer = 30) + => SetDel(GreetType.Bye, timer); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task ByeMsg([Leftover] string? text = null) + => SetMsg(GreetType.Bye, text); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Greet, user); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public Task GreetDmTest([Leftover] IGuildUser? user = null) + => Test(GreetType.GreetDm, user); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public Task ByeTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Bye, user); + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public Task BoostTest([Leftover] IGuildUser? user = null) + => Test(GreetType.Boost, user); + + public async Task Toggle(GreetType type) { var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id, type); @@ -75,17 +168,16 @@ public partial class Administration { if (string.IsNullOrWhiteSpace(text)) { - await _service.SetMessage(ctx.Guild.Id, type, null); var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); - var msg = conf?.MessageText ?? "No message set."; + var msg = conf?.MessageText ?? GreetService.GetDefaultGreet(type); await Response() .Confirm( type switch { - GreetType.Boost => strs.boostmsg_cur(msg.SanitizeMentions()), - GreetType.Greet => strs.greetmsg_cur(msg.SanitizeMentions()), - GreetType.Bye => strs.byemsg_cur(msg.SanitizeMentions()), - GreetType.GreetDm => strs.greetdmmsg_cur(msg.SanitizeMentions()), + GreetType.Boost => strs.boostmsg_cur(msg), + GreetType.Greet => strs.greetmsg_cur(msg), + GreetType.Bye => strs.byemsg_cur(msg), + GreetType.GreetDm => strs.greetdmmsg_cur(msg), _ => strs.error }) .SendAsync(); @@ -121,100 +213,6 @@ public partial class Administration } } - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Boost() - => Toggle(GreetType.Boost); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostDel(int timer = 30) - => SetDel(GreetType.Boost, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostMsg([Leftover] string? text = null) - => SetMsg(GreetType.Boost, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Greet() - => Toggle(GreetType.Greet); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDel(int timer = 30) - => SetDel(GreetType.Greet, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetMsg([Leftover] string? text = null) - => SetMsg(GreetType.Greet, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDm() - => Toggle(GreetType.GreetDm); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDmMsg([Leftover] string? text = null) - => SetMsg(GreetType.GreetDm, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Bye() - => Toggle(GreetType.Bye); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeDel(int timer = 30) - => SetDel(GreetType.Bye, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeMsg([Leftover] string? text = null) - => SetMsg(GreetType.Bye, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task GreetTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Greet, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task GreetDmTest([Leftover] IGuildUser? user = null) - => Test(GreetType.GreetDm, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task ByeTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Bye, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task BoostTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Boost, user); - public async Task Test(GreetType type, IGuildUser? user = null) { user ??= (IGuildUser)ctx.User; diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index e1fd0db..e47f743 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -14,7 +14,6 @@ public class GreetService : IEService, IReadyExecutor private readonly DiscordSocketClient _client; - private readonly BotConfigService _bss; private readonly IReplacementService _repSvc; private readonly IBotCache _cache; private readonly IMessageSenderService _sender; @@ -29,7 +28,6 @@ public class GreetService : IEService, IReadyExecutor public GreetService( DiscordSocketClient client, DbService db, - BotConfigService bss, IMessageSenderService sender, IReplacementService repSvc, IBotCache cache @@ -37,10 +35,15 @@ public class GreetService : IEService, IReadyExecutor { _db = db; _client = client; - _bss = bss; _repSvc = repSvc; _cache = cache; _sender = sender; + + + foreach (var type in Enum.GetValues()) + { + _enabled[type] = new(); + } } public async Task OnReadyAsync() @@ -52,11 +55,17 @@ public class GreetService : IEService, IReadyExecutor var enabled = await uow.GetTable() .Where(x => x.GuildId.In(guilds)) .Where(x => x.IsEnabled) + .Select(x => new + { + x.GuildId, + x.GreetType + }) .ToListAsync(); - _enabled = enabled.GroupBy(x => x.GreetType, v => v.GuildId) - .ToDictionary(x => x.Key, x => x.ToHashSet().ToConcurrentSet()) - .ToConcurrent(); + foreach (var e in enabled) + { + _enabled[e.GreetType].Add(e.GuildId); + } } _client.UserJoined += OnUserJoined; @@ -146,7 +155,7 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } - private readonly TypedKey _greetSettingsKey = new(); + private readonly TypedKey _greetSettingsKey = new("greet_settings"); public async Task GetGreetSettingsAsync(ulong gid, GreetType type) => await _cache.GetOrAddAsync(_greetSettingsKey, @@ -160,6 +169,9 @@ public class GreetService : IEService, IReadyExecutor .Where(x => x.GuildId == gid && x.GreetType == type) .FirstOrDefaultAsync(); + if (res is not null) + res.MessageText ??= GetDefaultGreet(type); + return res; } @@ -324,12 +336,12 @@ public class GreetService : IEService, IReadyExecutor } - private static string GetDefaultGreet(GreetType greetType) + public static string GetDefaultGreet(GreetType greetType) => greetType switch { - GreetType.Boost => "%user.name% has boosted the server!", - GreetType.Greet => "%user.name% has joined the server!", - GreetType.Bye => "%user.name has left the server!", + GreetType.Boost => "%user.mention% has boosted the server!", + GreetType.Greet => "%user.mention% has joined the server!", + GreetType.Bye => "%user.name% has left the server!", GreetType.GreetDm => "Welcome to the server %user.name%", _ => "%user.name% did something new!" }; @@ -343,16 +355,16 @@ public class GreetService : IEService, IReadyExecutor await using var uow = _db.GetDbContext(); var q = uow.GetTable(); + if (value is null) + value = !_enabled[greetType].Contains(guildId); + if (value is { } v) { - var defaultGreet = GetDefaultGreet(greetType); - await q .InsertOrUpdateAsync(() => new() { GuildId = guildId, GreetType = greetType, - MessageText = defaultGreet, IsEnabled = v, ChannelId = channelId, }, @@ -367,40 +379,20 @@ public class GreetService : IEService, IReadyExecutor GreetType = greetType, }); } - else - { - var result = await q - .Where(x => x.GuildId == guildId && x.GreetType == greetType) - .UpdateWithOutputAsync((old) => new() - { - IsEnabled = !old.IsEnabled - }, - (o, n) => n.IsEnabled); - - if (result.Length > 0) - value = result[0]; - } if (value is true) { _enabled[greetType].Add(guildId); - } - else - { - _enabled[greetType].TryRemove(guildId); + return true; } - return true; + _enabled[greetType].TryRemove(guildId); + return false; } public async Task SetMessage(ulong guildId, GreetType greetType, string? message) { - message = message?.SanitizeMentions(); - - if (string.IsNullOrWhiteSpace(message)) - message = GetDefaultGreet(greetType); - await using (var uow = _db.GetDbContext()) { await uow.GetTable() @@ -475,6 +467,7 @@ public class GreetService : IEService, IReadyExecutor { if (conf.GreetType == GreetType.GreetDm) { + await _greetQueue.Writer.WriteAsync((conf, user, channel as ITextChannel)); return await GreetDmUser(conf, user); } diff --git a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs index 6a98eac..411600c 100644 --- a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs +++ b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs @@ -72,7 +72,7 @@ public partial class Searches } [Cmd] - public async Task Image([Leftover] string? query = null) + public async Task Image([Leftover] string? query) { query = query?.Trim(); diff --git a/src/EllieBot/_common/Configs/BotConfig.cs b/src/EllieBot/_common/Configs/BotConfig.cs index c686ed7..df416ee 100644 --- a/src/EllieBot/_common/Configs/BotConfig.cs +++ b/src/EllieBot/_common/Configs/BotConfig.cs @@ -12,7 +12,7 @@ namespace EllieBot.Common.Configs; public sealed partial class BotConfig : ICloneable { [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 7; + public int Version { get; set; } = 8; [Comment(""" Most commands, when executed, have a small colored line diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs index d42bba6..0dc42de 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs @@ -61,6 +61,18 @@ public sealed partial class ReplacementPatternStore private void WithUsers() { + Register("%user%", static (IUser user) => user.Mention); + Register("%user.mention%", static (IUser user) => user.Mention); + Register("%user.fullname%", static (IUser user) => user.ToString()!); + Register("%user.name%", static (IUser user) => user.Username); + Register("%user.discrim%", static (IUser user) => user.Discriminator); + Register("%user.avatar%", static (IUser user) => user.RealAvatarUrl().ToString()); + Register("%user.id%", static (IUser user) => user.Id.ToString()); + Register("%user.created_time%", static (IUser user) => user.CreatedAt.ToString("HH:mm")); + Register("%user.created_date%", static (IUser user) => user.CreatedAt.ToString("dd.MM.yyyy")); + Register("%user.joined_time%", static (IGuildUser user) => user.JoinedAt?.ToString("HH:mm")); + Register("%user.joined_date%", static (IGuildUser user) => user.JoinedAt?.ToString("dd.MM.yyyy")); + Register("%user%", static (IUser[] users) => string.Join(" ", users.Select(user => user.Mention))); Register("%user.mention%", diff --git a/src/EllieBot/_common/Settings/BotConfigService.cs b/src/EllieBot/_common/Settings/BotConfigService.cs index 477f080..0deca4d 100644 --- a/src/EllieBot/_common/Settings/BotConfigService.cs +++ b/src/EllieBot/_common/Settings/BotConfigService.cs @@ -69,5 +69,11 @@ public sealed class BotConfigService : ConfigServiceBase c.Version = 7; c.IgnoreOtherBots = true; }); + + if (data.Version < 8) + ModifyConfig(c => + { + c.Version = 8; + }); } } \ No newline at end of file diff --git a/src/EllieBot/data/bot.yml b/src/EllieBot/data/bot.yml index 55a1d51..22b08ed 100644 --- a/src/EllieBot/data/bot.yml +++ b/src/EllieBot/data/bot.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 7 +version: 8 # Most commands, when executed, have a small colored line # next to the response. The color depends whether the command # is completed, errored or in progress (pending) @@ -80,16 +80,6 @@ blocked: modules: [] # Which string will be used to recognize the commands prefix: . -# Toggles whether your bot will group greet/bye messages into a single message every 5 seconds. -# 1st user who joins will get greeted immediately -# If more users join within the next 5 seconds, they will be greeted in groups of 5. -# This will cause %user.mention% and other placeholders to be replaced with multiple users. -# Keep in mind this might break some of your embeds - for example if you have %user.avatar% in the thumbnail, -# it will become invalid, as it will resolve to a list of avatars of grouped users. -# note: This setting is primarily used if you're afraid of raids, or you're running medium/large bots where some -# servers might get hundreds of people join at once. This is used to prevent the bot from getting ratelimited, -# and (slightly) reduce the greet spam in those servers. -groupGreets: false # Whether the bot will rotate through all specified statuses. # This setting can be changed via .ropl command. # See RotatingStatuses submodule in Administration. diff --git a/src/EllieBot/data/hangman/countries.yml b/src/EllieBot/data/hangman/countries.yml index 5899c5d..249408d 100644 --- a/src/EllieBot/data/hangman/countries.yml +++ b/src/EllieBot/data/hangman/countries.yml @@ -140,13 +140,13 @@ imageUrl: https://cdn.nadeko.bot/flags/gt-flag.gif - word: Guinea imageUrl: https://cdn.nadeko.bot/flags/gv-flag.gif -- word: Guinea-Bissau +- word: Guinea Bissau imageUrl: https://cdn.nadeko.bot/flags/pu-flag.gif - word: Guyana imageUrl: https://cdn.nadeko.bot/flags/gy-flag.gif - word: Haiti imageUrl: https://cdn.nadeko.bot/flags/ha-flag.gif -- word: Holy See +- word: Vatican imageUrl: https://cdn.nadeko.bot/flags/vt-flag.gif - word: Honduras imageUrl: https://cdn.nadeko.bot/flags/ho-flag.gif @@ -184,7 +184,7 @@ imageUrl: https://cdn.nadeko.bot/flags/ku-flag.gif - word: Kyrgyzstan imageUrl: https://cdn.nadeko.bot/flags/kg-flag.gif -- word: Laos +- word: Lao People's Democratic Republic imageUrl: https://cdn.nadeko.bot/flags/la-flag.gif - word: Latvia imageUrl: https://cdn.nadeko.bot/flags/lg-flag.gif @@ -282,7 +282,7 @@ imageUrl: https://cdn.nadeko.bot/flags/qa-flag.gif - word: Romania imageUrl: https://cdn.nadeko.bot/flags/ro-flag.gif -- word: Russia +- word: Russian Federation imageUrl: https://cdn.nadeko.bot/flags/rs-flag.gif - word: Rwanda imageUrl: https://cdn.nadeko.bot/flags/rw-flag.gif @@ -318,7 +318,7 @@ imageUrl: https://cdn.nadeko.bot/flags/so-flag.gif - word: South Africa imageUrl: https://cdn.nadeko.bot/flags/sf-flag.gif -- word: South Korea +- word: Republic of Korea imageUrl: https://cdn.nadeko.bot/flags/ks-flag.gif - word: South Sudan imageUrl: https://cdn.nadeko.bot/flags/od-flag.gif @@ -326,9 +326,9 @@ imageUrl: https://cdn.nadeko.bot/flags/sp-flag.gif - word: Sri Lanka imageUrl: https://cdn.nadeko.bot/flags/ce-flag.gif -- word: St. Vincent Grenadines +- word: Saint Vincent and the Grenadines imageUrl: https://cdn.nadeko.bot/flags/vc-flag.gif -- word: State of Palestine +- word: Palestine imageUrl: https://cdn.nadeko.bot/flags/palestine-flag.gif - word: Sudan imageUrl: https://cdn.nadeko.bot/flags/su-flag.gif @@ -338,11 +338,11 @@ imageUrl: https://cdn.nadeko.bot/flags/sw-flag.gif - word: Switzerland imageUrl: https://cdn.nadeko.bot/flags/sz-flag.gif -- word: Syria +- word: Syrian Arab Republic imageUrl: https://cdn.nadeko.bot/flags/sy-flag.gif - word: Tajikistan imageUrl: https://cdn.nadeko.bot/flags/ti-flag.gif -- word: Tanzania +- word: United Republic of Tanzania imageUrl: https://cdn.nadeko.bot/flags/tz-flag.gif - word: Thailand imageUrl: https://cdn.nadeko.bot/flags/th-flag.gif @@ -380,7 +380,7 @@ imageUrl: https://cdn.nadeko.bot/flags/nh-flag.gif - word: Venezuela imageUrl: https://cdn.nadeko.bot/flags/ve-flag.gif -- word: Vietnam +- word: Viet Nam imageUrl: https://cdn.nadeko.bot/flags/vm-flag.gif - word: Yemen imageUrl: https://cdn.nadeko.bot/flags/ym-flag.gif -- 2.43.0 From cb705ade41bc15c9bb72d06e5ce7a44edf807055 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 15 Sep 2024 13:51:25 +1200 Subject: [PATCH 143/253] fixed creds_example --- src/EllieBot/creds_example.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index 1e0b338..977b597 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -81,7 +81,7 @@ db: # You MUST change this if you're not using "sqlite" type. # Default is "Data Source=data/EllieBot.db" # Example for postgresql: "Server=localhost;Port=5432;User Id=postgres;Password=my_super_secret_postgres_password;Database=ellie;" - connectionString: "Server=localhost;Port=3306;Uid=root;Pwd=BFrjAHS9gAzdNcyMN2kg;Database=ellie" + connectionString: Data Source=data/EllieBot.db # Address and port of the coordinator endpoint. Leave empty for default. # Change only if you've changed the coordinator address or port. coordinatorUrl: http://localhost:3442 -- 2.43.0 From 1ea0e63379c927f29092c1769a1bae4521405c7b Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 00:38:05 +1200 Subject: [PATCH 144/253] Added .q support for invidious. If you have ytProvider set to invidious in data/searches.yml, invidious will be used to queue up songs and play them work. --- src/EllieBot/EllieBot.csproj | 1 + .../Modules/Gambling/GamblingConfig.cs | 5 +- .../Modules/Music/PlaylistCommands.cs | 3 +- .../Modules/Music/Services/MusicService.cs | 8 +- .../Modules/Music/_common/ITrackInfo.cs | 1 - .../Modules/Music/_common/IYoutubeResolver.cs | 2 +- .../Modules/Music/_common/Impl/MusicPlayer.cs | 40 ++++--- .../Modules/Music/_common/Impl/MusicQueue.cs | 3 - .../Music/_common/Impl/RemoteTrackInfo.cs | 8 +- .../Music/_common/Impl/SimpleTrackInfo.cs | 3 - .../Music/_common/Resolvers/InvTrackInfo.cs | 12 ++ .../Resolvers/InvidiousYoutubeResolver.cs | 108 ++++++++++++++++++ .../_common/Resolvers/TrackResolveProvider.cs | 25 ++-- .../Music/_common/Resolvers/YoutubeHelpers.cs | 10 ++ .../Resolvers/YoutubeResolverFactory.cs | 33 ++++++ .../_common/Resolvers/YtdlYoutubeResolver.cs | 21 ++-- .../Modules/Searches/Search/SearchCommands.cs | 59 +++++----- .../Search/Youtube/InvidiousSearchResponse.cs | 56 ++++++++- .../Youtube/InvidiousYtSearchService.cs | 9 +- .../Searches/_common/Config/SearchesConfig.cs | 5 +- .../_common/Config/SearchesConfigService.cs | 8 ++ src/EllieBot/Modules/Xp/Xp.cs | 3 +- .../Replacements/Impl/ReplacementContext.cs | 1 - .../_common/ServiceCollectionExtensions.cs | 4 +- src/EllieBot/data/searches.yml | 21 ++-- 25 files changed, 345 insertions(+), 104 deletions(-) create mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs create mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs create mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs create mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index ebcd4b2..9bfce54 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -37,6 +37,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/EllieBot/Modules/Gambling/GamblingConfig.cs b/src/EllieBot/Modules/Gambling/GamblingConfig.cs index 2571890..7b6582c 100644 --- a/src/EllieBot/Modules/Gambling/GamblingConfig.cs +++ b/src/EllieBot/Modules/Gambling/GamblingConfig.cs @@ -274,8 +274,8 @@ public sealed partial class WaifuConfig public class WaifuDecayConfig { [Comment(""" - Percentage (0 - 100) of the waifu value to reduce. - Set 0 to disable + Unclaimed waifus will decay by this percentage (0 - 100). + Default is 0 (disabled) For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) """)] public int UnclaimedDecayPercent { get; set; } = 0; @@ -283,6 +283,7 @@ public sealed partial class WaifuConfig [Comment(""" Claimed waifus will decay by this percentage (0 - 100). Default is 0 (disabled) + For example if a waifu has a price of $500, setting this value to 10 would reduce the waifu by 10% ($50) """)] public int ClaimedDecayPercent { get; set; } = 0; diff --git a/src/EllieBot/Modules/Music/PlaylistCommands.cs b/src/EllieBot/Modules/Music/PlaylistCommands.cs index 0e4137b..d9cc5d4 100644 --- a/src/EllieBot/Modules/Music/PlaylistCommands.cs +++ b/src/EllieBot/Modules/Music/PlaylistCommands.cs @@ -130,13 +130,14 @@ public sealed partial class Music return; } + // todo check locally queued songs var songs = mp.GetQueuedTracks() .Select(s => new PlaylistSong { Provider = s.Platform.ToString(), ProviderType = (MusicType)s.Platform, Title = s.Title, - Query = s.Platform == MusicPlatform.Local ? s.GetStreamUrl().Result!.Trim('"') : s.Url + Query = s.Url }) .ToList(); diff --git a/src/EllieBot/Modules/Music/Services/MusicService.cs b/src/EllieBot/Modules/Music/Services/MusicService.cs index 8495211..89c848d 100644 --- a/src/EllieBot/Modules/Music/Services/MusicService.cs +++ b/src/EllieBot/Modules/Music/Services/MusicService.cs @@ -1,4 +1,5 @@ using EllieBot.Db.Models; +using EllieBot.Modules.Music.Resolvers; using System.Diagnostics.CodeAnalysis; namespace EllieBot.Modules.Music.Services; @@ -8,7 +9,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider private readonly AyuVoiceStateService _voiceStateService; private readonly ITrackResolveProvider _trackResolveProvider; private readonly DbService _db; - private readonly IYoutubeResolver _ytResolver; + private readonly IYoutubeResolverFactory _ytResolver; private readonly ILocalTrackResolver _localResolver; private readonly DiscordSocketClient _client; private readonly IBotStrings _strings; @@ -24,7 +25,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider AyuVoiceStateService voiceStateService, ITrackResolveProvider trackResolveProvider, DbService db, - IYoutubeResolver ytResolver, + IYoutubeResolverFactory ytResolver, ILocalTrackResolver localResolver, DiscordSocketClient client, IBotStrings strings, @@ -93,7 +94,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider public async Task EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string query, string queuer) { var count = 0; - await foreach (var track in _ytResolver.ResolveTracksFromPlaylistAsync(query)) + await foreach (var track in _ytResolver.GetYoutubeResolver().ResolveTracksFromPlaylistAsync(query)) { if (mp.IsKilled) break; @@ -139,6 +140,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider var mp = new MusicPlayer(queue, resolver, + _ytResolver, proxy, _googleApiService, settings.QualityPreset, diff --git a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs b/src/EllieBot/Modules/Music/_common/ITrackInfo.cs index 347e8fa..3525b59 100644 --- a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/ITrackInfo.cs @@ -8,5 +8,4 @@ public interface ITrackInfo public string Thumbnail { get; } public TimeSpan Duration { get; } public MusicPlatform Platform { get; } - public ValueTask GetStreamUrl(); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs index 433012d..e4c2f53 100644 --- a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs +++ b/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs @@ -4,8 +4,8 @@ namespace EllieBot.Modules.Music; public interface IYoutubeResolver : IPlatformQueryResolver { - public Regex YtVideoIdRegex { get; } public Task ResolveByIdAsync(string id); IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query); Task ResolveByQueryAsync(string query, bool tryExtractingId); + Task GetStreamUrl(string query); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs index 6819d4e..0edd3cf 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs @@ -1,5 +1,6 @@ using EllieBot.Voice; using EllieBot.Db.Models; +using EllieBot.Modules.Music.Resolvers; using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -27,6 +28,7 @@ public sealed class MusicPlayer : IMusicPlayer private readonly IMusicQueue _queue; private readonly ITrackResolveProvider _trackResolveProvider; + private readonly IYoutubeResolverFactory _ytResolverFactory; private readonly IVoiceProxy _proxy; private readonly IGoogleApiService _googleApiService; private readonly ISongBuffer _songBuffer; @@ -41,6 +43,7 @@ public sealed class MusicPlayer : IMusicPlayer public MusicPlayer( IMusicQueue queue, ITrackResolveProvider trackResolveProvider, + IYoutubeResolverFactory ytResolverFactory, IVoiceProxy proxy, IGoogleApiService googleApiService, QualityPreset qualityPreset, @@ -48,6 +51,7 @@ public sealed class MusicPlayer : IMusicPlayer { _queue = queue; _trackResolveProvider = trackResolveProvider; + _ytResolverFactory = ytResolverFactory; _proxy = proxy; _googleApiService = googleApiService; AutoPlay = autoPlay; @@ -118,7 +122,7 @@ public sealed class MusicPlayer : IMusicPlayer // make sure song buffer is ready to be (re)used _songBuffer.Reset(); - var streamUrl = await track.GetStreamUrl(); + var streamUrl = await GetStreamUrl(track); // start up the data source using var source = FfmpegTrackDataSource.CreateAsync( _vc.BitDepth, @@ -256,6 +260,7 @@ public sealed class MusicPlayer : IMusicPlayer IsStopped = true; Log.Error("Please install ffmpeg and make sure it's added to your " + "PATH environment variable before trying again"); + } catch (OperationCanceledException) { @@ -264,6 +269,7 @@ public sealed class MusicPlayer : IMusicPlayer catch (Exception ex) { Log.Error(ex, "Unknown error in music loop: {ErrorMessage}", ex.Message); + await Task.Delay(3_000); } finally { @@ -303,6 +309,14 @@ public sealed class MusicPlayer : IMusicPlayer } } + private async Task GetStreamUrl(IQueuedTrackInfo track) + { + if (track.TrackInfo is SimpleTrackInfo sti) + return sti.StreamUrl; + + return await _ytResolverFactory.GetYoutubeResolver().GetStreamUrl(track.TrackInfo.Id); + } + private bool? CopyChunkToOutput(ISongBuffer sb, VoiceClient vc) { var data = sb.Read(vc.InputLength, out var length); @@ -406,19 +420,19 @@ public sealed class MusicPlayer : IMusicPlayer break; await chunk.Select(async data => + { + var (query, platform) = data; + try { - var (query, platform) = data; - try - { - await TryEnqueueTrackAsync(query, queuer, false, platform); - errorCount = 0; - } - catch (Exception ex) - { - Log.Warning(ex, "Error resolving {MusicPlatform} Track {TrackQuery}", platform, query); - ++errorCount; - } - }) + await TryEnqueueTrackAsync(query, queuer, false, platform); + errorCount = 0; + } + catch (Exception ex) + { + Log.Warning(ex, "Error resolving {MusicPlatform} Track {TrackQuery}", platform, query); + ++errorCount; + } + }) .WhenAll(); await Task.Delay(1000); diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs index 1b1ce9c..9b1c7aa 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs @@ -28,9 +28,6 @@ public sealed partial class MusicQueue TrackInfo = trackInfo; Queuer = queuer; } - - public ValueTask GetStreamUrl() - => TrackInfo.GetStreamUrl(); } } diff --git a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs index b002779..c6fbf10 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs @@ -6,11 +6,5 @@ public sealed record RemoteTrackInfo( string Url, string Thumbnail, TimeSpan Duration, - MusicPlatform Platform, - Func> _streamFactory) : ITrackInfo -{ - private readonly Func> _streamFactory = _streamFactory; - public async ValueTask GetStreamUrl() - => await _streamFactory(); -} \ No newline at end of file + MusicPlatform Platform) : ITrackInfo; \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs index 9ae1c30..c7828cc 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs @@ -24,7 +24,4 @@ public sealed class SimpleTrackInfo : ITrackInfo Platform = platform; StreamUrl = streamUrl; } - - public ValueTask GetStreamUrl() - => new(StreamUrl); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs new file mode 100644 index 0000000..cca2727 --- /dev/null +++ b/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs @@ -0,0 +1,12 @@ +namespace EllieBot.Modules.Music; + +public sealed class InvTrackInfo : ITrackInfo +{ + public required string Id { get; init; } + public required string Title { get; init; } + public required string Url { get; init; } + public required string Thumbnail { get; init; } + public required TimeSpan Duration { get; init; } + public required MusicPlatform Platform { get; init; } + public required string? StreamUrl { get; init; } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs new file mode 100644 index 0000000..243fd13 --- /dev/null +++ b/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs @@ -0,0 +1,108 @@ +using EllieBot.Modules.Searches; +using System.Net.Http.Json; + +namespace EllieBot.Modules.Music; + +public sealed class InvidiousYoutubeResolver : IYoutubeResolver +{ + private readonly IHttpClientFactory _httpFactory; + private readonly SearchesConfigService _sc; + private readonly EllieRandom _rng; + + private string InvidiousApiUrl + => _sc.Data.InvidiousInstances[_rng.Next(0, _sc.Data.InvidiousInstances.Count)]; + + public InvidiousYoutubeResolver(IHttpClientFactory httpFactory, SearchesConfigService sc) + { + _rng = new EllieRandom(); + _httpFactory = httpFactory; + _sc = sc; + } + + public async Task ResolveByQueryAsync(string query) + { + using var http = _httpFactory.CreateClient(); + + var items = await http.GetFromJsonAsync>( + $"{InvidiousApiUrl}/api/v1/search" + + $"?q={query}" + + $"&type=video"); + + if (items is null || items.Count == 0) + return null; + + + var res = items.First(); + + return new InvTrackInfo() + { + Id = res.VideoId, + Title = res.Title, + Url = $"https://youtube.com/watch?v={res.VideoId}", + Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, + Duration = TimeSpan.FromSeconds(res.LengthSeconds), + Platform = MusicPlatform.Youtube, + StreamUrl = null, + }; + } + + public async Task ResolveByIdAsync(string id) + => await InternalResolveByIdAsync(id); + + private async Task InternalResolveByIdAsync(string id) + { + using var http = _httpFactory.CreateClient(); + + var res = await http.GetFromJsonAsync( + $"{InvidiousApiUrl}/api/v1/videos/{id}"); + + if (res is null) + return null; + + return new InvTrackInfo() + { + Id = res.VideoId, + Title = res.Title, + Url = $"https://youtube.com/watch?v={res.VideoId}", + Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, + Duration = TimeSpan.FromSeconds(res.LengthSeconds), + Platform = MusicPlatform.Youtube, + StreamUrl = res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_HIGH")?.Url + ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_MEDIUM")?.Url + ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_LOW")?.Url + }; + } + + public async IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query) + { + using var http = _httpFactory.CreateClient(); + var res = await http.GetFromJsonAsync( + $"{InvidiousApiUrl}/api/v1/search?type=video&q={query}"); + + if (res is null) + yield break; + + foreach (var video in res.Videos) + { + yield return new InvTrackInfo() + { + Id = video.VideoId, + Title = video.Title, + Url = $"https://youtube.com/watch?v={video.VideoId}", + Thumbnail = video.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, + Duration = TimeSpan.FromSeconds(video.LengthSeconds), + Platform = MusicPlatform.Youtube, + StreamUrl = null + }; + } + } + + public Task ResolveByQueryAsync(string query, bool tryExtractingId) + => ResolveByQueryAsync(query); + + public async Task GetStreamUrl(string videoId) + { + var video = await InternalResolveByIdAsync(videoId); + return video?.StreamUrl; + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs b/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs index 642edf1..21a6adf 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs @@ -1,13 +1,15 @@ -namespace EllieBot.Modules.Music; +using EllieBot.Modules.Music.Resolvers; + +namespace EllieBot.Modules.Music; public sealed class TrackResolveProvider : ITrackResolveProvider { - private readonly IYoutubeResolver _ytResolver; + private readonly IYoutubeResolverFactory _ytResolver; private readonly ILocalTrackResolver _localResolver; private readonly IRadioResolver _radioResolver; public TrackResolveProvider( - IYoutubeResolver ytResolver, + IYoutubeResolverFactory ytResolver, ILocalTrackResolver localResolver, IRadioResolver radioResolver) { @@ -23,19 +25,22 @@ public sealed class TrackResolveProvider : ITrackResolveProvider case MusicPlatform.Radio: return _radioResolver.ResolveByQueryAsync(query); case MusicPlatform.Youtube: - return _ytResolver.ResolveByQueryAsync(query); + return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query); case MusicPlatform.Local: return _localResolver.ResolveByQueryAsync(query); case null: - var match = _ytResolver.YtVideoIdRegex.Match(query); + var match = YoutubeHelpers.YtVideoIdRegex.Match(query); + if (match.Success) - return _ytResolver.ResolveByIdAsync(match.Groups["id"].Value); - else if (Uri.TryCreate(query, UriKind.Absolute, out var uri) && uri.IsFile) + return _ytResolver.GetYoutubeResolver().ResolveByIdAsync(match.Groups["id"].Value); + + if (Uri.TryCreate(query, UriKind.Absolute, out var uri) && uri.IsFile) return _localResolver.ResolveByQueryAsync(uri.AbsolutePath); - else if (IsRadioLink(query)) + + if (IsRadioLink(query)) return _radioResolver.ResolveByQueryAsync(query); - else - return _ytResolver.ResolveByQueryAsync(query, false); + + return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query, false); default: Log.Error("Unsupported platform: {MusicPlatform}", forcePlatform); return Task.FromResult(null); diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs new file mode 100644 index 0000000..869102d --- /dev/null +++ b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs @@ -0,0 +1,10 @@ +using System.Text.RegularExpressions; + +namespace EllieBot.Modules.Music; + +public sealed class YoutubeHelpers +{ + public static Regex YtVideoIdRegex { get; } = + new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?[a-zA-Z0-9_-]{6,11})", + RegexOptions.Compiled); +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs new file mode 100644 index 0000000..955faca --- /dev/null +++ b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs @@ -0,0 +1,33 @@ +using Microsoft.Extensions.DependencyInjection; +using EllieBot.Modules.Searches; +using EllieBot.Modules.Searches.Services; + +namespace EllieBot.Modules.Music.Resolvers; + +public interface IYoutubeResolverFactory +{ + IYoutubeResolver GetYoutubeResolver(); +} + +public sealed class YoutubeResolverFactory : IYoutubeResolverFactory +{ + private readonly SearchesConfigService _ss; + private readonly IServiceProvider _services; + + public YoutubeResolverFactory(SearchesConfigService ss, IServiceProvider services) + { + _ss = ss; + _services = services; + } + + public IYoutubeResolver GetYoutubeResolver() + { + var conf = _ss.Data; + if (conf.YtProvider == YoutubeSearcher.Invidious) + { + return _services.GetRequiredService(); + } + + return _services.GetRequiredService(); + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs index 70479d0..eeb3a1c 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs @@ -16,9 +16,6 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver private static readonly Regex _simplePlaylistRegex = new(@"&list=(?[\w\-]{12,})", RegexOptions.Compiled); - public Regex YtVideoIdRegex { get; } = - new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?[a-zA-Z0-9_-]{6,11})", - RegexOptions.Compiled); private readonly ITrackCacher _trackCacher; @@ -32,7 +29,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver { _trackCacher = trackCacher; _google = google; - + _ytdlPlaylistOperation = new("-4 " + "--geo-bypass " @@ -46,7 +43,8 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--no-check-certificate " + "-i " + "--yes-playlist " - + "-- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); + + "-- \"{0}\"", + scs.Data.YtProvider != YoutubeSearcher.Ytdl); _ytdlIdOperation = new("-4 " + "--geo-bypass " @@ -58,7 +56,8 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--get-thumbnail " + "--get-duration " + "--no-check-certificate " - + "-- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); + + "-- \"{0}\"", + scs.Data.YtProvider != YoutubeSearcher.Ytdl); _ytdlSearchOperation = new("-4 " + "--geo-bypass " @@ -71,7 +70,8 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--get-duration " + "--no-check-certificate " + "--default-search " - + "\"ytsearch:\" -- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); + + "\"ytsearch:\" -- \"{0}\"", + scs.Data.YtProvider != YoutubeSearcher.Ytdl); } private YtTrackData ResolveYtdlData(string ytdlOutputString) @@ -102,8 +102,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver $"https://youtube.com/watch?v={trackData.Id}", trackData.Thumbnail, trackData.Duration, - MusicPlatform.Youtube, - CreateCacherFactory(trackData.Id)); + MusicPlatform.Youtube); private Func> CreateCacherFactory(string id) => () => _trackCacher.GetOrCreateStreamLink(id, @@ -268,7 +267,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver { if (tryResolving) { - var match = YtVideoIdRegex.Match(query); + var match = YoutubeHelpers.YtVideoIdRegex.Match(query); if (match.Success) return await ResolveByIdAsync(match.Groups["id"].Value); } @@ -290,6 +289,8 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver return DataToInfo(new(cachedData.Title, cachedData.Id, cachedData.Thumbnail, null, cachedData.Duration)); } + public Task GetStreamUrl(string videoId) + => CreateCacherFactory(videoId)(); private readonly struct YtTrackData { public readonly string Title; diff --git a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs index 411600c..b155c75 100644 --- a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs +++ b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs @@ -60,21 +60,21 @@ public partial class Searches descStr = descStr.TrimTo(4096); var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query.TrimTo(64)!) - .WithDescription(descStr) - .WithFooter( - GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), - "https://i.imgur.com/G46fm8J.png"); + .WithOkColor() + .WithAuthor(ctx.User) + .WithTitle(query.TrimTo(64)!) + .WithDescription(descStr) + .WithFooter( + GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), + "https://i.imgur.com/G46fm8J.png"); await Response().Embed(embed).SendAsync(); } [Cmd] - public async Task Image([Leftover] string? query) + public async Task Image([Leftover] string query) { - query = query?.Trim(); + query = query.Trim(); if (string.IsNullOrWhiteSpace(query)) { @@ -99,29 +99,32 @@ public partial class Searches EmbedBuilder CreateEmbed(IImageSearchResultEntry entry) { return _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query) - .WithUrl("https://google.com") - .WithImageUrl(entry.Link); + .WithOkColor() + .WithAuthor(ctx.User) + .WithTitle(query) + .WithUrl("https://google.com") + .WithImageUrl(entry.Link); } - embeds.Add(CreateEmbed(data.Entries.First()) - .WithFooter( - GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), - "https://i.imgur.com/G46fm8J.png")); + await Response() + .Paginated() + .Items(data.Entries) + .PageSize(1) + .AddFooter(false) + .Page((items, _) => + { + var item = items.FirstOrDefault(); - var random = data.Entries.Skip(1) - .Shuffle() - .Take(3) - .ToArray(); + if (item is null) + return _sender.CreateEmbed() + .WithDescription(GetText(strs.no_search_results)); - foreach (var entry in random) - { - embeds.Add(CreateEmbed(entry)); - } + var embed = CreateEmbed(item); + embeds.Add(embed); - await Response().Embeds(embeds).SendAsync(); + return embed; + }) + .SendAsync(); } private TypedKey GetYtCacheKey(string query) @@ -158,7 +161,7 @@ public partial class Searches var maybeResult = await GetYoutubeUrlFromCacheAsync(query) ?? await _searchFactory.GetYoutubeSearchService().SearchAsync(query); - if (maybeResult is not {} result || result is {Url: null}) + if (maybeResult is not { } result || result is { Url: null }) { await Response().Error(strs.no_results).SendAsync(); return; diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs index 9951db8..9b18d0c 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs @@ -5,5 +5,59 @@ namespace EllieBot.Modules.Searches; public sealed class InvidiousSearchResponse { [JsonPropertyName("videoId")] - public string VideoId { get; set; } = null!; + public required string VideoId { get; init; } + + [JsonPropertyName("title")] + public required string Title { get; init; } + + [JsonPropertyName("videoThumbnails")] + public required List Thumbnails { get; init; } + + [JsonPropertyName("lengthSeconds")] + public required int LengthSeconds { get; init; } + + [JsonPropertyName("description")] + public required string Description { get; init; } +} + +public sealed class InvidiousVideoResponse +{ + [JsonPropertyName("title")] + public required string Title { get; init; } + + [JsonPropertyName("videoId")] + public required string VideoId { get; init; } + + [JsonPropertyName("lengthSeconds")] + public required int LengthSeconds { get; init; } + + [JsonPropertyName("videoThumbnails")] + public required List Thumbnails { get; init; } + + [JsonPropertyName("adaptiveFormats")] + public required List AdaptiveFormats { get; init; } +} + +public sealed class InvidiousAdaptiveFormat +{ + [JsonPropertyName("url")] + public required string Url { get; init; } + + [JsonPropertyName("audioQuality")] + public string? AudioQuality { get; init; } +} + +public sealed class InvidiousPlaylistResponse +{ + [JsonPropertyName("title")] + public required string Title { get; init; } + + [JsonPropertyName("videos")] + public required List Videos { get; init; } +} + +public sealed class InvidiousThumbnail +{ + [JsonPropertyName("url")] + public required string Url { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs index 6fc8bac..17bd519 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs @@ -32,13 +32,14 @@ public sealed class InvidiousYtSearchService : IYoutubeSearchService, IEService var instance = instances[_rng.Next(0, instances.Count)]; + var url = $"{instance}/api/v1/search" + + $"?q={query}" + + $"&type=video"; using var http = _http.CreateClient(); var res = await http.GetFromJsonAsync>( - $"{instance}/api/v1/search" - + $"?q={query}" - + $"&type=video"); + url); - if (res is null or {Count: 0}) + if (res is null or { Count: 0 }) return null; return new VideoInfo(res[0].VideoId); diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs index fb64849..8cb0227 100644 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs +++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs @@ -7,7 +7,7 @@ namespace EllieBot.Modules.Searches; public partial class SearchesConfig : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 0; + public int Version { get; set; } = 3; [Comment(""" Which engine should .search command @@ -26,7 +26,7 @@ public partial class SearchesConfig : ICloneable [Comment(""" - Which search provider will be used for the `.youtube` command. + Which search provider will be used for the `.youtube` and `.q` commands. - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console @@ -58,7 +58,6 @@ public partial class SearchesConfig : ICloneable [Comment(""" Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search Ellie will use a random one for each request. - These instances may be used for music queue functionality in the future. Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com Instances specified must have api available. diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs index f656a5b..39ae3c6 100644 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs +++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs @@ -54,5 +54,13 @@ public class SearchesConfigService : ConfigServiceBase c.Version = 2; }); } + + if (data.Version < 3) + { + ModifyConfig(c => + { + c.Version = 3; + }); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Xp/Xp.cs b/src/EllieBot/Modules/Xp/Xp.cs index 63e59e3..e961d87 100644 --- a/src/EllieBot/Modules/Xp/Xp.cs +++ b/src/EllieBot/Modules/Xp/Xp.cs @@ -445,9 +445,10 @@ public partial class Xp : EllieModule if (!string.IsNullOrWhiteSpace(item.Desc)) eb.AddField(GetText(strs.desc), item.Desc); +#if GLOBAL_ELLIE if (key == "default") eb.WithDescription(GetText(strs.xpshop_website)); - +#endif var tier = _service.GetXpShopTierRequirement(type); if (tier != PatronTier.None) diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs index 184ba4e..4e87ce9 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs @@ -54,7 +54,6 @@ public sealed class ReplacementContext public ReplacementContext WithOverride(string key, Func repFactory) => WithOverride(key, () => new ValueTask(repFactory())); - public ReplacementContext WithOverride(Regex regex, Func> repFactory) { if (_regexPatterns.Add(regex.ToString())) diff --git a/src/EllieBot/_common/ServiceCollectionExtensions.cs b/src/EllieBot/_common/ServiceCollectionExtensions.cs index 3a59226..c5539af 100644 --- a/src/EllieBot/_common/ServiceCollectionExtensions.cs +++ b/src/EllieBot/_common/ServiceCollectionExtensions.cs @@ -51,7 +51,9 @@ public static class ServiceCollectionExtensions svcs.RegisterMany(Reuse.Singleton); svcs.AddSingleton(); - svcs.AddSingleton(); + svcs.AddSingleton(); + svcs.AddSingleton(); + svcs.AddSingleton(); svcs.AddSingleton(); svcs.AddSingleton(); svcs.AddSingleton(); diff --git a/src/EllieBot/data/searches.yml b/src/EllieBot/data/searches.yml index 9b7ab5c..f551bae 100644 --- a/src/EllieBot/data/searches.yml +++ b/src/EllieBot/data/searches.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 2 +version: 3 # Which engine should .search command # 'google_scrape' - default. Scrapes the webpage for results. May break. Requires no api keys. # 'google' - official google api. Requires googleApiKey and google.searchId set in creds.yml @@ -9,14 +9,14 @@ webSearchEngine: Google_Scrape # 'google'- official google api. googleApiKey and google.imageSearchId set in creds.yml # 'searx' requires at least one searx instance specified in the 'searxInstances' property below imgSearchEngine: Google -# Which search provider will be used for the `.youtube` command. -# +# Which search provider will be used for the `.youtube` and `.q` commands. +# # - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console -# +# # - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow. -# +# # - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables -# +# # - `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property ytProvider: Ytdlp # Set the searx instance urls in case you want to use 'searx' for either img or web search. @@ -24,20 +24,19 @@ ytProvider: Ytdlp # Use a fully qualified url. Example: `https://my-searx-instance.mydomain.com` # Instances specified must support 'format=json' query parameter. # - In case you're running your own searx instance, set -# +# # search: # formats: # - json -# +# # in 'searxng/settings.yml' on your server -# +# # - If you're using a public instance, make sure that the instance you're using supports it (they usually don't) searxInstances: [] # Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search # Ellie will use a random one for each request. -# These instances may be used for music queue functionality in the future. # Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com -# +# # Instances specified must have api available. # You check that by opening an api endpoint in your browser. For example: https://my-invidious-instance.mydomain.com/api/v1/trending invidiousInstances: [] -- 2.43.0 From fc8e97e13a7b26d0dcdd9f6b9f4e77990fa90e3a Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 00:40:53 +1200 Subject: [PATCH 145/253] comment cleanup --- src/EllieBot/Modules/Expressions/EllieExpressions.cs | 2 -- src/EllieBot/Modules/Music/PlaylistCommands.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index d79539c..ddb3624 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -404,8 +404,6 @@ public partial class EllieExpressions : EllieModule [Ratelimit(300)] public async Task ExprsImport([Leftover] string input = null) { - // todo cooldown on public bot for 1 day, limit 100 - if (!AdminInGuildOrOwnerInDm()) { await Response().Error(strs.expr_insuff_perms).SendAsync(); diff --git a/src/EllieBot/Modules/Music/PlaylistCommands.cs b/src/EllieBot/Modules/Music/PlaylistCommands.cs index d9cc5d4..d64e931 100644 --- a/src/EllieBot/Modules/Music/PlaylistCommands.cs +++ b/src/EllieBot/Modules/Music/PlaylistCommands.cs @@ -130,7 +130,6 @@ public sealed partial class Music return; } - // todo check locally queued songs var songs = mp.GetQueuedTracks() .Select(s => new PlaylistSong { -- 2.43.0 From 3f21f300e092411abed7eb188cbe63a53b70525f Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 00:44:00 +1200 Subject: [PATCH 146/253] Updated changelog, version upped to 5.1.8 --- src/EllieBot/EllieBot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 9bfce54..61c5c37 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.7 + 5.1.8 $(MSBuildProjectDirectory) -- 2.43.0 From 47b146a501c4f39a5f70f2d0bc971bc4acc86e04 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 00:46:07 +1200 Subject: [PATCH 147/253] Updated changelog I was meant to put this in the last commit but forgot --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e815f..a217553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,13 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## [5.1.8] +## [5.1.8] - 20.09.2024 ### Added - Added `.leaveunkeptservers` which will make the bot leave all servers on all shards whose owners didn't run `.keep` command. - This is a dangerous and irreversible command, don't use it. Meant for use on the public bot. +- `.adpl` now supports custom statuses (you no longer need to specify Playing, Watching, etc...) ### Changed @@ -16,6 +17,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - `.liqu` renamed to `.qli` - `.quotesearch` / `.qse` is now paginated for easier searching - `.whosplaying` is now paginated +- `.img` is now paginated - `.setgame` renamed to`.setactivity` and now supports custom text activity. You don't have to specify playing, listening etc before the activity - Clarified and added some embed / placeholder links to command help where needed - dev: A lot of code cleanup and internal improvements @@ -26,6 +28,14 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - Fixed a bug in `.gatari` command - Fixed some waifu related strings - Fixed `.quoteshow` and `.quoteid` commands +- Fixed some placeholders not working in `.greetdm` +- Fixed postgres support +- Fixed and clarified some command strings/parameter descriptions + +### Removed + +- Removed mysql support as it didn't work for a while, and requires some special handling/maintenance + - Sqlite and Postgres support stays ## [5.1.7] - 09.08.2024 -- 2.43.0 From 0d6b4da1ce685a9d8e65c70d141e95073c815af7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 17:41:07 +1200 Subject: [PATCH 148/253] possible fix for docker --- src/EllieBot/Db/Extensions/GuildConfigExtensions.cs | 1 - src/EllieBot/EllieBot.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index e7fb6ad..de4d47f 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -1,7 +1,6 @@ #nullable disable using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using LinqToDB.EntityFrameworkCore; using EllieBot.Db.Models; namespace EllieBot.Db; diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 61c5c37..b5ebc03 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -37,7 +37,6 @@ - all runtime; build; native; contentfiles; analyzers; buildtransitive -- 2.43.0 From e896c14303b4a9c3bd0389ca0897c2e86bbcc4d7 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 19:15:37 +1200 Subject: [PATCH 149/253] Hopefully fixed the startup issue --- src/EllieBot/Db/EllieContext.cs | 2 +- .../UserPunish/UserPunishService.cs | 46 +++++++++++-------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index 11a3d65..50de935 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -688,7 +688,7 @@ public abstract class EllieContext : DbContext x.GuildId, x.GreetType }) - .IsUnique()); + .IsUnique()); modelBuilder.Entity(gs => { diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index 2b9e00d..85dcb10 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -244,7 +244,7 @@ public class UserPunishService : IEService, IReadyExecutor { await using var uow = _db.GetDbContext(); - var cleared = await uow.GetTable() + var toClear = await uow.GetTable() .Where(x => uow.GetTable() .Count(y => y.GuildId == x.GuildId && y.WarnExpireHours > 0 @@ -256,30 +256,40 @@ public class UserPunishService : IEService, IReadyExecutor .Where(y => x.GuildId == y.GuildId) .Select(y => y.WarnExpireHours) .First())) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = "expiry" - }); + .Select(x => x.Id) + .ToListAsyncLinqToDB(); + + var cleared = await uow.GetTable() + .Where(x => toClear.Contains(x.Id)) + .UpdateAsync(_ => new() + { + Forgiven = true, + ForgivenBy = "expiry" + }); + + var toDelete = await uow.GetTable() + .Where(x => uow.GetTable() + .Count(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Delete) + > 0 + && x.DateAdded + < DateTime.UtcNow.AddHours(-uow.GetTable() + .Where(y => x.GuildId == y.GuildId) + .Select(y => y.WarnExpireHours) + .First())) + .Select(x => x.Id) + .ToListAsyncLinqToDB(); var deleted = await uow.GetTable() - .Where(x => uow.GetTable() - .Count(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Delete) - > 0 - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.GetTable() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .DeleteAsync(); + .Where(x => toDelete.Contains(x.Id)) + .DeleteAsync(); if (cleared > 0 || deleted > 0) { Log.Information("Cleared {ClearedWarnings} warnings and deleted {DeletedWarnings} warnings due to expiry", cleared, - deleted); + toDelete.Count); } } -- 2.43.0 From 9c94a663232dad297000813a5b14aa1ae04afe2b Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 19:27:30 +1200 Subject: [PATCH 150/253] I apparently updated this file? --- src/EllieBot/_common/Configs/BotConfig.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/EllieBot/_common/Configs/BotConfig.cs b/src/EllieBot/_common/Configs/BotConfig.cs index df416ee..8c81d7b 100644 --- a/src/EllieBot/_common/Configs/BotConfig.cs +++ b/src/EllieBot/_common/Configs/BotConfig.cs @@ -44,13 +44,13 @@ public sealed partial class BotConfig : ICloneable or all owners? (this might cause the bot to lag if there's a lot of owners specified) """)] public bool ForwardToAllOwners { get; set; } - + [Comment(""" Any messages sent by users in Bot's DM to be forwarded to the specified channel. This option will only work when ForwardToAllOwners is set to false """)] public ulong? ForwardToChannel { get; set; } - + [Comment(""" Should the bot ignore messages from other bots? Settings this to false might get your bot banned if it gets into a spam loop with another bot. @@ -141,11 +141,11 @@ public sealed partial class BotConfig : ICloneable ]; } -// [Comment(@"Whether the prefix will be a suffix, or prefix. -// For example, if your prefix is ! you will run a command called 'cash' by typing either -// '!cash @Someone' if your prefixIsSuffix: false or -// 'cash @Someone!' if your prefixIsSuffix: true")] -// public bool PrefixIsSuffix { get; set; } + // [Comment(@"Whether the prefix will be a suffix, or prefix. + // For example, if your prefix is ! you will run a command called 'cash' by typing either + // '!cash @Someone' if your prefixIsSuffix: false or + // 'cash @Someone!' if your prefixIsSuffix: true")] + // public bool PrefixIsSuffix { get; set; } // public string Prefixed(string text) => PrefixIsSuffix // ? text + Prefix -- 2.43.0 From b12102f7359f43916ca77d210b35bd4f1b19e7a6 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 20 Sep 2024 20:29:40 +1200 Subject: [PATCH 151/253] Removing all the broken code and remaking it --- src/EllieBot/Db/EllieContext.cs | 713 --- src/EllieBot/Db/EllieDbService.cs | 74 - src/EllieBot/Db/Extensions/ClubExtensions.cs | 34 - .../CurrencyTransactionExtensions.cs | 20 - src/EllieBot/Db/Extensions/DbExtensions.cs | 12 - .../Db/Extensions/DiscordUserExtensions.cs | 129 - .../Extensions/EllieExpressionExtensions.cs | 15 - .../Db/Extensions/GuildConfigExtensions.cs | 232 - .../Db/Extensions/ReminderExtensions.cs | 23 - .../SelfAssignableRolesExtensions.cs | 22 - .../Db/Extensions/UserXpExtensions.cs | 70 - .../Db/Extensions/WarningExtensions.cs | 59 - src/EllieBot/Db/Helpers/ActivityType.cs | 22 - src/EllieBot/Db/Helpers/GuildPerm.cs | 47 - src/EllieBot/Db/LevelStats.cs | 41 - src/EllieBot/Db/Models/AutoCommand.cs | 14 - src/EllieBot/Db/Models/AutoPublishChannel.cs | 7 - .../Db/Models/AutoTranslateChannel.cs | 10 - src/EllieBot/Db/Models/AutoTranslateUser.cs | 11 - src/EllieBot/Db/Models/BlacklistEntry.cs | 15 - src/EllieBot/Db/Models/CommandAlias.cs | 8 - src/EllieBot/Db/Models/CommandCooldown.cs | 8 - src/EllieBot/Db/Models/CurrencyTransaction.cs | 12 - src/EllieBot/Db/Models/DbEntity.cs | 12 - src/EllieBot/Db/Models/DelMsgOnCmdChannel.cs | 16 - src/EllieBot/Db/Models/DiscordPemOverride.cs | 10 - src/EllieBot/Db/Models/DiscordUser.cs | 35 - src/EllieBot/Db/Models/Event.cs | 49 - src/EllieBot/Db/Models/FeedSub.cs | 19 - src/EllieBot/Db/Models/FollowedStream.cs | 33 - src/EllieBot/Db/Models/GCChannelId.cs | 14 - src/EllieBot/Db/Models/GamblingStats.cs | 9 - src/EllieBot/Db/Models/GroupName.cs | 11 - src/EllieBot/Db/Models/GuildColors.cs | 18 - src/EllieBot/Db/Models/GuildConfig.cs | 106 - src/EllieBot/Db/Models/HoneypotChannel.cs | 11 - src/EllieBot/Db/Models/IgnoredLogItem.cs | 16 - src/EllieBot/Db/Models/ImageOnlyChannel.cs | 15 - src/EllieBot/Db/Models/LogSetting.cs | 38 - src/EllieBot/Db/Models/Permission.cs | 52 - src/EllieBot/Db/Models/PlantedCurrency.cs | 12 - src/EllieBot/Db/Models/PlaylistSong.cs | 18 - src/EllieBot/Db/Models/Reminder.cs | 19 - src/EllieBot/Db/Models/Repeater.cs | 15 - .../Db/Models/RotatingPlayingStatus.cs | 8 - src/EllieBot/Db/Models/ShopEntry.cs | 46 - src/EllieBot/Db/Models/StreamOnlineMessage.cs | 11 - src/EllieBot/Db/Models/StreamRoleSettings.cs | 74 - src/EllieBot/Db/Models/VcRoleInfo.cs | 8 - src/EllieBot/Db/Models/Waifu.cs | 75 - src/EllieBot/Db/Models/anti/AntiAltSetting.cs | 12 - .../Db/Models/anti/AntiRaidSetting.cs | 18 - src/EllieBot/Db/Models/anti/AntiSpamIgnore.cs | 12 - .../Db/Models/anti/AntiSpamSetting.cs | 13 - src/EllieBot/Db/Models/club/ClubInfo.cs | 41 - src/EllieBot/Db/Models/currency/BankUser.cs | 7 - .../Db/Models/expr/EllieExpression.cs | 27 - src/EllieBot/Db/Models/expr/Quote.cs | 26 - .../Db/Models/filter/FilterChannelId.cs | 16 - .../Db/Models/filter/FilterLinksChannelId.cs | 13 - .../Db/Models/filter/FilterWordsChannelId.cs | 17 - src/EllieBot/Db/Models/filter/FilteredWord.cs | 7 - .../Db/Models/giveaway/GiveawayModel.cs | 14 - .../Db/Models/giveaway/GiveawayUser.cs | 10 - src/EllieBot/Db/Models/punish/BanTemplate.cs | 9 - src/EllieBot/Db/Models/punish/MutedUserId.cs | 13 - .../Db/Models/punish/PunishmentAction.cs | 15 - .../Db/Models/punish/WarnExpireAction.cs | 8 - src/EllieBot/Db/Models/punish/Warning.cs | 13 - .../Db/Models/punish/WarningPunishment.cs | 10 - src/EllieBot/Db/Models/roles/ReactionRole.cs | 18 - .../Db/Models/roles/SelfAssignableRole.cs | 11 - src/EllieBot/Db/Models/roles/StickyRoles.cs | 14 - .../Db/Models/slowmode/SlowmodeIgnoredRole.cs | 20 - .../Db/Models/slowmode/SlowmodeIgnoredUser.cs | 20 - src/EllieBot/Db/Models/support/PatronQuota.cs | 24 - .../Db/Models/support/RewardedUser.cs | 10 - .../Db/Models/todo/ArchivedTodoListModel.cs | 10 - src/EllieBot/Db/Models/todo/TodoModel.cs | 13 - src/EllieBot/Db/Models/untimer/UnbanTimer.cs | 14 - src/EllieBot/Db/Models/untimer/UnmuteTimer.cs | 14 - src/EllieBot/Db/Models/untimer/UnroleTimer.cs | 15 - src/EllieBot/Db/Models/xp/UserXpStats.cs | 11 - .../Db/Models/xp/XpNotificationLocation.cs | 8 - src/EllieBot/Db/Models/xp/XpSettings.cs | 64 - src/EllieBot/Db/PostgreSqlContext.cs | 26 - src/EllieBot/Db/SqliteContext.cs | 26 - src/EllieBot/Migrations/MigrationQueries.cs | 68 - .../20220409170719_mysql-init.Designer.cs | 3565 --------------- .../PostgreSql/20220409170719_mysql-init.cs | 2200 ---------- .../20220428044547_stondel.Designer.cs | 3569 --------------- .../PostgreSql/20220428044547_stondel.cs | 26 - .../20220429044808_bank.Designer.cs | 3600 ---------------- .../PostgreSql/20220429044808_bank.cs | 40 - .../20220504162457_new-rero.Designer.cs | 3551 --------------- .../PostgreSql/20220504162457_new-rero.cs | 114 - ...0220614071421_patronage-system.Designer.cs | 3621 ---------------- .../20220614071421_patronage-system.cs | 169 - ...0220623090729_stondel-db-cache.Designer.cs | 3656 ---------------- .../20220623090729_stondel-db-cache.cs | 36 - .../20220703194412_logwarns.Designer.cs | 3660 ---------------- .../PostgreSql/20220703194412_logwarns.cs | 25 - .../20220725155941_xpitemshop.Designer.cs | 3700 ---------------- .../PostgreSql/20220725155941_xpitemshop.cs | 42 - ...220727033944_linkonly-channels.Designer.cs | 3704 ---------------- .../20220727033944_linkonly-channels.cs | 26 - ...559_remove-obsolete-xp-columns.Designer.cs | 3686 ---------------- ...220808142559_remove-obsolete-xp-columns.cs | 1400 ------ .../20220831142735_banprune.Designer.cs | 3690 ---------------- .../PostgreSql/20220831142735_banprune.cs | 25 - .../20220913192529_shop-role-req.Designer.cs | 3694 ---------------- .../20220913192529_shop-role-req.cs | 25 - .../20220916194523_autopub.Designer.cs | 3725 ---------------- .../PostgreSql/20220916194523_autopub.cs | 40 - .../20221003175752_gambling-stats.Designer.cs | 3760 ---------------- .../20221003175752_gambling-stats.cs | 41 - ...2807_toggle-global-expressions.Designer.cs | 3764 ---------------- ...0221021192807_toggle-global-expressions.cs | 26 - .../20221118195200_log-thread.Designer.cs | 3772 ---------------- .../PostgreSql/20221118195200_log-thread.cs | 35 - .../20221122204423_feed-text.Designer.cs | 3776 ---------------- .../PostgreSql/20221122204423_feed-text.cs | 25 - .../PostgreSql/20240502233202_v5.Designer.cs | 3827 ----------------- .../PostgreSql/20240502233202_v5.cs | 326 -- ...0518221432_guidlconfig-cleanup.Designer.cs | 3816 ---------------- .../20240518221432_guidlconfig-cleanup.cs | 701 --- ...611180506_remove-patron-limits.Designer.cs | 3781 ---------------- .../20240611180506_remove-patron-limits.cs | 42 - .../20240627033522_honeypot.Designer.cs | 3798 ---------------- .../PostgreSql/20240627033522_honeypot.cs | 33 - .../20240911104857_greet-settings.Designer.cs | 3785 ---------------- .../20240911104857_greet-settings.cs | 196 - .../PostgreSqlContextModelSnapshot.cs | 3782 ---------------- .../Sqlite/20210621042359_squash.Designer.cs | 2786 ------------ .../Sqlite/20210621042359_squash.cs | 2229 ---------- .../Sqlite/20210707002343_cleanup.Designer.cs | 2625 ----------- .../Sqlite/20210707002343_cleanup.cs | 493 --- .../20210911225622_rero-cascade.Designer.cs | 2626 ----------- .../Sqlite/20210911225622_rero-cascade.cs | 37 - .../20210912182515_boost-messages.Designer.cs | 2638 ------------ .../Sqlite/20210912182515_boost-messages.cs | 56 - ...00106_logsettings-independence.Designer.cs | 2630 ----------- ...20210912200106_logsettings-independence.cs | 69 - ...0914180026_image-only-channels.Designer.cs | 2653 ------------ .../20210914180026_image-only-channels.cs | 37 - ...1204645_logignore-user-channel.Designer.cs | 2657 ------------ .../20210921204645_logignore-user-channel.cs | 97 - ...1015232708_nsfw-blacklist-tags.Designer.cs | 2648 ------------ .../20211015232708_nsfw-blacklist-tags.cs | 75 - ...211121002508_weighted-warnings.Designer.cs | 2653 ------------ .../20211121002508_weighted-warnings.cs | 24 - .../20211213145407_atl-rework.Designer.cs | 2725 ------------ .../Sqlite/20211213145407_atl-rework.cs | 70 - ...ame-to-expressions-perm-rename.Designer.cs | 2726 ------------ ...4_crs-rename-to-expressions-perm-rename.cs | 118 - ...105942_filter-settings-cleanup.Designer.cs | 2746 ------------ .../20220110105942_filter-settings-cleanup.cs | 81 - ...rs-rework-discorduser-defaults.Designer.cs | 2763 ------------ ...4401_curtrs-rework-discorduser-defaults.cs | 94 - .../20220213123633_music-autoplay.Designer.cs | 2760 ------------ .../Sqlite/20220213123633_music-autoplay.cs | 69 - .../20220409170828_clubs-refactor.Designer.cs | 2756 ------------ .../Sqlite/20220409170828_clubs-refactor.cs | 131 - .../Sqlite/20220427200557_stondel.Designer.cs | 2759 ------------ .../Sqlite/20220427200557_stondel.cs | 26 - .../Sqlite/20220428051304_bank.Designer.cs | 2782 ------------ .../Migrations/Sqlite/20220428051304_bank.cs | 39 - .../20220503234243_new-rero.Designer.cs | 2741 ------------ .../Sqlite/20220503234243_new-rero.cs | 113 - ...0220614071359_patronage-system.Designer.cs | 2796 ------------ .../Sqlite/20220614071359_patronage-system.cs | 122 - ...0220623073903_stondel-db-cache.Designer.cs | 2823 ------------ .../Sqlite/20220623073903_stondel-db-cache.cs | 35 - .../20220703194348_logwarns.Designer.cs | 2825 ------------ .../Sqlite/20220703194348_logwarns.cs | 43 - .../20220725112348_xpitemshop.Designer.cs | 2855 ------------ .../Sqlite/20220725112348_xpitemshop.cs | 41 - ...220727005807_linkonly-channels.Designer.cs | 2858 ------------ .../20220727005807_linkonly-channels.cs | 26 - ...842_remove-obsolete-xp-columns.Designer.cs | 2843 ------------ ...220808141842_remove-obsolete-xp-columns.cs | 48 - .../20220831142504_banprune.Designer.cs | 2846 ------------ .../Sqlite/20220831142504_banprune.cs | 25 - .../20220913190532_shop-role-req.Designer.cs | 2849 ------------ .../Sqlite/20220913190532_shop-role-req.cs | 25 - .../Sqlite/20220916191702_autopub.Designer.cs | 2872 ------------- .../Sqlite/20220916191702_autopub.cs | 39 - .../20221003111019_gambling-stats.Designer.cs | 2898 ------------- .../Sqlite/20221003111019_gambling-stats.cs | 40 - ...2121_toggle-global-expressions.Designer.cs | 2901 ------------- ...0221021192121_toggle-global-expressions.cs | 26 - .../20221118195152_log-thread.Designer.cs | 2907 ------------- .../Sqlite/20221118195152_log-thread.cs | 35 - .../20221122204324_feed-text.Designer.cs | 2910 ------------- .../Sqlite/20221122204324_feed-text.cs | 25 - .../Sqlite/20240502233144_v5.Designer.cs | 2950 ------------- .../Migrations/Sqlite/20240502233144_v5.cs | 325 -- ...0518221424_guidlconfig-cleanup.Designer.cs | 2948 ------------- .../20240518221424_guidlconfig-cleanup.cs | 702 --- ...611180456_remove-patron-limits.Designer.cs | 2921 ------------- .../20240611180456_remove-patron-limits.cs | 42 - .../20240627033508_honeypot.Designer.cs | 2935 ------------- .../Sqlite/20240627033508_honeypot.cs | 34 - .../20240911104847_greet-settings.Designer.cs | 2925 ------------- .../Sqlite/20240911104847_greet-settings.cs | 219 - .../Sqlite/EllieSqliteContextModelSnapshot.cs | 2922 ------------- .../Modules/Administration/Administration.cs | 499 --- .../Administration/AdministrationService.cs | 205 - .../AutoAssignRoleCommands.cs | 60 - .../AutoAssignRoleService.cs | 158 - .../Administration/AutoPublishService.cs | 89 - .../DangerousCommands/CleanupCommands.cs | 74 - .../DangerousCommands/CleanupService.cs | 270 -- .../DangerousCommands/DangerousCommands.cs | 164 - .../DangerousCommandsService.cs | 103 - .../DangerousCommands/_common/CleanupId.cs | 9 - .../_common/ICleanupService.cs | 9 - .../DangerousCommands/_common/KeepReport.cs | 7 - .../DangerousCommands/_common/KeepResult.cs | 6 - .../GameVoiceChannelCommands.cs | 36 - .../GameVoiceChannelService.cs | 125 - .../Administration/GreetBye/GreetCommands.cs | 226 - .../Administration/GreetBye/GreetService.cs | 480 --- .../Administration/GreetBye/GreetSettings.cs | 44 - .../Honeypot/HoneyPotService.cs | 95 - .../Honeypot/HoneypotCommands.cs | 29 - .../Honeypot/IHoneyPotService.cs | 6 - .../Administration/ImageOnlyChannelService.cs | 235 - .../Administration/LocalizationCommands.cs | 264 -- .../Administration/Mute/MuteCommands.cs | 231 - .../Administration/Mute/MuteService.cs | 503 --- .../DiscordPermOverrideCommands.cs | 83 - .../PlayingRotate/PlayingRotateCommands.cs | 67 - .../PlayingRotate/PlayingRotateService.cs | 109 - .../Administration/Prefix/PrefixCommands.cs | 57 - .../Protection/ProtectionCommands.cs | 292 -- .../Protection/ProtectionService.cs | 498 --- .../Protection/ProtectionStats.cs | 52 - .../Protection/PunishQueueItem.cs | 13 - .../Protection/UserSpamStats.cs | 64 - .../Administration/Prune/PruneCommands.cs | 227 - .../Administration/Prune/PruneResult.cs | 9 - .../Administration/Prune/PruneService.cs | 114 - .../Role/IReactionRoleService.cs | 51 - .../Role/ReactionRoleCommands.cs | 174 - .../Role/ReactionRolesService.cs | 404 -- .../Administration/Role/RoleCommands.cs | 209 - .../Administration/Role/StickyRolesService.cs | 138 - .../Self/CheckForUpdatesService.cs | 169 - .../Administration/Self/SelfCommands.cs | 597 --- .../Administration/Self/SelfService.cs | 494 --- .../SelfAssignedRolesCommands.cs | 239 - .../SelfAssignedRolesService.cs | 233 - .../ServerLog/DummyLogCommandService.cs | 25 - .../ServerLog/ServerLogCommandService.cs | 1296 ------ .../ServerLog/ServerLogCommands.cs | 175 - .../Administration/Ticket/TicketCommands.cs | 14 - .../Timezone/GuildTimezoneService.cs | 94 - .../Timezone/TimeZoneCommands.cs | 78 - .../UserPunish/UserPunishCommands.cs | 986 ----- .../UserPunish/UserPunishService.cs | 629 --- .../Administration/VcRole/VcRoleCommands.cs | 77 - .../Administration/VcRole/VcRoleService.cs | 207 - .../_common/SetServerBannerResult.cs | 9 - .../_common/SetServerIconResult.cs | 8 - .../Expressions/EllieExpressionExtensions.cs | 91 - .../Modules/Expressions/EllieExpressions.cs | 445 -- .../Expressions/EllieExpressionsService.cs | 800 ---- .../Modules/Expressions/ExportedExpr.cs | 27 - src/EllieBot/Modules/Expressions/ExprField.cs | 10 - .../TypeReaders/CommandOrExprTypeReader.cs | 33 - .../Gambling/AnimalRacing/AnimalRace.cs | 153 - .../AnimalRacing/AnimalRaceService.cs | 9 - .../AnimalRacing/AnimalRacingCommands.cs | 197 - .../Gambling/AnimalRacing/AnimalRacingUser.cs | 26 - .../Exceptions/AlreadyJoinedException.cs | 19 - .../Exceptions/AlreadyStartedException.cs | 19 - .../Exceptions/AnimalRaceFullException.cs | 19 - .../Exceptions/NotEnoughFundsException.cs | 19 - .../Gambling/AnimalRacing/RaceOptions.cs | 16 - .../Modules/Gambling/Bank/BankCommands.cs | 139 - .../Modules/Gambling/Bank/BankService.cs | 115 - .../Gambling/BlackJack/BlackJackCommands.cs | 183 - .../Gambling/BlackJack/BlackJackService.cs | 9 - .../Modules/Gambling/BlackJack/Blackjack.cs | 329 -- .../Modules/Gambling/BlackJack/Player.cs | 57 - .../Modules/Gambling/Connect4/Connect4.cs | 390 -- .../Gambling/Connect4/Connect4Commands.cs | 189 - .../Modules/Gambling/CurrencyProvider.cs | 16 - .../Gambling/DiceRoll/DiceRollCommands.cs | 224 - .../Modules/Gambling/Draw/DrawCommands.cs | 246 -- .../Modules/Gambling/EconomyResult.cs | 12 - .../Gambling/Events/CurrencyEventsCommands.cs | 60 - .../Gambling/Events/CurrencyEventsService.cs | 70 - .../Modules/Gambling/Events/EventOptions.cs | 39 - .../Gambling/Events/GameStatusEvent.cs | 194 - .../Modules/Gambling/Events/ICurrencyEvent.cs | 9 - .../Modules/Gambling/Events/ReactionEvent.cs | 197 - .../Gambling/FlipCoin/FlipCoinCommands.cs | 140 - .../Modules/Gambling/FlipCoin/FlipResult.cs | 7 - src/EllieBot/Modules/Gambling/Gambling.cs | 903 ---- .../Modules/Gambling/GamblingConfig.cs | 411 -- .../Modules/Gambling/GamblingConfigService.cs | 203 - .../Modules/Gambling/GamblingService.cs | 187 - .../Gambling/GamblingTopLevelModule.cs | 68 - src/EllieBot/Modules/Gambling/InputRpsPick.cs | 3 - .../PlantPick/PlantAndPickCommands.cs | 114 - .../Gambling/PlantPick/PlantPickService.cs | 390 -- .../Modules/Gambling/Shop/IShopService.cs | 46 - .../Modules/Gambling/Shop/ShopCommands.cs | 597 --- .../Modules/Gambling/Shop/ShopService.cs | 126 - .../Modules/Gambling/Slot/SlotCommands.cs | 222 - .../Modules/Gambling/VoteRewardService.cs | 106 - .../Gambling/Waifus/WaifuClaimCommands.cs | 406 -- .../Modules/Gambling/Waifus/WaifuService.cs | 633 --- .../Gambling/Waifus/_common/AffinityTitle.cs | 16 - .../Gambling/Waifus/_common/ClaimTitle.cs | 18 - .../Gambling/Waifus/_common/DivorceResult.cs | 10 - .../Gambling/Waifus/_common/Extensions.cs | 6 - .../Waifus/_common/MultipleWaifuItems.cs | 6 - .../_common/MultipleWaifuItemsTypeReader.cs | 47 - .../Waifus/_common/WaifuClaimResult.cs | 9 - .../Modules/Gambling/Waifus/db/Waifu.cs | 17 - .../Gambling/Waifus/db/WaifuExtensions.cs | 134 - .../Gambling/Waifus/db/WaifuInfoStats.cs | 14 - .../Modules/Gambling/Waifus/db/WaifuItem.cs | 10 - .../Gambling/Waifus/db/WaifuLbResult.cs | 16 - .../Modules/Gambling/Waifus/db/WaifuUpdate.cs | 15 - .../Gambling/Waifus/db/WaifuUpdateType.cs | 8 - .../Gambling/_common/Decks/QuadDeck.cs | 19 - .../_common/GamblingCleanupService.cs | 56 - .../_common/IGamblingCleanupService.cs | 8 - .../Gambling/_common/IGamblingService.cs | 17 - .../Gambling/_common/NewGamblingService.cs | 268 -- .../Modules/Gambling/_common/RollDuelGame.cs | 139 - .../BaseShmartInputAmountReader.cs | 94 - .../ShmartBankInputAmountReader.cs | 21 - .../TypeReaders/ShmartNumberTypeReader.cs | 57 - .../Modules/Games/Acrophobia/Acrophobia.cs | 200 - .../Games/Acrophobia/AcrophobiaUser.cs | 22 - .../Games/Acrophobia/AcropobiaCommands.cs | 140 - .../Games/ChatterBot/ChatterBotCommands.cs | 34 - .../Games/ChatterBot/ChatterbotService.cs | 239 - .../Games/ChatterBot/_common/Choice.cs | 9 - .../ChatterBot/_common/CleverbotResponse.cs | 8 - .../ChatterBot/_common/IChatterBotSession.cs | 10 - .../Games/ChatterBot/_common/Message.cs | 9 - .../_common/OfficialCleverbotSession.cs | 45 - .../_common/OpenAiApi/OpenAiApiMessage.cs | 15 - .../_common/OpenAiApi/OpenAiApiRequest.cs | 18 - .../_common/OpenAiApi/OpenAiApiUsageData.cs | 15 - .../OpenAiApi/OpenAiCompletionResponse.cs | 13 - .../ChatterBot/_common/OpenAiApiSession.cs | 147 - .../Games/ChatterBot/_common/ThinkResult.cs | 9 - src/EllieBot/Modules/Games/Games.cs | 47 - src/EllieBot/Modules/Games/GamesConfig.cs | 195 - .../Modules/Games/GamesConfigService.cs | 120 - src/EllieBot/Modules/Games/GamesService.cs | 87 - .../Games/Hangman/DefaultHangmanSource.cs | 64 - .../Modules/Games/Hangman/HangmanCommands.cs | 76 - .../Modules/Games/Hangman/HangmanGame.cs | 111 - .../Modules/Games/Hangman/HangmanService.cs | 136 - .../Modules/Games/Hangman/HangmanTerm.cs | 8 - .../Modules/Games/Hangman/IHangmanService.cs | 10 - .../Modules/Games/Hangman/IHangmanSource.cs | 10 - src/EllieBot/Modules/Games/Nunchi/Nunchi.cs | 183 - .../Modules/Games/Nunchi/NunchiCommands.cs | 114 - .../Games/SpeedTyping/SpeedTypingCommands.cs | 105 - .../Games/SpeedTyping/TypingArticle.cs | 9 - .../Modules/Games/SpeedTyping/TypingGame.cs | 197 - .../Modules/Games/TicTacToe/TicTacToe.cs | 307 -- .../Games/TicTacToe/TicTacToeCommands.cs | 54 - .../QuestionPool/DefaultQuestionPool.cs | 22 - .../Trivia/QuestionPool/IQuestionPool.cs | 6 - .../QuestionPool/PokemonQuestionPool.cs | 32 - .../Modules/Games/Trivia/TriviaCommands.cs | 282 -- .../Modules/Games/Trivia/TriviaGame.cs | 228 - .../Games/Trivia/TriviaGamesService.cs | 37 - .../Modules/Games/Trivia/TriviaOptions.cs | 44 - .../Modules/Games/Trivia/TriviaQuestion.cs | 115 - .../Modules/Games/Trivia/TriviaUser.cs | 3 - .../Modules/Help/CommandJsonObject.cs | 13 - src/EllieBot/Modules/Help/CommandsOptions.cs | 26 - src/EllieBot/Modules/Help/Help.cs | 590 --- src/EllieBot/Modules/Help/HelpService.cs | 44 - .../IMarmaladesRepositoryService.cs | 6 - src/EllieBot/Modules/Marmalades/Marmalade.cs | 243 -- .../Modules/Marmalades/MarmaladeItem.cs | 8 - .../Marmalades/MarmaladesRepositoryService.cs | 67 - src/EllieBot/Modules/Music/Music.cs | 755 ---- .../Modules/Music/PlaylistCommands.cs | 245 -- .../Music/Services/AyuVoiceStateService.cs | 217 - .../Modules/Music/Services/IMusicService.cs | 36 - .../Modules/Music/Services/MusicService.cs | 438 -- .../Modules/Music/Services/extractor/Misc.cs | 74 - .../Music/Services/extractor/YtLoader.cs | 130 - .../Music/_common/ICachableTrackData.cs | 12 - .../Music/_common/ILocalTrackResolver.cs | 7 - .../Modules/Music/_common/IMusicPlayer.cs | 41 - .../Modules/Music/_common/IMusicQueue.cs | 23 - .../Music/_common/IPlatformQueryResolver.cs | 6 - .../Modules/Music/_common/IQueuedTrackInfo.cs | 9 - .../Modules/Music/_common/IRadioResolver.cs | 6 - .../Modules/Music/_common/ITrackCacher.cs | 25 - .../Modules/Music/_common/ITrackInfo.cs | 11 - .../Music/_common/ITrackResolveProvider.cs | 6 - .../Modules/Music/_common/IVoiceProxy.cs | 15 - .../Modules/Music/_common/IYoutubeResolver.cs | 11 - .../Music/_common/Impl/CachableTrackData.cs | 19 - .../Music/_common/Impl/MultimediaTimer.cs | 95 - .../Music/_common/Impl/MusicExtensions.cs | 57 - .../Music/_common/Impl/MusicPlatform.cs | 9 - .../Modules/Music/_common/Impl/MusicPlayer.cs | 545 --- .../Modules/Music/_common/Impl/MusicQueue.cs | 342 -- .../Music/_common/Impl/RemoteTrackInfo.cs | 10 - .../Music/_common/Impl/SimpleTrackInfo.cs | 27 - .../Modules/Music/_common/Impl/TrackCacher.cs | 105 - .../Modules/Music/_common/Impl/VoiceProxy.cs | 102 - .../Music/_common/Resolvers/InvTrackInfo.cs | 12 - .../Resolvers/InvidiousYoutubeResolver.cs | 108 - .../_common/Resolvers/LocalTrackResolver.cs | 122 - .../_common/Resolvers/RadioResolveStrategy.cs | 106 - .../_common/Resolvers/TrackResolveProvider.cs | 54 - .../Music/_common/Resolvers/YoutubeHelpers.cs | 10 - .../Resolvers/YoutubeResolverFactory.cs | 33 - .../_common/Resolvers/YtdlYoutubeResolver.cs | 316 -- .../db/MusicPlayerSettingsExtensions.cs | 27 - .../Modules/Music/_common/db/MusicPlaylist.cs | 10 - .../_common/db/MusicPlaylistExtensions.cs | 18 - .../Modules/Music/_common/db/MusicSettings.cs | 61 - .../Patronage/Config/PatronageConfig.cs | 45 - .../Patronage/CurrencyRewardService.cs | 194 - .../Patronage/Patreon/PatreonClient.cs | 149 - .../Patronage/Patreon/PatreonCredentials.cs | 10 - .../Modules/Patronage/Patreon/PatreonData.cs | 134 - .../Patronage/Patreon/PatreonMemberData.cs | 28 - .../Patronage/Patreon/PatreonRefreshData.cs | 22 - .../Patreon/PatreonSubscriptionHandler.cs | 79 - .../Modules/Patronage/PatronageCommands.cs | 140 - .../Modules/Patronage/PatronageService.cs | 486 --- .../Blacklist/BlacklistCommands.cs | 154 - .../CleverbotResponseCmdCdTypeReader.cs | 15 - .../CommandCooldown/CmdCdService.cs | 141 - .../CommandCooldown/CmdCdsCommands.cs | 106 - .../Permissions/Filter/FilterCommands.cs | 326 -- .../Permissions/Filter/FilterService.cs | 249 -- .../Filter/ServerFilterSettings.cs | 10 - .../GlobalPermissionCommands.cs | 77 - .../GlobalPermissionService.cs | 92 - .../Modules/Permissions/PermissionCache.cs | 11 - .../Permissions/PermissionExtensions.cs | 132 - .../Modules/Permissions/Permissions.cs | 543 --- .../Permissions/PermissionsCollection.cs | 74 - .../Modules/Permissions/PermissionsService.cs | 184 - .../Permissions/ResetPermissionsCommands.cs | 37 - .../Modules/Searches/Anime/AnimeResult.cs | 41 - .../Searches/Anime/AnimeSearchCommands.cs | 77 - .../Searches/Anime/AnimeSearchService.cs | 79 - .../Modules/Searches/Anime/MangaResult.cs | 40 - .../Modules/Searches/Crypto/CryptoCommands.cs | 231 - .../Modules/Searches/Crypto/CryptoService.cs | 266 -- .../Crypto/DefaultStockDataService.cs | 112 - .../Crypto/Drawing/CandleDrawingData.cs | 12 - .../Drawing/IStockChartDrawingService.cs | 8 - .../ImagesharpStockChartDrawingService.cs | 200 - .../Searches/Crypto/IStockDataService.cs | 8 - .../Searches/Crypto/_common/CandleData.cs | 8 - .../Searches/Crypto/_common/ImageData.cs | 7 - .../Searches/Crypto/_common/QuoteResponse.cs | 43 - .../Searches/Crypto/_common/StockData.cs | 15 - .../Searches/Crypto/_common/SymbolData.cs | 3 - .../Crypto/_common/YahooFinanceCandleData.cs | 12 - .../_common/YahooFinanceSearchResponse.cs | 19 - .../_common/YahooFinanceSearchResponseItem.cs | 25 - .../Crypto/_common/YahooQueryModel.cs | 9 - .../Modules/Searches/Feeds/FeedCommands.cs | 148 - .../Modules/Searches/Feeds/FeedsService.cs | 309 -- src/EllieBot/Modules/Searches/JokeCommands.cs | 53 - .../Modules/Searches/Osu/OsuCommands.cs | 124 - .../Modules/Searches/Osu/OsuService.cs | 227 - .../Modules/Searches/PokemonSearchCommands.cs | 74 - .../Searches/Religious/Common/BibleVerse.cs | 13 - .../Searches/Religious/Common/BibleVerses.cs | 7 - .../Searches/Religious/Common/QuranAyah.cs | 20 - .../Religious/Common/QuranResponse.cs | 15 - .../Searches/Religious/ReligiousApiService.cs | 62 - .../Searches/Religious/ReligiousCommands.cs | 60 - .../Search/DefaultSearchServiceFactory.cs | 65 - .../Search/Google/GoogleCustomSearchResult.cs | 22 - .../Searches/Search/Google/GoogleImageData.cs | 12 - .../Search/Google/GoogleImageResult.cs | 19 - .../Search/Google/GoogleImageResultEntry.cs | 13 - .../Google/GoogleSearchResultInformation.cs | 13 - .../Search/Google/GoogleSearchService.cs | 66 - .../Google/OfficialGoogleSearchResultEntry.cs | 19 - .../GoogleScrape/GoogleScrapeService.cs | 121 - .../PlainGoogleScrapeSearchResult.cs | 8 - .../GoogleScrape/PlainSearchResultEntry.cs | 9 - .../GoogleScrape/PlainSearchResultInfo.cs | 7 - .../Searches/Search/IImageSearchResult.cs | 13 - .../Modules/Searches/Search/ISearchResult.cs | 8 - .../Searches/Search/ISearchResultEntry.cs | 9 - .../Search/ISearchResultInformation.cs | 7 - .../Modules/Searches/Search/ISearchService.cs | 9 - .../Searches/Search/ISearchServiceFactory.cs | 10 - .../Modules/Searches/Search/SearchCommands.cs | 205 - .../Searches/Search/SearchServiceBase.cs | 9 - .../Search/Searx/SearxImageSearchResult.cs | 28 - .../Searx/SearxImageSearchResultEntry.cs | 14 - .../Searches/Search/Searx/SearxInfobox.cs | 30 - .../Search/Searx/SearxSearchAttribute.cs | 15 - .../Search/Searx/SearxSearchResult.cs | 47 - .../Search/Searx/SearxSearchResultEntry.cs | 51 - .../Searx/SearxSearchResultInformation.cs | 7 - .../Search/Searx/SearxSearchService.cs | 77 - .../Searches/Search/Searx/SearxUrlData.cs | 15 - .../Search/Youtube/IYoutubeSearchService.cs | 6 - .../Search/Youtube/InvidiousSearchResponse.cs | 63 - .../Youtube/InvidiousYtSearchService.cs | 47 - .../Searches/Search/Youtube/VideoInfo.cs | 9 - .../Youtube/YoutubeDataApiSearchService.cs | 26 - .../Youtube/YtdlYoutubeSearchService.cs | 7 - .../Youtube/YtdlpYoutubeSearchService.cs | 7 - .../Search/Youtube/YtdlxServiceBase.cs | 34 - src/EllieBot/Modules/Searches/Searches.cs | 461 -- .../Modules/Searches/SearchesService.cs | 614 --- .../StreamNotificationCommands.cs | 195 - .../StreamNotificationService.cs | 671 --- .../StreamOnlineMessageDeleterService.cs | 99 - .../Searches/Translate/ITranslateService.cs | 17 - .../Searches/Translate/TranslateService.cs | 224 - .../Searches/Translate/TranslatorCommands.cs | 95 - src/EllieBot/Modules/Searches/XkcdCommands.cs | 97 - .../Searches/YoutubeTrack/YtTrackService.cs | 134 - .../Searches/YoutubeTrack/YtUploadCommands.cs | 54 - .../Modules/Searches/_common/AtlExtensions.cs | 12 - .../_common/Config/ImgSearchEngine.cs | 7 - .../Searches/_common/Config/SearchesConfig.cs | 85 - .../_common/Config/SearchesConfigService.cs | 66 - .../_common/Config/WebSearchEngine.cs | 9 - .../Modules/Searches/_common/CryptoData.cs | 66 - .../Modules/Searches/_common/DefineData.cs | 10 - .../Modules/Searches/_common/DefineModel.cs | 43 - .../Modules/Searches/_common/E621Object.cs | 24 - .../Modules/Searches/_common/ErrorType.cs | 9 - .../Exceptions/StreamNotFoundException.cs | 19 - .../Modules/Searches/_common/Extensions.cs | 9 - .../Modules/Searches/_common/Gallery.cs | 44 - .../Searches/_common/GatariUserResponse.cs | 52 - .../_common/GatariUserStatsResponse.cs | 76 - .../Searches/_common/GoogleSearchResult.cs | 16 - .../Searches/_common/HearthstoneCardData.cs | 13 - .../Searches/_common/LowerCaseNamingPolicy.cs | 12 - .../Modules/Searches/_common/MagicItem.cs | 8 - .../Modules/Searches/_common/MtgData.cs | 26 - .../Modules/Searches/_common/NovelData.cs | 14 - .../Modules/Searches/_common/OmdbMovie.cs | 13 - .../Modules/Searches/_common/OsuMapData.cs | 9 - .../Modules/Searches/_common/OsuUserBets.cs | 58 - .../Modules/Searches/_common/OsuUserData.cs | 73 - .../Searches/_common/PathOfExileModels.cs | 40 - .../Modules/Searches/_common/ShortenData.cs | 10 - .../Modules/Searches/_common/SteamGameId.cs | 35 - .../Models/HelixStreamsResponse.cs | 64 - .../Models/HelixUsersResponse.cs | 46 - .../Models/PicartoChannelResponse.cs | 157 - .../StreamNotifications/Models/StreamData.cs | 21 - .../Models/StreamDataKey.cs | 16 - .../Models/TrovoGetUsersResponse.cs | 61 - .../Models/TrovoRequestData.cs | 10 - .../Models/TrovoSocialLink.cs | 13 - .../Models/TwitchResponseV5.cs | 114 - .../Models/TwitchUsersResponseV5.cs | 37 - .../StreamNotifications/NotifChecker.cs | 215 - .../Providers/PicartoProvider.cs | 100 - .../StreamNotifications/Providers/Provider.cs | 63 - .../Providers/TrovoProvider.cs | 126 - .../Providers/TwitchHelixProvider.cs | 194 - .../Modules/Searches/_common/TimeData.cs | 9 - .../Modules/Searches/_common/TimeModels.cs | 22 - .../Modules/Searches/_common/UrbanDef.cs | 14 - .../Modules/Searches/_common/WeatherModels.cs | 67 - .../Modules/Searches/_common/WikiaResponse.cs | 7 - .../Searches/_common/WikipediaApiModel.cs | 18 - .../Searches/_common/WikipediaReply.cs | 11 - .../Modules/Searches/_common/WoWJoke.cs | 11 - src/EllieBot/Modules/Utility/AfkService.cs | 148 - .../Modules/Utility/Ai/AiAssistantService.cs | 314 -- .../Modules/Utility/Ai/AiCommandModel.cs | 15 - .../Modules/Utility/Ai/AiCommandParamModel.cs | 12 - .../Utility/Ai/CommandPromptResultModel.cs | 16 - .../Utility/Ai/EllieCommandCallModel.cs | 8 - .../Modules/Utility/Ai/IAiAssistantService.cs | 20 - .../Modules/Utility/Ai/UtilityCommands.cs | 22 - .../Modules/Utility/Alias/AliasCommands.cs | 137 - .../Modules/Utility/Alias/AliasService.cs | 99 - .../Modules/Utility/Calc/CalcCommands.cs | 48 - .../Modules/Utility/ConfigCommands.cs | 154 - .../Utility/Giveaway/GiveawayCommands.cs | 118 - .../Utility/Giveaway/GiveawayService.cs | 359 -- src/EllieBot/Modules/Utility/GuildColors.cs | 39 - .../Modules/Utility/Info/InfoCommands.cs | 180 - .../Modules/Utility/Invite/InviteCommands.cs | 96 - .../Modules/Utility/Invite/InviteService.cs | 48 - .../Modules/Utility/Quote/IQuoteService.cs | 50 - .../Modules/Utility/Quote/QuoteCommands.cs | 389 -- .../Modules/Utility/Quote/QuoteService.cs | 222 - .../Utility/Quote/_common/ExportedQuote.cs | 20 - .../Modules/Utility/Remind/RemindCommands.cs | 224 - .../Modules/Utility/Remind/RemindService.cs | 271 -- .../Utility/Repeater/RepeatCommands.cs | 240 -- .../Utility/Repeater/RepeaterService.cs | 443 -- .../Utility/Repeater/RunningRepeater.cs | 92 - .../Utility/StreamRole/StreamRoleCommands.cs | 97 - .../Utility/StreamRole/StreamRoleService.cs | 338 -- .../Modules/Utility/Todo/ArchiveTodoResult.cs | 8 - .../Modules/Utility/Todo/TodoAddResult.cs | 7 - .../Modules/Utility/Todo/TodoCommands.cs | 237 - .../Modules/Utility/Todo/TodoService.cs | 192 - .../UnitConversion/ConverterService.cs | 99 - .../UnitConversion/UnitConversionCommands.cs | 100 - src/EllieBot/Modules/Utility/Utility.cs | 786 ---- .../Modules/Utility/VerboseErrorsService.cs | 70 - .../Modules/Utility/_common/ConvertUnit.cs | 12 - .../Modules/Utility/_common/EvalGlobals.cs | 13 - .../Exceptions/StreamRoleNotFoundException.cs | 20 - .../StreamRolePermissionException.cs | 20 - .../Utility/_common/StreamRoleListType.cs | 8 - src/EllieBot/Modules/Xp/Club/Club.cs | 485 --- src/EllieBot/Modules/Xp/Club/ClubService.cs | 377 -- src/EllieBot/Modules/Xp/Club/IClubService.cs | 35 - .../Xp/Club/Results/ClubAcceptResult.cs | 15 - .../Modules/Xp/Club/Results/ClubBanResult.cs | 10 - .../Xp/Club/Results/ClubCreateResult.cs | 10 - .../Modules/Xp/Club/Results/ClubKickResult.cs | 9 - .../Xp/Club/Results/ClubLeaveResult.cs | 8 - .../Xp/Club/Results/ClubRenameResult.cs | 9 - .../Xp/Club/Results/ClubTransferError.cs | 7 - .../Xp/Club/Results/ClubUnbanResult.cs | 8 - .../Xp/Club/Results/SetClubIconResult.cs | 9 - .../Xp/Club/Results/ToggleAdminResult.cs | 10 - src/EllieBot/Modules/Xp/Xp.cs | 599 --- src/EllieBot/Modules/Xp/XpConfig.cs | 109 - src/EllieBot/Modules/Xp/XpConfigService.cs | 63 - src/EllieBot/Modules/Xp/XpRewards.cs | 141 - src/EllieBot/Modules/Xp/XpService.cs | 1622 ------- .../Modules/Xp/_common/FullUserStats.cs | 30 - .../Modules/Xp/_common/IXpCleanupService.cs | 6 - .../Modules/Xp/_common/UserCacheItem.cs | 13 - .../Modules/Xp/_common/XpCleanupService.cs | 31 - src/EllieBot/Modules/Xp/_common/XpTemplate.cs | 271 -- .../Modules/Xp/_common/db/XpShopOwnedItem.cs | 16 - .../Services/Impl/BotCredsProvider.cs | 163 - .../Services/Impl/GoogleApiService.cs | 229 - .../GoogleApiService_SupportedLanguages.cs | 160 - src/EllieBot/Services/Impl/ImageCache.cs | 71 - src/EllieBot/Services/Impl/LocalDataCache.cs | 108 - src/EllieBot/Services/Impl/Localization.cs | 120 - .../Services/Impl/PubSub/JsonSeria.cs | 28 - .../Services/Impl/PubSub/RedisPubSub.cs | 57 - .../Services/Impl/PubSub/YamlSeria.cs | 39 - src/EllieBot/Services/Impl/RedisBotCache.cs | 121 - .../Services/Impl/RedisBotStringsProvider.cs | 91 - .../Services/Impl/RemoteGrpcCoordinator.cs | 132 - .../_common/Abstractions/AsyncLazy.cs | 19 - .../Abstractions/Cache/BotCacheExtensions.cs | 46 - .../_common/Abstractions/Cache/IBotCache.cs | 47 - .../Abstractions/Cache/MemoryBotCache.cs | 71 - .../Collections/ConcurrentHashSet.cs | 84 - .../Collections/IndexedCollection.cs | 148 - .../_common/Abstractions/EllieRandom.cs | 66 - .../Extensions/ArrayExtensions.cs | 62 - .../Extensions/EnumerableExtensions.cs | 113 - .../Abstractions/Extensions/Extensions.cs | 7 - .../Extensions/HttpClientExtensions.cs | 35 - .../Extensions/OneOfExtensions.cs | 10 - .../Abstractions/Extensions/PipeExtensions.cs | 22 - .../Extensions/StringExtensions.cs | 151 - .../_common/Abstractions/Helpers/LogSetup.cs | 35 - .../Helpers/StandardConversions.cs | 7 - src/EllieBot/_common/Abstractions/Kwum.cs | 100 - .../Abstractions/PubSub/EventPubSub.cs | 80 - .../_common/Abstractions/PubSub/IPubSub.cs | 10 - .../_common/Abstractions/PubSub/ISeria.cs | 7 - .../_common/Abstractions/QueueRunner.cs | 61 - src/EllieBot/_common/Abstractions/TypedKey.cs | 30 - .../_common/Abstractions/YamlHelper.cs | 48 - .../Abstractions/creds/IBotCredentials.cs | 79 - .../Abstractions/creds/IBotCredsProvider.cs | 8 - .../Abstractions/strings/CommandStrings.cs | 35 - .../Abstractions/strings/IBotStrings.cs | 16 - .../strings/IBotStringsExtensions.cs | 17 - .../strings/IBotStringsProvider.cs | 28 - .../Abstractions/strings/IStringsSource.cs | 16 - .../_common/Abstractions/strings/LocStr.cs | 13 - src/EllieBot/_common/AddRemove.cs | 10 - .../_common/Attributes/AliasesAttribute.cs | 12 - .../_common/Attributes/CmdAttribute.cs | 18 - .../_common/Attributes/DIIgnoreAttribute.cs | 11 - .../Attributes/EllieOptionsAttribute.cs | 7 - .../Attributes/NoPublicBotAttribute.cs | 18 - .../Attributes/OnlyPublicBotAttribute.cs | 21 - .../_common/Attributes/OwnerOnlyAttribute.cs | 19 - .../_common/Attributes/RatelimitAttribute.cs | 37 - .../_common/Attributes/UserPermAttribute.cs | 29 - src/EllieBot/_common/BotCommandTypeReader.cs | 30 - src/EllieBot/_common/CleanupModuleBase.cs | 25 - src/EllieBot/_common/CleverBotResponseStr.cs | 10 - src/EllieBot/_common/CmdStrings.cs | 17 - src/EllieBot/_common/CommandData.cs | 9 - src/EllieBot/_common/CommandNameLoadHelper.cs | 40 - src/EllieBot/_common/Configs/BotConfig.cs | 196 - src/EllieBot/_common/Configs/IConfigSeria.cs | 18 - src/EllieBot/_common/Creds.cs | 284 -- src/EllieBot/_common/DbService.cs | 15 - src/EllieBot/_common/DoAsUserMessage.cs | 215 - src/EllieBot/_common/DownloadTracker.cs | 38 - src/EllieBot/_common/DryIocExtensions.cs | 43 - src/EllieBot/_common/EllieModule.cs | 108 - src/EllieBot/_common/EllieTypeReader.cs | 14 - src/EllieBot/_common/Helpers.cs | 13 - src/EllieBot/_common/IBot.cs | 12 - src/EllieBot/_common/ICloneable.cs | 8 - src/EllieBot/_common/ICurrencyProvider.cs | 29 - .../_common/IDiscordPermOverrideService.cs | 7 - src/EllieBot/_common/IEllieCommandOptions.cs | 7 - src/EllieBot/_common/ILogCommandService.cs | 34 - src/EllieBot/_common/IPermissionChecker.cs | 37 - src/EllieBot/_common/IPlaceholderProvider.cs | 7 - src/EllieBot/_common/ImageUrls.cs | 36 - .../_common/Interaction/EllieInteraction.cs | 174 - .../Interaction/EllieInteractionService.cs | 82 - .../Interaction/IEllieInteractionService.cs | 32 - .../_common/Interaction/InteractionHelpers.cs | 7 - .../Models/EllieButtonInteraction.cs | 22 - .../Models/EllieInteractionExtensions.cs | 15 - .../Models/EllieSelectInteraction.cs | 21 - .../JsonConverters/CultureInfoConverter.cs | 14 - .../JsonConverters/NumberToStringConverter.cs | 30 - .../_common/JsonConverters/Rgba32Converter.cs | 14 - src/EllieBot/_common/LbOpts.cs | 14 - src/EllieBot/_common/Linq2DbExpressions.cs | 17 - src/EllieBot/_common/LoginErrorHandler.cs | 52 - src/EllieBot/_common/MessageType.cs | 8 - .../_common/ModuleBehaviors/IBehavior.cs | 6 - .../_common/ModuleBehaviors/IExecNoCommand.cs | 19 - .../_common/ModuleBehaviors/IExecOnMessage.cs | 21 - .../ModuleBehaviors/IExecPostCommand.cs | 22 - .../ModuleBehaviors/IExecPreCommand.cs | 25 - .../ModuleBehaviors/IInputTransformer.cs | 25 - .../_common/ModuleBehaviors/IReadyExecutor.cs | 13 - src/EllieBot/_common/OptionsParser.cs | 23 - .../_common/Patronage/FeatureLimitKey.cs | 14 - src/EllieBot/_common/Patronage/IPatronData.cs | 11 - .../_common/Patronage/IPatronageService.cs | 42 - .../_common/Patronage/ISubscriptionHandler.cs | 16 - src/EllieBot/_common/Patronage/Patron.cs | 38 - .../_common/Patronage/PatronConfigData.cs | 17 - .../_common/Patronage/PatronExtensions.cs | 30 - src/EllieBot/_common/Patronage/PatronTier.cs | 14 - src/EllieBot/_common/Patronage/QuotaLimit.cs | 23 - src/EllieBot/_common/Patronage/QuotaPer.cs | 9 - .../Patronage/SubscriptionChargeStatus.cs | 10 - src/EllieBot/_common/Pokemon/PokemonNameId.cs | 8 - src/EllieBot/_common/Pokemon/SearchPokemon.cs | 41 - .../_common/Pokemon/SearchPokemonAbility.cs | 10 - .../Replacements/IReplacementPatternStore.cs | 20 - .../Replacements/IReplacementService.cs | 7 - .../Replacements/Impl/ReplacementContext.cs | 69 - .../Replacements/Impl/ReplacementInfo.cs | 57 - .../Impl/ReplacementPatternStore.cs | 130 - .../Impl/ReplacementRegistrator.default.cs | 125 - .../Replacements/Impl/ReplacementService.cs | 137 - .../_common/Replacements/Impl/Replacer.cs | 141 - ...RequireObjectPropertiesContractResolver.cs | 15 - .../_common/Sender/IMessageSenderService.cs | 12 - .../_common/Sender/MessageSenderService.cs | 56 - .../ResponseBuilder.PaginationSender.cs | 167 - .../_common/Sender/ResponseBuilder.cs | 490 --- .../Sender/ResponseBuilderExtensions.cs | 28 - .../_common/Sender/ResponseMessageModel.cs | 12 - .../_common/ServiceCollectionExtensions.cs | 133 - .../_common/Services/CommandHandler.cs | 432 -- .../Services/Currency/CurrencyService.cs | 115 - .../Currency/CurrencyServiceExtensions.cs | 48 - .../Services/Currency/DefaultWallet.cs | 108 - .../Services/Currency/GamblingTxTracker.cs | 110 - .../_common/Services/IBehaviourHandler.cs | 17 - .../_common/Services/ICommandHandler.cs | 12 - src/EllieBot/_common/Services/ICoordinator.cs | 20 - .../_common/Services/ICustomBehavior.cs | 13 - src/EllieBot/_common/Services/IEService.cs | 9 - .../_common/Services/IGoogleApiService.cs | 18 - .../_common/Services/ILocalDataCache.cs | 13 - .../_common/Services/ILocalization.cs | 19 - .../_common/Services/IRemindService.cs | 15 - .../_common/Services/IStatsService.cs | 70 - .../_common/Services/ITimezoneService.cs | 6 - .../_common/Services/Impl/BehaviorExecutor.cs | 302 -- .../_common/Services/Impl/BlacklistService.cs | 141 - .../Services/Impl/CommandsUtilityService.cs | 184 - .../Impl/DiscordPermOverrideService.cs | 136 - .../_common/Services/Impl/FontProvider.cs | 54 - .../_common/Services/Impl/IImageCache.cs | 13 - .../_common/Services/Impl/ImagesConfig.cs | 31 - .../Services/Impl/RedisImageExtensions.cs | 11 - .../Services/Impl/SingleProcessCoordinator.cs | 58 - .../Impl/StartingGuildsListService.cs | 18 - .../_common/Services/Impl/StatsService.cs | 206 - .../_common/Services/Impl/YtdlOperation.cs | 77 - .../Services/strings/impl/BotStrings.cs | 102 - .../strings/impl/LocalFileStringsSource.cs | 73 - .../strings/impl/MemoryBotStringsProvider.cs | 38 - .../_common/Settings/BotConfigService.cs | 79 - .../_common/Settings/ConfigParsers.cs | 50 - .../_common/Settings/ConfigServiceBase.cs | 201 - .../_common/Settings/IConfigService.cs | 46 - .../_common/Settings/SettingParser.cs | 8 - .../_common/SmartText/SmartEmbedText.cs | 184 - .../_common/SmartText/SmartEmbedTextArray.cs | 34 - .../_common/SmartText/SmartPlainText.cs | 19 - src/EllieBot/_common/SmartText/SmartText.cs | 92 - .../_common/SmartText/SmartTextEmbedAuthor.cs | 16 - .../_common/SmartText/SmartTextEmbedField.cs | 9 - .../_common/SmartText/SmartTextEmbedFooter.cs | 14 - src/EllieBot/_common/TriviaQuestionModel.cs | 11 - src/EllieBot/_common/TypeReaderResult.cs | 30 - .../_common/TypeReaders/CommandOrExprInfo.cs | 23 - .../_common/TypeReaders/EmoteTypeReader.cs | 13 - .../TypeReaders/GuildDateTimeTypeReader.cs | 49 - .../_common/TypeReaders/GuildTypeReader.cs | 24 - .../TypeReaders/GuildUserTypeReader.cs | 33 - .../_common/TypeReaders/KwumTypeReader.cs | 19 - .../TypeReaders/Models/PermissionAction.cs | 27 - .../_common/TypeReaders/Models/StoopidTime.cs | 55 - .../_common/TypeReaders/ModuleTypeReader.cs | 52 - .../TypeReaders/PermissionActionTypeReader.cs | 39 - .../_common/TypeReaders/Rgba32TypeReader.cs | 20 - .../TypeReaders/StoopidTimeTypeReader.cs | 22 - src/EllieBot/_common/Yml/CommentAttribute.cs | 11 - .../Yml/CommentGatheringTypeInspector.cs | 65 - .../_common/Yml/CommentsObjectDescriptor.cs | 30 - .../_common/Yml/CommentsObjectGraphVisitor.cs | 29 - .../Yml/MultilineScalarFlowStyleEmitter.cs | 35 - src/EllieBot/_common/Yml/Rgba32Converter.cs | 47 - src/EllieBot/_common/Yml/UriConverter.cs | 25 - src/EllieBot/_common/Yml/Yaml.cs | 30 - .../_Extensions/BotCredentialsExtensions.cs | 10 - .../_Extensions/CommandContextExtensions.cs | 40 - .../_common/_Extensions/DbExtensions.cs | 10 - .../_common/_Extensions/Extensions.cs | 231 - .../_Extensions/ImagesharpExtensions.cs | 97 - .../_Extensions/LinkedListExtensions.cs | 18 - .../_common/_Extensions/NumberExtensions.cs | 30 - .../_Extensions/ReflectionExtensions.cs | 23 - .../_common/_Extensions/Rgba32Extensions.cs | 57 - .../SocketMessageComponentExtensions.cs | 33 - .../_common/_Extensions/UserExtensions.cs | 21 - 858 files changed, 266344 deletions(-) delete mode 100644 src/EllieBot/Db/EllieContext.cs delete mode 100644 src/EllieBot/Db/EllieDbService.cs delete mode 100644 src/EllieBot/Db/Extensions/ClubExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/CurrencyTransactionExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/DbExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/DiscordUserExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/EllieExpressionExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/GuildConfigExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/ReminderExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/SelfAssignableRolesExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/UserXpExtensions.cs delete mode 100644 src/EllieBot/Db/Extensions/WarningExtensions.cs delete mode 100644 src/EllieBot/Db/Helpers/ActivityType.cs delete mode 100644 src/EllieBot/Db/Helpers/GuildPerm.cs delete mode 100644 src/EllieBot/Db/LevelStats.cs delete mode 100644 src/EllieBot/Db/Models/AutoCommand.cs delete mode 100644 src/EllieBot/Db/Models/AutoPublishChannel.cs delete mode 100644 src/EllieBot/Db/Models/AutoTranslateChannel.cs delete mode 100644 src/EllieBot/Db/Models/AutoTranslateUser.cs delete mode 100644 src/EllieBot/Db/Models/BlacklistEntry.cs delete mode 100644 src/EllieBot/Db/Models/CommandAlias.cs delete mode 100644 src/EllieBot/Db/Models/CommandCooldown.cs delete mode 100644 src/EllieBot/Db/Models/CurrencyTransaction.cs delete mode 100644 src/EllieBot/Db/Models/DbEntity.cs delete mode 100644 src/EllieBot/Db/Models/DelMsgOnCmdChannel.cs delete mode 100644 src/EllieBot/Db/Models/DiscordPemOverride.cs delete mode 100644 src/EllieBot/Db/Models/DiscordUser.cs delete mode 100644 src/EllieBot/Db/Models/Event.cs delete mode 100644 src/EllieBot/Db/Models/FeedSub.cs delete mode 100644 src/EllieBot/Db/Models/FollowedStream.cs delete mode 100644 src/EllieBot/Db/Models/GCChannelId.cs delete mode 100644 src/EllieBot/Db/Models/GamblingStats.cs delete mode 100644 src/EllieBot/Db/Models/GroupName.cs delete mode 100644 src/EllieBot/Db/Models/GuildColors.cs delete mode 100644 src/EllieBot/Db/Models/GuildConfig.cs delete mode 100644 src/EllieBot/Db/Models/HoneypotChannel.cs delete mode 100644 src/EllieBot/Db/Models/IgnoredLogItem.cs delete mode 100644 src/EllieBot/Db/Models/ImageOnlyChannel.cs delete mode 100644 src/EllieBot/Db/Models/LogSetting.cs delete mode 100644 src/EllieBot/Db/Models/Permission.cs delete mode 100644 src/EllieBot/Db/Models/PlantedCurrency.cs delete mode 100644 src/EllieBot/Db/Models/PlaylistSong.cs delete mode 100644 src/EllieBot/Db/Models/Reminder.cs delete mode 100644 src/EllieBot/Db/Models/Repeater.cs delete mode 100644 src/EllieBot/Db/Models/RotatingPlayingStatus.cs delete mode 100644 src/EllieBot/Db/Models/ShopEntry.cs delete mode 100644 src/EllieBot/Db/Models/StreamOnlineMessage.cs delete mode 100644 src/EllieBot/Db/Models/StreamRoleSettings.cs delete mode 100644 src/EllieBot/Db/Models/VcRoleInfo.cs delete mode 100644 src/EllieBot/Db/Models/Waifu.cs delete mode 100644 src/EllieBot/Db/Models/anti/AntiAltSetting.cs delete mode 100644 src/EllieBot/Db/Models/anti/AntiRaidSetting.cs delete mode 100644 src/EllieBot/Db/Models/anti/AntiSpamIgnore.cs delete mode 100644 src/EllieBot/Db/Models/anti/AntiSpamSetting.cs delete mode 100644 src/EllieBot/Db/Models/club/ClubInfo.cs delete mode 100644 src/EllieBot/Db/Models/currency/BankUser.cs delete mode 100644 src/EllieBot/Db/Models/expr/EllieExpression.cs delete mode 100644 src/EllieBot/Db/Models/expr/Quote.cs delete mode 100644 src/EllieBot/Db/Models/filter/FilterChannelId.cs delete mode 100644 src/EllieBot/Db/Models/filter/FilterLinksChannelId.cs delete mode 100644 src/EllieBot/Db/Models/filter/FilterWordsChannelId.cs delete mode 100644 src/EllieBot/Db/Models/filter/FilteredWord.cs delete mode 100644 src/EllieBot/Db/Models/giveaway/GiveawayModel.cs delete mode 100644 src/EllieBot/Db/Models/giveaway/GiveawayUser.cs delete mode 100644 src/EllieBot/Db/Models/punish/BanTemplate.cs delete mode 100644 src/EllieBot/Db/Models/punish/MutedUserId.cs delete mode 100644 src/EllieBot/Db/Models/punish/PunishmentAction.cs delete mode 100644 src/EllieBot/Db/Models/punish/WarnExpireAction.cs delete mode 100644 src/EllieBot/Db/Models/punish/Warning.cs delete mode 100644 src/EllieBot/Db/Models/punish/WarningPunishment.cs delete mode 100644 src/EllieBot/Db/Models/roles/ReactionRole.cs delete mode 100644 src/EllieBot/Db/Models/roles/SelfAssignableRole.cs delete mode 100644 src/EllieBot/Db/Models/roles/StickyRoles.cs delete mode 100644 src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredRole.cs delete mode 100644 src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredUser.cs delete mode 100644 src/EllieBot/Db/Models/support/PatronQuota.cs delete mode 100644 src/EllieBot/Db/Models/support/RewardedUser.cs delete mode 100644 src/EllieBot/Db/Models/todo/ArchivedTodoListModel.cs delete mode 100644 src/EllieBot/Db/Models/todo/TodoModel.cs delete mode 100644 src/EllieBot/Db/Models/untimer/UnbanTimer.cs delete mode 100644 src/EllieBot/Db/Models/untimer/UnmuteTimer.cs delete mode 100644 src/EllieBot/Db/Models/untimer/UnroleTimer.cs delete mode 100644 src/EllieBot/Db/Models/xp/UserXpStats.cs delete mode 100644 src/EllieBot/Db/Models/xp/XpNotificationLocation.cs delete mode 100644 src/EllieBot/Db/Models/xp/XpSettings.cs delete mode 100644 src/EllieBot/Db/PostgreSqlContext.cs delete mode 100644 src/EllieBot/Db/SqliteContext.cs delete mode 100644 src/EllieBot/Migrations/MigrationQueries.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220429044808_bank.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs delete mode 100644 src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210621042359_squash.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220427200557_stondel.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220427200557_stondel.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220428051304_bank.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220831142504_banprune.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220831142504_banprune.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220916191702_autopub.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240502233144_v5.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs delete mode 100644 src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs delete mode 100644 src/EllieBot/Modules/Administration/Administration.cs delete mode 100644 src/EllieBot/Modules/Administration/AdministrationService.cs delete mode 100644 src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs delete mode 100644 src/EllieBot/Modules/Administration/AutoPublishService.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommandsService.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/_common/CleanupId.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepReport.cs delete mode 100644 src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepResult.cs delete mode 100644 src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs delete mode 100644 src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/GreetBye/GreetService.cs delete mode 100644 src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs delete mode 100644 src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs delete mode 100644 src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs delete mode 100644 src/EllieBot/Modules/Administration/ImageOnlyChannelService.cs delete mode 100644 src/EllieBot/Modules/Administration/LocalizationCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Mute/MuteCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Mute/MuteService.cs delete mode 100644 src/EllieBot/Modules/Administration/PermOverrides/DiscordPermOverrideCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs delete mode 100644 src/EllieBot/Modules/Administration/Prefix/PrefixCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Protection/ProtectionCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Protection/ProtectionService.cs delete mode 100644 src/EllieBot/Modules/Administration/Protection/ProtectionStats.cs delete mode 100644 src/EllieBot/Modules/Administration/Protection/PunishQueueItem.cs delete mode 100644 src/EllieBot/Modules/Administration/Protection/UserSpamStats.cs delete mode 100644 src/EllieBot/Modules/Administration/Prune/PruneCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Prune/PruneResult.cs delete mode 100644 src/EllieBot/Modules/Administration/Prune/PruneService.cs delete mode 100644 src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs delete mode 100644 src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs delete mode 100644 src/EllieBot/Modules/Administration/Role/RoleCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Role/StickyRolesService.cs delete mode 100644 src/EllieBot/Modules/Administration/Self/CheckForUpdatesService.cs delete mode 100644 src/EllieBot/Modules/Administration/Self/SelfCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Self/SelfService.cs delete mode 100644 src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs delete mode 100644 src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs delete mode 100644 src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs delete mode 100644 src/EllieBot/Modules/Administration/ServerLog/ServerLogCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs delete mode 100644 src/EllieBot/Modules/Administration/Timezone/TimeZoneCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs delete mode 100644 src/EllieBot/Modules/Administration/VcRole/VcRoleCommands.cs delete mode 100644 src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs delete mode 100644 src/EllieBot/Modules/Administration/_common/SetServerBannerResult.cs delete mode 100644 src/EllieBot/Modules/Administration/_common/SetServerIconResult.cs delete mode 100644 src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs delete mode 100644 src/EllieBot/Modules/Expressions/EllieExpressions.cs delete mode 100644 src/EllieBot/Modules/Expressions/EllieExpressionsService.cs delete mode 100644 src/EllieBot/Modules/Expressions/ExportedExpr.cs delete mode 100644 src/EllieBot/Modules/Expressions/ExprField.cs delete mode 100644 src/EllieBot/Modules/Expressions/TypeReaders/CommandOrExprTypeReader.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs delete mode 100644 src/EllieBot/Modules/Gambling/AnimalRacing/RaceOptions.cs delete mode 100644 src/EllieBot/Modules/Gambling/Bank/BankCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Bank/BankService.cs delete mode 100644 src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/BlackJack/BlackJackService.cs delete mode 100644 src/EllieBot/Modules/Gambling/BlackJack/Blackjack.cs delete mode 100644 src/EllieBot/Modules/Gambling/BlackJack/Player.cs delete mode 100644 src/EllieBot/Modules/Gambling/Connect4/Connect4.cs delete mode 100644 src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs delete mode 100644 src/EllieBot/Modules/Gambling/CurrencyProvider.cs delete mode 100644 src/EllieBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/EconomyResult.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/CurrencyEventsService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/EventOptions.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/ICurrencyEvent.cs delete mode 100644 src/EllieBot/Modules/Gambling/Events/ReactionEvent.cs delete mode 100644 src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/FlipCoin/FlipResult.cs delete mode 100644 src/EllieBot/Modules/Gambling/Gambling.cs delete mode 100644 src/EllieBot/Modules/Gambling/GamblingConfig.cs delete mode 100644 src/EllieBot/Modules/Gambling/GamblingConfigService.cs delete mode 100644 src/EllieBot/Modules/Gambling/GamblingService.cs delete mode 100644 src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs delete mode 100644 src/EllieBot/Modules/Gambling/InputRpsPick.cs delete mode 100644 src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Shop/IShopService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Shop/ShopService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/VoteRewardService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/AffinityTitle.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/ClaimTitle.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/DivorceResult.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/Extensions.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/_common/WaifuClaimResult.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/Waifu.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuInfoStats.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdate.cs delete mode 100644 src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdateType.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/Decks/QuadDeck.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/GamblingCleanupService.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/IGamblingCleanupService.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/IGamblingService.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/RollDuelGame.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartBankInputAmountReader.cs delete mode 100644 src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartNumberTypeReader.cs delete mode 100644 src/EllieBot/Modules/Games/Acrophobia/Acrophobia.cs delete mode 100644 src/EllieBot/Modules/Games/Acrophobia/AcrophobiaUser.cs delete mode 100644 src/EllieBot/Modules/Games/Acrophobia/AcropobiaCommands.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/CleverbotResponse.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/IChatterBotSession.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OfficialCleverbotSession.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs delete mode 100644 src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs delete mode 100644 src/EllieBot/Modules/Games/Games.cs delete mode 100644 src/EllieBot/Modules/Games/GamesConfig.cs delete mode 100644 src/EllieBot/Modules/Games/GamesConfigService.cs delete mode 100644 src/EllieBot/Modules/Games/GamesService.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/DefaultHangmanSource.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/HangmanCommands.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/HangmanGame.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/HangmanService.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/HangmanTerm.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/IHangmanService.cs delete mode 100644 src/EllieBot/Modules/Games/Hangman/IHangmanSource.cs delete mode 100644 src/EllieBot/Modules/Games/Nunchi/Nunchi.cs delete mode 100644 src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs delete mode 100644 src/EllieBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs delete mode 100644 src/EllieBot/Modules/Games/SpeedTyping/TypingArticle.cs delete mode 100644 src/EllieBot/Modules/Games/SpeedTyping/TypingGame.cs delete mode 100644 src/EllieBot/Modules/Games/TicTacToe/TicTacToe.cs delete mode 100644 src/EllieBot/Modules/Games/TicTacToe/TicTacToeCommands.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaGame.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaGamesService.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaOptions.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaQuestion.cs delete mode 100644 src/EllieBot/Modules/Games/Trivia/TriviaUser.cs delete mode 100644 src/EllieBot/Modules/Help/CommandJsonObject.cs delete mode 100644 src/EllieBot/Modules/Help/CommandsOptions.cs delete mode 100644 src/EllieBot/Modules/Help/Help.cs delete mode 100644 src/EllieBot/Modules/Help/HelpService.cs delete mode 100644 src/EllieBot/Modules/Marmalades/IMarmaladesRepositoryService.cs delete mode 100644 src/EllieBot/Modules/Marmalades/Marmalade.cs delete mode 100644 src/EllieBot/Modules/Marmalades/MarmaladeItem.cs delete mode 100644 src/EllieBot/Modules/Marmalades/MarmaladesRepositoryService.cs delete mode 100644 src/EllieBot/Modules/Music/Music.cs delete mode 100644 src/EllieBot/Modules/Music/PlaylistCommands.cs delete mode 100644 src/EllieBot/Modules/Music/Services/AyuVoiceStateService.cs delete mode 100644 src/EllieBot/Modules/Music/Services/IMusicService.cs delete mode 100644 src/EllieBot/Modules/Music/Services/MusicService.cs delete mode 100644 src/EllieBot/Modules/Music/Services/extractor/Misc.cs delete mode 100644 src/EllieBot/Modules/Music/Services/extractor/YtLoader.cs delete mode 100644 src/EllieBot/Modules/Music/_common/ICachableTrackData.cs delete mode 100644 src/EllieBot/Modules/Music/_common/ILocalTrackResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IMusicPlayer.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IMusicQueue.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IPlatformQueryResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IQueuedTrackInfo.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IRadioResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/ITrackCacher.cs delete mode 100644 src/EllieBot/Modules/Music/_common/ITrackInfo.cs delete mode 100644 src/EllieBot/Modules/Music/_common/ITrackResolveProvider.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IVoiceProxy.cs delete mode 100644 src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/CachableTrackData.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/MultimediaTimer.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/MusicExtensions.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/MusicPlatform.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/TrackCacher.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Impl/VoiceProxy.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/LocalTrackResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs delete mode 100644 src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs delete mode 100644 src/EllieBot/Modules/Music/_common/db/MusicPlayerSettingsExtensions.cs delete mode 100644 src/EllieBot/Modules/Music/_common/db/MusicPlaylist.cs delete mode 100644 src/EllieBot/Modules/Music/_common/db/MusicPlaylistExtensions.cs delete mode 100644 src/EllieBot/Modules/Music/_common/db/MusicSettings.cs delete mode 100644 src/EllieBot/Modules/Patronage/Config/PatronageConfig.cs delete mode 100644 src/EllieBot/Modules/Patronage/CurrencyRewardService.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonClient.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonCredentials.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonData.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonMemberData.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonRefreshData.cs delete mode 100644 src/EllieBot/Modules/Patronage/Patreon/PatreonSubscriptionHandler.cs delete mode 100644 src/EllieBot/Modules/Patronage/PatronageCommands.cs delete mode 100644 src/EllieBot/Modules/Patronage/PatronageService.cs delete mode 100644 src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs delete mode 100644 src/EllieBot/Modules/Permissions/CommandCooldown/CleverbotResponseCmdCdTypeReader.cs delete mode 100644 src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs delete mode 100644 src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs delete mode 100644 src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs delete mode 100644 src/EllieBot/Modules/Permissions/Filter/FilterService.cs delete mode 100644 src/EllieBot/Modules/Permissions/Filter/ServerFilterSettings.cs delete mode 100644 src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionCommands.cs delete mode 100644 src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs delete mode 100644 src/EllieBot/Modules/Permissions/PermissionCache.cs delete mode 100644 src/EllieBot/Modules/Permissions/PermissionExtensions.cs delete mode 100644 src/EllieBot/Modules/Permissions/Permissions.cs delete mode 100644 src/EllieBot/Modules/Permissions/PermissionsCollection.cs delete mode 100644 src/EllieBot/Modules/Permissions/PermissionsService.cs delete mode 100644 src/EllieBot/Modules/Permissions/ResetPermissionsCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Anime/AnimeResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Anime/AnimeSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Anime/MangaResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/CryptoService.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/Drawing/CandleDrawingData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/Drawing/IStockChartDrawingService.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/IStockDataService.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/CandleData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/ImageData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/QuoteResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/StockData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/SymbolData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceCandleData.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponseItem.cs delete mode 100644 src/EllieBot/Modules/Searches/Crypto/_common/YahooQueryModel.cs delete mode 100644 src/EllieBot/Modules/Searches/Feeds/FeedCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Feeds/FeedsService.cs delete mode 100644 src/EllieBot/Modules/Searches/JokeCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Osu/OsuCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Osu/OsuService.cs delete mode 100644 src/EllieBot/Modules/Searches/PokemonSearchCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs delete mode 100644 src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleCustomSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleImageData.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleImageResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleImageResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleSearchResultInformation.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/GoogleSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Google/OfficialGoogleSearchResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/GoogleScrape/GoogleScrapeService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainGoogleScrapeSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultInfo.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/IImageSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/ISearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/ISearchResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/ISearchResultInformation.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/ISearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/ISearchServiceFactory.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/SearchCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/SearchServiceBase.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxInfobox.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxSearchAttribute.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultEntry.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultInformation.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Searx/SearxUrlData.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/VideoInfo.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs delete mode 100644 src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs delete mode 100644 src/EllieBot/Modules/Searches/Searches.cs delete mode 100644 src/EllieBot/Modules/Searches/SearchesService.cs delete mode 100644 src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs delete mode 100644 src/EllieBot/Modules/Searches/StreamNotification/StreamOnlineMessageDeleterService.cs delete mode 100644 src/EllieBot/Modules/Searches/Translate/ITranslateService.cs delete mode 100644 src/EllieBot/Modules/Searches/Translate/TranslateService.cs delete mode 100644 src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/XkcdCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/YoutubeTrack/YtTrackService.cs delete mode 100644 src/EllieBot/Modules/Searches/YoutubeTrack/YtUploadCommands.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/AtlExtensions.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Config/ImgSearchEngine.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Config/WebSearchEngine.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/CryptoData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/DefineData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/DefineModel.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/E621Object.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/ErrorType.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Exceptions/StreamNotFoundException.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Extensions.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/Gallery.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/GoogleSearchResult.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/HearthstoneCardData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/LowerCaseNamingPolicy.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/MagicItem.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/MtgData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/NovelData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/OmdbMovie.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/OsuMapData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/OsuUserBets.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/OsuUserData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/PathOfExileModels.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/ShortenData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/SteamGameId.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/HelixStreamsResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/HelixUsersResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/PicartoChannelResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/StreamData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/StreamDataKey.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/TrovoGetUsersResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/TrovoRequestData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/TrovoSocialLink.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/TwitchResponseV5.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Models/TwitchUsersResponseV5.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/NotifChecker.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/PicartoProvider.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/Provider.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TrovoProvider.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TwitchHelixProvider.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/TimeData.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/TimeModels.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/UrbanDef.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/WeatherModels.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/WikiaResponse.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/WikipediaApiModel.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/WikipediaReply.cs delete mode 100644 src/EllieBot/Modules/Searches/_common/WoWJoke.cs delete mode 100644 src/EllieBot/Modules/Utility/AfkService.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/AiCommandModel.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/AiCommandParamModel.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/CommandPromptResultModel.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/EllieCommandCallModel.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/IAiAssistantService.cs delete mode 100644 src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Alias/AliasCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Alias/AliasService.cs delete mode 100644 src/EllieBot/Modules/Utility/Calc/CalcCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/ConfigCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Giveaway/GiveawayCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs delete mode 100644 src/EllieBot/Modules/Utility/GuildColors.cs delete mode 100644 src/EllieBot/Modules/Utility/Info/InfoCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Invite/InviteCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Invite/InviteService.cs delete mode 100644 src/EllieBot/Modules/Utility/Quote/IQuoteService.cs delete mode 100644 src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Quote/QuoteService.cs delete mode 100644 src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs delete mode 100644 src/EllieBot/Modules/Utility/Remind/RemindCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Remind/RemindService.cs delete mode 100644 src/EllieBot/Modules/Utility/Repeater/RepeatCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs delete mode 100644 src/EllieBot/Modules/Utility/Repeater/RunningRepeater.cs delete mode 100644 src/EllieBot/Modules/Utility/StreamRole/StreamRoleCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs delete mode 100644 src/EllieBot/Modules/Utility/Todo/ArchiveTodoResult.cs delete mode 100644 src/EllieBot/Modules/Utility/Todo/TodoAddResult.cs delete mode 100644 src/EllieBot/Modules/Utility/Todo/TodoCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Todo/TodoService.cs delete mode 100644 src/EllieBot/Modules/Utility/UnitConversion/ConverterService.cs delete mode 100644 src/EllieBot/Modules/Utility/UnitConversion/UnitConversionCommands.cs delete mode 100644 src/EllieBot/Modules/Utility/Utility.cs delete mode 100644 src/EllieBot/Modules/Utility/VerboseErrorsService.cs delete mode 100644 src/EllieBot/Modules/Utility/_common/ConvertUnit.cs delete mode 100644 src/EllieBot/Modules/Utility/_common/EvalGlobals.cs delete mode 100644 src/EllieBot/Modules/Utility/_common/Exceptions/StreamRoleNotFoundException.cs delete mode 100644 src/EllieBot/Modules/Utility/_common/Exceptions/StreamRolePermissionException.cs delete mode 100644 src/EllieBot/Modules/Utility/_common/StreamRoleListType.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Club.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/ClubService.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/IClubService.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubAcceptResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubBanResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubCreateResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubKickResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubLeaveResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubRenameResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubTransferError.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ClubUnbanResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/SetClubIconResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Club/Results/ToggleAdminResult.cs delete mode 100644 src/EllieBot/Modules/Xp/Xp.cs delete mode 100644 src/EllieBot/Modules/Xp/XpConfig.cs delete mode 100644 src/EllieBot/Modules/Xp/XpConfigService.cs delete mode 100644 src/EllieBot/Modules/Xp/XpRewards.cs delete mode 100644 src/EllieBot/Modules/Xp/XpService.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/FullUserStats.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/IXpCleanupService.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/UserCacheItem.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/XpCleanupService.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/XpTemplate.cs delete mode 100644 src/EllieBot/Modules/Xp/_common/db/XpShopOwnedItem.cs delete mode 100644 src/EllieBot/Services/Impl/BotCredsProvider.cs delete mode 100644 src/EllieBot/Services/Impl/GoogleApiService.cs delete mode 100644 src/EllieBot/Services/Impl/GoogleApiService_SupportedLanguages.cs delete mode 100644 src/EllieBot/Services/Impl/ImageCache.cs delete mode 100644 src/EllieBot/Services/Impl/LocalDataCache.cs delete mode 100644 src/EllieBot/Services/Impl/Localization.cs delete mode 100644 src/EllieBot/Services/Impl/PubSub/JsonSeria.cs delete mode 100644 src/EllieBot/Services/Impl/PubSub/RedisPubSub.cs delete mode 100644 src/EllieBot/Services/Impl/PubSub/YamlSeria.cs delete mode 100644 src/EllieBot/Services/Impl/RedisBotCache.cs delete mode 100644 src/EllieBot/Services/Impl/RedisBotStringsProvider.cs delete mode 100644 src/EllieBot/Services/Impl/RemoteGrpcCoordinator.cs delete mode 100644 src/EllieBot/_common/Abstractions/AsyncLazy.cs delete mode 100644 src/EllieBot/_common/Abstractions/Cache/BotCacheExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Cache/IBotCache.cs delete mode 100644 src/EllieBot/_common/Abstractions/Cache/MemoryBotCache.cs delete mode 100644 src/EllieBot/_common/Abstractions/Collections/ConcurrentHashSet.cs delete mode 100644 src/EllieBot/_common/Abstractions/Collections/IndexedCollection.cs delete mode 100644 src/EllieBot/_common/Abstractions/EllieRandom.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/ArrayExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/Extensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/HttpClientExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/OneOfExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/PipeExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Helpers/LogSetup.cs delete mode 100644 src/EllieBot/_common/Abstractions/Helpers/StandardConversions.cs delete mode 100644 src/EllieBot/_common/Abstractions/Kwum.cs delete mode 100644 src/EllieBot/_common/Abstractions/PubSub/EventPubSub.cs delete mode 100644 src/EllieBot/_common/Abstractions/PubSub/IPubSub.cs delete mode 100644 src/EllieBot/_common/Abstractions/PubSub/ISeria.cs delete mode 100644 src/EllieBot/_common/Abstractions/QueueRunner.cs delete mode 100644 src/EllieBot/_common/Abstractions/TypedKey.cs delete mode 100644 src/EllieBot/_common/Abstractions/YamlHelper.cs delete mode 100644 src/EllieBot/_common/Abstractions/creds/IBotCredentials.cs delete mode 100644 src/EllieBot/_common/Abstractions/creds/IBotCredsProvider.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/CommandStrings.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/IBotStrings.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/IBotStringsExtensions.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/IBotStringsProvider.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/IStringsSource.cs delete mode 100644 src/EllieBot/_common/Abstractions/strings/LocStr.cs delete mode 100644 src/EllieBot/_common/AddRemove.cs delete mode 100644 src/EllieBot/_common/Attributes/AliasesAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/CmdAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/DIIgnoreAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/EllieOptionsAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/OnlyPublicBotAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/OwnerOnlyAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/RatelimitAttribute.cs delete mode 100644 src/EllieBot/_common/Attributes/UserPermAttribute.cs delete mode 100644 src/EllieBot/_common/BotCommandTypeReader.cs delete mode 100644 src/EllieBot/_common/CleanupModuleBase.cs delete mode 100644 src/EllieBot/_common/CleverBotResponseStr.cs delete mode 100644 src/EllieBot/_common/CmdStrings.cs delete mode 100644 src/EllieBot/_common/CommandData.cs delete mode 100644 src/EllieBot/_common/CommandNameLoadHelper.cs delete mode 100644 src/EllieBot/_common/Configs/BotConfig.cs delete mode 100644 src/EllieBot/_common/Configs/IConfigSeria.cs delete mode 100644 src/EllieBot/_common/Creds.cs delete mode 100644 src/EllieBot/_common/DbService.cs delete mode 100644 src/EllieBot/_common/DoAsUserMessage.cs delete mode 100644 src/EllieBot/_common/DownloadTracker.cs delete mode 100644 src/EllieBot/_common/DryIocExtensions.cs delete mode 100644 src/EllieBot/_common/EllieModule.cs delete mode 100644 src/EllieBot/_common/EllieTypeReader.cs delete mode 100644 src/EllieBot/_common/Helpers.cs delete mode 100644 src/EllieBot/_common/IBot.cs delete mode 100644 src/EllieBot/_common/ICloneable.cs delete mode 100644 src/EllieBot/_common/ICurrencyProvider.cs delete mode 100644 src/EllieBot/_common/IDiscordPermOverrideService.cs delete mode 100644 src/EllieBot/_common/IEllieCommandOptions.cs delete mode 100644 src/EllieBot/_common/ILogCommandService.cs delete mode 100644 src/EllieBot/_common/IPermissionChecker.cs delete mode 100644 src/EllieBot/_common/IPlaceholderProvider.cs delete mode 100644 src/EllieBot/_common/ImageUrls.cs delete mode 100644 src/EllieBot/_common/Interaction/EllieInteraction.cs delete mode 100644 src/EllieBot/_common/Interaction/EllieInteractionService.cs delete mode 100644 src/EllieBot/_common/Interaction/IEllieInteractionService.cs delete mode 100644 src/EllieBot/_common/Interaction/InteractionHelpers.cs delete mode 100644 src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs delete mode 100644 src/EllieBot/_common/Interaction/Models/EllieInteractionExtensions.cs delete mode 100644 src/EllieBot/_common/Interaction/Models/EllieSelectInteraction.cs delete mode 100644 src/EllieBot/_common/JsonConverters/CultureInfoConverter.cs delete mode 100644 src/EllieBot/_common/JsonConverters/NumberToStringConverter.cs delete mode 100644 src/EllieBot/_common/JsonConverters/Rgba32Converter.cs delete mode 100644 src/EllieBot/_common/LbOpts.cs delete mode 100644 src/EllieBot/_common/Linq2DbExpressions.cs delete mode 100644 src/EllieBot/_common/LoginErrorHandler.cs delete mode 100644 src/EllieBot/_common/MessageType.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IBehavior.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IExecNoCommand.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IExecOnMessage.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IExecPostCommand.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IExecPreCommand.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IInputTransformer.cs delete mode 100644 src/EllieBot/_common/ModuleBehaviors/IReadyExecutor.cs delete mode 100644 src/EllieBot/_common/OptionsParser.cs delete mode 100644 src/EllieBot/_common/Patronage/FeatureLimitKey.cs delete mode 100644 src/EllieBot/_common/Patronage/IPatronData.cs delete mode 100644 src/EllieBot/_common/Patronage/IPatronageService.cs delete mode 100644 src/EllieBot/_common/Patronage/ISubscriptionHandler.cs delete mode 100644 src/EllieBot/_common/Patronage/Patron.cs delete mode 100644 src/EllieBot/_common/Patronage/PatronConfigData.cs delete mode 100644 src/EllieBot/_common/Patronage/PatronExtensions.cs delete mode 100644 src/EllieBot/_common/Patronage/PatronTier.cs delete mode 100644 src/EllieBot/_common/Patronage/QuotaLimit.cs delete mode 100644 src/EllieBot/_common/Patronage/QuotaPer.cs delete mode 100644 src/EllieBot/_common/Patronage/SubscriptionChargeStatus.cs delete mode 100644 src/EllieBot/_common/Pokemon/PokemonNameId.cs delete mode 100644 src/EllieBot/_common/Pokemon/SearchPokemon.cs delete mode 100644 src/EllieBot/_common/Pokemon/SearchPokemonAbility.cs delete mode 100644 src/EllieBot/_common/Replacements/IReplacementPatternStore.cs delete mode 100644 src/EllieBot/_common/Replacements/IReplacementService.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/ReplacementInfo.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/ReplacementPatternStore.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/ReplacementService.cs delete mode 100644 src/EllieBot/_common/Replacements/Impl/Replacer.cs delete mode 100644 src/EllieBot/_common/RequireObjectPropertiesContractResolver.cs delete mode 100644 src/EllieBot/_common/Sender/IMessageSenderService.cs delete mode 100644 src/EllieBot/_common/Sender/MessageSenderService.cs delete mode 100644 src/EllieBot/_common/Sender/ResponseBuilder.PaginationSender.cs delete mode 100644 src/EllieBot/_common/Sender/ResponseBuilder.cs delete mode 100644 src/EllieBot/_common/Sender/ResponseBuilderExtensions.cs delete mode 100644 src/EllieBot/_common/Sender/ResponseMessageModel.cs delete mode 100644 src/EllieBot/_common/ServiceCollectionExtensions.cs delete mode 100644 src/EllieBot/_common/Services/CommandHandler.cs delete mode 100644 src/EllieBot/_common/Services/Currency/CurrencyService.cs delete mode 100644 src/EllieBot/_common/Services/Currency/CurrencyServiceExtensions.cs delete mode 100644 src/EllieBot/_common/Services/Currency/DefaultWallet.cs delete mode 100644 src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs delete mode 100644 src/EllieBot/_common/Services/IBehaviourHandler.cs delete mode 100644 src/EllieBot/_common/Services/ICommandHandler.cs delete mode 100644 src/EllieBot/_common/Services/ICoordinator.cs delete mode 100644 src/EllieBot/_common/Services/ICustomBehavior.cs delete mode 100644 src/EllieBot/_common/Services/IEService.cs delete mode 100644 src/EllieBot/_common/Services/IGoogleApiService.cs delete mode 100644 src/EllieBot/_common/Services/ILocalDataCache.cs delete mode 100644 src/EllieBot/_common/Services/ILocalization.cs delete mode 100644 src/EllieBot/_common/Services/IRemindService.cs delete mode 100644 src/EllieBot/_common/Services/IStatsService.cs delete mode 100644 src/EllieBot/_common/Services/ITimezoneService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/BehaviorExecutor.cs delete mode 100644 src/EllieBot/_common/Services/Impl/BlacklistService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/CommandsUtilityService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/DiscordPermOverrideService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/FontProvider.cs delete mode 100644 src/EllieBot/_common/Services/Impl/IImageCache.cs delete mode 100644 src/EllieBot/_common/Services/Impl/ImagesConfig.cs delete mode 100644 src/EllieBot/_common/Services/Impl/RedisImageExtensions.cs delete mode 100644 src/EllieBot/_common/Services/Impl/SingleProcessCoordinator.cs delete mode 100644 src/EllieBot/_common/Services/Impl/StartingGuildsListService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/StatsService.cs delete mode 100644 src/EllieBot/_common/Services/Impl/YtdlOperation.cs delete mode 100644 src/EllieBot/_common/Services/strings/impl/BotStrings.cs delete mode 100644 src/EllieBot/_common/Services/strings/impl/LocalFileStringsSource.cs delete mode 100644 src/EllieBot/_common/Services/strings/impl/MemoryBotStringsProvider.cs delete mode 100644 src/EllieBot/_common/Settings/BotConfigService.cs delete mode 100644 src/EllieBot/_common/Settings/ConfigParsers.cs delete mode 100644 src/EllieBot/_common/Settings/ConfigServiceBase.cs delete mode 100644 src/EllieBot/_common/Settings/IConfigService.cs delete mode 100644 src/EllieBot/_common/Settings/SettingParser.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartEmbedText.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartEmbedTextArray.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartPlainText.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartText.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartTextEmbedAuthor.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartTextEmbedField.cs delete mode 100644 src/EllieBot/_common/SmartText/SmartTextEmbedFooter.cs delete mode 100644 src/EllieBot/_common/TriviaQuestionModel.cs delete mode 100644 src/EllieBot/_common/TypeReaderResult.cs delete mode 100644 src/EllieBot/_common/TypeReaders/CommandOrExprInfo.cs delete mode 100644 src/EllieBot/_common/TypeReaders/EmoteTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/GuildDateTimeTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/GuildTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/GuildUserTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/KwumTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/Models/PermissionAction.cs delete mode 100644 src/EllieBot/_common/TypeReaders/Models/StoopidTime.cs delete mode 100644 src/EllieBot/_common/TypeReaders/ModuleTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/PermissionActionTypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/Rgba32TypeReader.cs delete mode 100644 src/EllieBot/_common/TypeReaders/StoopidTimeTypeReader.cs delete mode 100644 src/EllieBot/_common/Yml/CommentAttribute.cs delete mode 100644 src/EllieBot/_common/Yml/CommentGatheringTypeInspector.cs delete mode 100644 src/EllieBot/_common/Yml/CommentsObjectDescriptor.cs delete mode 100644 src/EllieBot/_common/Yml/CommentsObjectGraphVisitor.cs delete mode 100644 src/EllieBot/_common/Yml/MultilineScalarFlowStyleEmitter.cs delete mode 100644 src/EllieBot/_common/Yml/Rgba32Converter.cs delete mode 100644 src/EllieBot/_common/Yml/UriConverter.cs delete mode 100644 src/EllieBot/_common/Yml/Yaml.cs delete mode 100644 src/EllieBot/_common/_Extensions/BotCredentialsExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/CommandContextExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/DbExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/Extensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/ImagesharpExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/LinkedListExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/NumberExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/ReflectionExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/Rgba32Extensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/SocketMessageComponentExtensions.cs delete mode 100644 src/EllieBot/_common/_Extensions/UserExtensions.cs diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs deleted file mode 100644 index 50de935..0000000 --- a/src/EllieBot/Db/EllieContext.cs +++ /dev/null @@ -1,713 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using EllieBot.Db.Models; - -// ReSharper disable UnusedAutoPropertyAccessor.Global - -namespace EllieBot.Db; - -public abstract class EllieContext : DbContext -{ - public DbSet GuildConfigs { get; set; } - public DbSet GreetSettings { get; set; } - - public DbSet Quotes { get; set; } - public DbSet Reminders { get; set; } - public DbSet SelfAssignableRoles { get; set; } - public DbSet MusicPlaylists { get; set; } - public DbSet Expressions { get; set; } - public DbSet CurrencyTransactions { get; set; } - public DbSet WaifuUpdates { get; set; } - public DbSet WaifuItem { get; set; } - public DbSet Warnings { get; set; } - public DbSet UserXpStats { get; set; } - public DbSet Clubs { get; set; } - public DbSet ClubBans { get; set; } - public DbSet ClubApplicants { get; set; } - - - //logging - public DbSet LogSettings { get; set; } - public DbSet IgnoredLogChannels { get; set; } - - public DbSet RotatingStatus { get; set; } - public DbSet Blacklist { get; set; } - public DbSet AutoCommands { get; set; } - public DbSet RewardedUsers { get; set; } - public DbSet PlantedCurrency { get; set; } - public DbSet BanTemplates { get; set; } - public DbSet DiscordPermOverrides { get; set; } - public DbSet DiscordUser { get; set; } - public DbSet MusicPlayerSettings { get; set; } - public DbSet Repeaters { get; set; } - public DbSet WaifuInfo { get; set; } - public DbSet ImageOnlyChannels { get; set; } - public DbSet AutoTranslateChannels { get; set; } - public DbSet AutoTranslateUsers { get; set; } - - public DbSet Permissions { get; set; } - - public DbSet BankUsers { get; set; } - - public DbSet ReactionRoles { get; set; } - - public DbSet Patrons { get; set; } - - public DbSet StreamOnlineMessages { get; set; } - - public DbSet StickyRoles { get; set; } - - public DbSet Todos { get; set; } - public DbSet TodosArchive { get; set; } - public DbSet HoneyPotChannels { get; set; } - - // todo add guild colors - // public DbSet GuildColors { get; set; } - - - #region Mandatory Provider-Specific Values - - protected abstract string CurrencyTransactionOtherIdDefaultValue { get; } - - #endregion - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - #region QUOTES - - var quoteEntity = modelBuilder.Entity(); - quoteEntity.HasIndex(x => x.GuildId); - quoteEntity.HasIndex(x => x.Keyword); - - #endregion - - #region GuildConfig - - var configEntity = modelBuilder.Entity(); - - configEntity.HasIndex(c => c.GuildId) - .IsUnique(); - - configEntity.Property(x => x.VerboseErrors) - .HasDefaultValue(true); - - modelBuilder.Entity() - .HasMany(x => x.DelMsgOnCmdChannels) - .WithOne() - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FollowedStreams) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.GenerateCurrencyChannelIds) - .WithOne(x => x.GuildConfig) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.Permissions) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.CommandCooldowns) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FilterInvitesChannelIds) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FilterLinksChannelIds) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FilteredWords) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FilterWordsChannelIds) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.MutedUsers) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasOne(x => x.AntiRaidSetting) - .WithOne() - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - // start antispam - - modelBuilder.Entity() - .HasOne(x => x.AntiSpamSetting) - .WithOne() - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.IgnoredChannels) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - // end antispam - - modelBuilder.Entity() - .HasOne(x => x.AntiAltSetting) - .WithOne() - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.UnmuteTimers) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.UnbanTimer) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.UnroleTimer) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.VcRoleInfos) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.CommandAliases) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.WarnPunishments) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.SlowmodeIgnoredRoles) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.SlowmodeIgnoredUsers) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - // start shop - modelBuilder.Entity() - .HasMany(x => x.ShopEntries) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.Items) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - // end shop - - // start streamrole - - modelBuilder.Entity() - .HasOne(x => x.StreamRole) - .WithOne(x => x.GuildConfig) - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.Whitelist) - .WithOne(x => x.StreamRoleSettings) - .HasForeignKey(x => x.StreamRoleSettingsId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.Blacklist) - .WithOne(x => x.StreamRoleSettings) - .HasForeignKey(x => x.StreamRoleSettingsId) - .OnDelete(DeleteBehavior.Cascade); - - // end streamrole - - modelBuilder.Entity() - .HasOne(x => x.XpSettings) - .WithOne(x => x.GuildConfig) - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.FeedSubs) - .WithOne(x => x.GuildConfig) - .HasForeignKey(x => x.GuildConfigId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.SelfAssignableRoleGroupNames) - .WithOne() - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasAlternateKey(x => new - { - x.GuildConfigId, - x.Url - }); - - modelBuilder.Entity().HasIndex(x => x.MessageId).IsUnique(); - - modelBuilder.Entity().HasIndex(x => x.ChannelId); - - configEntity.HasIndex(x => x.WarnExpireHours).IsUnique(false); - - #endregion - - - #region Self Assignable Roles - - var selfassignableRolesEntity = modelBuilder.Entity(); - - selfassignableRolesEntity.HasIndex(s => new - { - s.GuildId, - s.RoleId - }) - .IsUnique(); - - selfassignableRolesEntity.Property(x => x.Group).HasDefaultValue(0); - - #endregion - - #region MusicPlaylists - - var musicPlaylistEntity = modelBuilder.Entity(); - - musicPlaylistEntity.HasMany(p => p.Songs).WithOne().OnDelete(DeleteBehavior.Cascade); - - #endregion - - #region Waifus - - var wi = modelBuilder.Entity(); - wi.HasOne(x => x.Waifu).WithOne(); - - wi.HasIndex(x => x.Price); - wi.HasIndex(x => x.ClaimerId); - // wi.HasMany(x => x.Items) - // .WithOne() - // .OnDelete(DeleteBehavior.Cascade); - - #endregion - - #region DiscordUser - - modelBuilder.Entity(du => - { - du.Property(x => x.IsClubAdmin) - .HasDefaultValue(false); - - du.Property(x => x.NotifyOnLevelUp) - .HasDefaultValue(XpNotificationLocation.None); - - du.Property(x => x.TotalXp) - .HasDefaultValue(0); - - du.Property(x => x.CurrencyAmount) - .HasDefaultValue(0); - - du.HasAlternateKey(w => w.UserId); - du.HasOne(x => x.Club) - .WithMany(x => x.Members) - .IsRequired(false) - .OnDelete(DeleteBehavior.NoAction); - - du.HasIndex(x => x.TotalXp); - du.HasIndex(x => x.CurrencyAmount); - du.HasIndex(x => x.UserId); - }); - - #endregion - - #region Warnings - - modelBuilder.Entity(warn => - { - warn.HasIndex(x => x.GuildId); - warn.HasIndex(x => x.UserId); - warn.HasIndex(x => x.DateAdded); - warn.Property(x => x.Weight).HasDefaultValue(1); - }); - - #endregion - - #region XpStats - - var xps = modelBuilder.Entity(); - xps.HasIndex(x => new - { - x.UserId, - x.GuildId - }) - .IsUnique(); - - xps.HasIndex(x => x.UserId); - xps.HasIndex(x => x.GuildId); - xps.HasIndex(x => x.Xp); - xps.HasIndex(x => x.AwardedXp); - - #endregion - - #region XpRoleReward - - modelBuilder.Entity() - .HasIndex(x => new - { - x.XpSettingsId, - x.Level - }) - .IsUnique(); - - modelBuilder.Entity() - .HasMany(x => x.RoleRewards) - .WithOne(x => x.XpSettings) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.CurrencyRewards) - .WithOne(x => x.XpSettings) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity() - .HasMany(x => x.ExclusionList) - .WithOne(x => x.XpSettings) - .OnDelete(DeleteBehavior.Cascade); - - #endregion - - #region Club - - var ci = modelBuilder.Entity(); - ci.HasOne(x => x.Owner) - .WithOne() - .HasForeignKey(x => x.OwnerId) - .OnDelete(DeleteBehavior.SetNull); - - ci.HasIndex(x => new - { - x.Name - }) - .IsUnique(); - - #endregion - - #region ClubManytoMany - - modelBuilder.Entity() - .HasKey(t => new - { - t.ClubId, - t.UserId - }); - - modelBuilder.Entity() - .HasOne(pt => pt.User) - .WithMany(); - - modelBuilder.Entity() - .HasOne(pt => pt.Club) - .WithMany(x => x.Applicants); - - modelBuilder.Entity() - .HasKey(t => new - { - t.ClubId, - t.UserId - }); - - modelBuilder.Entity() - .HasOne(pt => pt.User) - .WithMany(); - - modelBuilder.Entity() - .HasOne(pt => pt.Club) - .WithMany(x => x.Bans); - - #endregion - - #region CurrencyTransactions - - modelBuilder.Entity(e => - { - e.HasIndex(x => x.UserId) - .IsUnique(false); - - e.Property(x => x.OtherId) - .HasDefaultValueSql(CurrencyTransactionOtherIdDefaultValue); - - e.Property(x => x.Type) - .IsRequired(); - - e.Property(x => x.Extra) - .IsRequired(); - }); - - #endregion - - #region Reminders - - modelBuilder.Entity().HasIndex(x => x.When); - - #endregion - - #region GroupName - - modelBuilder.Entity() - .HasIndex(x => new - { - x.GuildConfigId, - x.Number - }) - .IsUnique(); - - modelBuilder.Entity() - .HasOne(x => x.GuildConfig) - .WithMany(x => x.SelfAssignableRoleGroupNames) - .IsRequired(); - - #endregion - - #region BanTemplate - - modelBuilder.Entity().HasIndex(x => x.GuildId).IsUnique(); - modelBuilder.Entity() - .Property(x => x.PruneDays) - .HasDefaultValue(null) - .IsRequired(false); - - #endregion - - #region Perm Override - - modelBuilder.Entity() - .HasIndex(x => new - { - x.GuildId, - x.Command - }) - .IsUnique(); - - #endregion - - #region Music - - modelBuilder.Entity().HasIndex(x => x.GuildId).IsUnique(); - - modelBuilder.Entity().Property(x => x.Volume).HasDefaultValue(100); - - #endregion - - #region Reaction roles - - modelBuilder.Entity(rr2 => - { - rr2.HasIndex(x => x.GuildId) - .IsUnique(false); - - rr2.HasIndex(x => new - { - x.MessageId, - x.Emote - }) - .IsUnique(); - }); - - #endregion - - #region LogSettings - - modelBuilder.Entity(ls => ls.HasIndex(x => x.GuildId).IsUnique()); - - modelBuilder.Entity(ls => ls - .HasMany(x => x.LogIgnores) - .WithOne(x => x.LogSetting) - .OnDelete(DeleteBehavior.Cascade)); - - modelBuilder.Entity(ili => ili - .HasIndex(x => new - { - x.LogSettingId, - x.LogItemId, - x.ItemType - }) - .IsUnique()); - - #endregion - - modelBuilder.Entity(ioc => ioc.HasIndex(x => x.ChannelId).IsUnique()); - - var atch = modelBuilder.Entity(); - atch.HasIndex(x => x.GuildId).IsUnique(false); - - atch.HasIndex(x => x.ChannelId).IsUnique(); - - atch.HasMany(x => x.Users).WithOne(x => x.Channel).OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity(atu => atu.HasAlternateKey(x => new - { - x.ChannelId, - x.UserId - })); - - #region BANK - - modelBuilder.Entity(bu => bu.HasIndex(x => x.UserId).IsUnique()); - - #endregion - - - #region Patron - - // currency rewards - var pr = modelBuilder.Entity(); - pr.HasIndex(x => x.PlatformUserId).IsUnique(); - - // patrons - // patrons are not identified by their user id, but by their platform user id - // as multiple accounts (even maybe on different platforms) could have - // the same account connected to them - modelBuilder.Entity(pu => - { - pu.HasIndex(x => x.UniquePlatformUserId).IsUnique(); - pu.HasKey(x => x.UserId); - }); - - // quotes are per user id - - #endregion - - #region Xp Item Shop - - modelBuilder.Entity( - x => - { - // user can own only one of each item - x.HasIndex(model => new - { - model.UserId, - model.ItemType, - model.ItemKey - }) - .IsUnique(); - }); - - #endregion - - #region AutoPublish - - modelBuilder.Entity(apc => apc - .HasIndex(x => x.GuildId) - .IsUnique()); - - #endregion - - #region GamblingStats - - modelBuilder.Entity(gs => gs - .HasIndex(x => x.Feature) - .IsUnique()); - - #endregion - - #region Sticky Roles - - modelBuilder.Entity(sr => sr.HasIndex(x => new - { - x.GuildId, - x.UserId - }) - .IsUnique()); - - #endregion - - - #region Giveaway - - modelBuilder.Entity() - .HasMany(x => x.Participants) - .WithOne() - .HasForeignKey(x => x.GiveawayId) - .OnDelete(DeleteBehavior.Cascade); - - modelBuilder.Entity(gu => gu - .HasIndex(x => new - { - x.GiveawayId, - x.UserId - }) - .IsUnique()); - - #endregion - - #region Todo - - modelBuilder.Entity() - .HasKey(x => x.Id); - - modelBuilder.Entity() - .HasIndex(x => x.UserId) - .IsUnique(false); - - modelBuilder.Entity() - .HasMany(x => x.Items) - .WithOne() - .HasForeignKey(x => x.ArchiveId) - .OnDelete(DeleteBehavior.Cascade); - - #endregion - - #region GreetSettings - - modelBuilder - .Entity(gs => gs.HasIndex(x => new - { - x.GuildId, - x.GreetType - }) - .IsUnique()); - - modelBuilder.Entity(gs => - { - gs - .Property(x => x.IsEnabled) - .HasDefaultValue(false); - - gs - .Property(x => x.AutoDeleteTimer) - .HasDefaultValue(0); - }); - - #endregion - } - -#if DEBUG - private static readonly ILoggerFactory _debugLoggerFactory = LoggerFactory.Create(x => x.AddConsole()); - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - => optionsBuilder.UseLoggerFactory(_debugLoggerFactory); -#endif -} \ No newline at end of file diff --git a/src/EllieBot/Db/EllieDbService.cs b/src/EllieBot/Db/EllieDbService.cs deleted file mode 100644 index d117c86..0000000 --- a/src/EllieBot/Db/EllieDbService.cs +++ /dev/null @@ -1,74 +0,0 @@ -using LinqToDB.Common; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace EllieBot.Db; - -public sealed class EllieDbService : DbService -{ - private readonly IBotCredsProvider _creds; - - // these are props because creds can change at runtime - private string DbType => _creds.GetCreds().Db.Type.ToLowerInvariant().Trim(); - private string ConnString => _creds.GetCreds().Db.ConnectionString; - - public EllieDbService(IBotCredsProvider creds) - { - LinqToDBForEFTools.Initialize(); - Configuration.Linq.DisableQueryCache = true; - - _creds = creds; - } - - public override async Task SetupAsync() - { - var dbType = DbType; - var connString = ConnString; - - await using var context = CreateRawDbContext(dbType, connString); - - // make sure sqlite db is in wal journal mode - if (context is SqliteContext) - { - await context.Database.ExecuteSqlRawAsync("PRAGMA journal_mode=WAL"); - } - - await context.Database.MigrateAsync(); - } - - public override EllieContext CreateRawDbContext(string dbType, string connString) - { - switch (dbType) - { - case "postgresql": - case "postgres": - case "pgsql": - return new PostgreSqlContext(connString); - case "sqlite": - return new SqliteContext(connString); - default: - throw new NotSupportedException($"The database provide type of '{dbType}' is not supported."); - } - } - - private EllieContext GetDbContextInternal() - { - var dbType = DbType; - var connString = ConnString; - - var context = CreateRawDbContext(dbType, connString); - if (context is SqliteContext) - { - var conn = context.Database.GetDbConnection(); - conn.Open(); - using var com = conn.CreateCommand(); - com.CommandText = "PRAGMA synchronous=OFF"; - com.ExecuteNonQuery(); - } - - return context; - } - - public override EllieContext GetDbContext() - => GetDbContextInternal(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/ClubExtensions.cs b/src/EllieBot/Db/Extensions/ClubExtensions.cs deleted file mode 100644 index 88a851b..0000000 --- a/src/EllieBot/Db/Extensions/ClubExtensions.cs +++ /dev/null @@ -1,34 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class ClubExtensions -{ - private static IQueryable Include(this DbSet clubs) - => clubs.Include(x => x.Owner) - .Include(x => x.Applicants) - .ThenInclude(x => x.User) - .Include(x => x.Bans) - .ThenInclude(x => x.User) - .Include(x => x.Members) - .AsQueryable(); - - public static ClubInfo GetByOwner(this DbSet clubs, ulong userId) - => Include(clubs).FirstOrDefault(c => c.Owner.UserId == userId); - - public static ClubInfo GetByOwnerOrAdmin(this DbSet clubs, ulong userId) - => Include(clubs) - .FirstOrDefault(c => c.Owner.UserId == userId || c.Members.Any(u => u.UserId == userId && u.IsClubAdmin)); - - public static ClubInfo GetByMember(this DbSet clubs, ulong userId) - => Include(clubs).FirstOrDefault(c => c.Members.Any(u => u.UserId == userId)); - - public static ClubInfo GetByName(this DbSet clubs, string name) - => Include(clubs) - .FirstOrDefault(c => c.Name == name); - - public static List GetClubLeaderboardPage(this DbSet clubs, int page) - => clubs.AsNoTracking().OrderByDescending(x => x.Xp).Skip(page * 9).Take(9).ToList(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/CurrencyTransactionExtensions.cs b/src/EllieBot/Db/Extensions/CurrencyTransactionExtensions.cs deleted file mode 100644 index 69401b0..0000000 --- a/src/EllieBot/Db/Extensions/CurrencyTransactionExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable disable -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class CurrencyTransactionExtensions -{ - public static Task> GetPageFor( - this DbSet set, - ulong userId, - int page) - => set.ToLinqToDBTable() - .Where(x => x.UserId == userId) - .OrderByDescending(x => x.DateAdded) - .Skip(15 * page) - .Take(15) - .ToListAsyncLinqToDB(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/DbExtensions.cs b/src/EllieBot/Db/Extensions/DbExtensions.cs deleted file mode 100644 index fafade9..0000000 --- a/src/EllieBot/Db/Extensions/DbExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class DbExtensions -{ - public static T GetById(this DbSet set, int id) - where T : DbEntity - => set.FirstOrDefault(x => x.Id == id); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs b/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs deleted file mode 100644 index bdf3c05..0000000 --- a/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs +++ /dev/null @@ -1,129 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class DiscordUserExtensions -{ - public static Task GetByUserIdAsync( - this IQueryable set, - ulong userId) - => set.FirstOrDefaultAsyncLinqToDB(x => x.UserId == userId); - - public static void EnsureUserCreated( - this DbContext ctx, - ulong userId, - string username, - string discrim, - string avatarId) - => ctx.GetTable() - .InsertOrUpdate( - () => new() - { - UserId = userId, - Username = username, - Discriminator = discrim, - AvatarId = avatarId, - TotalXp = 0, - CurrencyAmount = 0 - }, - old => new() - { - Username = username, - Discriminator = discrim, - AvatarId = avatarId - }, - () => new() - { - UserId = userId - }); - - public static Task EnsureUserCreatedAsync( - this DbContext ctx, - ulong userId) - => ctx.GetTable() - .InsertOrUpdateAsync( - () => new() - { - UserId = userId, - Username = "Unknown", - Discriminator = "????", - AvatarId = string.Empty, - TotalXp = 0, - CurrencyAmount = 0 - }, - old => new() - { - }, - () => new() - { - UserId = userId - }); - - //temp is only used in updatecurrencystate, so that i don't overwrite real usernames/discrims with Unknown - public static DiscordUser GetOrCreateUser( - this DbContext ctx, - ulong userId, - string username, - string discrim, - string avatarId, - Func, IQueryable> includes = null) - { - ctx.EnsureUserCreated(userId, username, discrim, avatarId); - - IQueryable queryable = ctx.Set(); - if (includes is not null) - queryable = includes(queryable); - return queryable.First(u => u.UserId == userId); - } - - - public static int GetUserGlobalRank(this DbSet users, ulong id) - => users.AsQueryable() - .Where(x => x.TotalXp - > users.AsQueryable().Where(y => y.UserId == id).Select(y => y.TotalXp).FirstOrDefault()) - .Count() - + 1; - - public static async Task> GetUsersXpLeaderboardFor(this DbSet users, int page, int perPage) - => await users.ToLinqToDBTable() - .OrderByDescending(x => x.TotalXp) - .Skip(page * perPage) - .Take(perPage) - .ToArrayAsyncLinqToDB(); - - public static Task> GetTopRichest( - this DbSet users, - ulong botId, - int page = 0, - int perPage = 9) - => users.AsQueryable() - .Where(c => c.CurrencyAmount > 0 && botId != c.UserId) - .OrderByDescending(c => c.CurrencyAmount) - .Skip(page * perPage) - .Take(perPage) - .ToListAsyncLinqToDB(); - - public static async Task GetUserCurrencyAsync(this DbSet users, ulong userId) - => (await users.FirstOrDefaultAsyncLinqToDB(x => x.UserId == userId))?.CurrencyAmount ?? 0; - - public static void RemoveFromMany(this DbSet users, IEnumerable ids) - { - var items = users.AsQueryable().Where(x => ids.Contains(x.UserId)); - foreach (var item in items) - item.CurrencyAmount = 0; - } - - public static decimal GetTotalCurrency(this DbSet users) - => users.Sum((Func)(x => x.CurrencyAmount)); - - public static decimal GetTopOnePercentCurrency(this DbSet users, ulong botId) - => users.AsQueryable() - .Where(x => x.UserId != botId) - .OrderByDescending(x => x.CurrencyAmount) - .Take(users.Count() / 100 == 0 ? 1 : users.Count() / 100) - .Sum(x => x.CurrencyAmount); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/EllieExpressionExtensions.cs b/src/EllieBot/Db/Extensions/EllieExpressionExtensions.cs deleted file mode 100644 index 02a3453..0000000 --- a/src/EllieBot/Db/Extensions/EllieExpressionExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -using LinqToDB; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class EllieExpressionExtensions -{ - public static int ClearFromGuild(this DbSet exprs, ulong guildId) - => exprs.Delete(x => x.GuildId == guildId); - - public static IEnumerable ForId(this DbSet exprs, ulong id) - => exprs.AsNoTracking().AsQueryable().Where(x => x.GuildId == id).ToList(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs deleted file mode 100644 index de4d47f..0000000 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ /dev/null @@ -1,232 +0,0 @@ -#nullable disable -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class GuildConfigExtensions -{ - private static List DefaultWarnPunishments - => - [ - new() - { - Count = 3, - Punishment = PunishmentAction.Kick - }, - - new() - { - Count = 5, - Punishment = PunishmentAction.Ban - } - ]; - - /// - /// Gets full stream role settings for the guild with the specified id. - /// - /// Db Context - /// Id of the guild to get stream role settings for. - /// Guild'p stream role settings - public static StreamRoleSettings GetStreamRoleSettings(this DbContext ctx, ulong guildId) - { - var conf = ctx.GuildConfigsForId(guildId, - set => set.Include(y => y.StreamRole) - .Include(y => y.StreamRole.Whitelist) - .Include(y => y.StreamRole.Blacklist)); - - if (conf.StreamRole is null) - conf.StreamRole = new(); - - return conf.StreamRole; - } - - private static IQueryable IncludeEverything(this DbSet configs) - => configs - .AsSplitQuery() - .Include(gc => gc.CommandCooldowns) - .Include(gc => gc.FollowedStreams) - .Include(gc => gc.StreamRole) - .Include(gc => gc.DelMsgOnCmdChannels) - .Include(gc => gc.XpSettings) - .ThenInclude(x => x.ExclusionList); - - public static async Task GetAllGuildConfigs( - this DbSet configs, - List availableGuilds) - { - var result = await configs - .AsQueryable() - .Include(x => x.CommandCooldowns) - .Where(x => availableGuilds.Contains(x.GuildId)) - .AsNoTracking() - .ToArrayAsync(); - - return result; - } - - /// - /// Gets and creates if it doesn't exist a config for a guild. - /// - /// Context - /// Id of the guide - /// Use to manipulate the set however you want. Pass null to include everything - /// Config for the guild - public static GuildConfig GuildConfigsForId( - this DbContext ctx, - ulong guildId, - Func, IQueryable> includes) - { - GuildConfig config; - - if (includes is null) - config = ctx.Set().IncludeEverything().FirstOrDefault(c => c.GuildId == guildId); - else - { - var set = includes(ctx.Set()); - config = set.FirstOrDefault(c => c.GuildId == guildId); - } - - if (config is null) - { - ctx.Set() - .Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist, - WarningsInitialized = true, - WarnPunishments = DefaultWarnPunishments - }); - ctx.SaveChanges(); - } - - if (!config.WarningsInitialized) - { - config.WarningsInitialized = true; - config.WarnPunishments = DefaultWarnPunishments; - } - - return config; - - // ctx.GuildConfigs - // .ToLinqToDBTable() - // .InsertOrUpdate(() => new() - // { - // GuildId = guildId, - // Permissions = Permissionv2.GetDefaultPermlist, - // WarningsInitialized = true, - // WarnPunishments = DefaultWarnPunishments - // }, - // _ => new(), - // () => new() - // { - // GuildId = guildId - // }); - // - // if(includes is null) - // return ctx.GuildConfigs - // .ToLinqToDBTable() - // .First(x => x.GuildId == guildId); - } - - public static LogSetting LogSettingsFor(this DbContext ctx, ulong guildId) - { - var logSetting = ctx.Set() - .AsQueryable() - .Include(x => x.LogIgnores) - .Where(x => x.GuildId == guildId) - .FirstOrDefault(); - - if (logSetting is null) - { - ctx.Set() - .Add(logSetting = new() - { - GuildId = guildId - }); - ctx.SaveChanges(); - } - - return logSetting; - } - - public static IEnumerable PermissionsForAll(this DbSet configs, List include) - { - var query = configs.AsQueryable().Where(x => include.Contains(x.GuildId)).Include(gc => gc.Permissions); - - return query.ToList(); - } - - public static GuildConfig GcWithPermissionsFor(this DbContext ctx, ulong guildId) - { - var config = ctx.Set() - .AsQueryable() - .Where(gc => gc.GuildId == guildId) - .Include(gc => gc.Permissions) - .FirstOrDefault(); - - if (config is null) // if there is no guildconfig, create new one - { - ctx.Set() - .Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist - }); - ctx.SaveChanges(); - } - else if (config.Permissions is null || !config.Permissions.Any()) // if no perms, add default ones - { - config.Permissions = Permissionv2.GetDefaultPermlist; - ctx.SaveChanges(); - } - - return config; - } - - public static IEnumerable GetFollowedStreams(this DbSet configs) - => configs.AsQueryable().Include(x => x.FollowedStreams).SelectMany(gc => gc.FollowedStreams).ToArray(); - - public static IEnumerable GetFollowedStreams(this DbSet configs, List included) - => configs.AsQueryable() - .Where(gc => included.Contains(gc.GuildId)) - .Include(gc => gc.FollowedStreams) - .SelectMany(gc => gc.FollowedStreams) - .ToList(); - - - public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId) - { - var gc = ctx.GuildConfigsForId(guildId, - set => set.Include(x => x.XpSettings) - .ThenInclude(x => x.RoleRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.CurrencyRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.ExclusionList)); - - if (gc.XpSettings is null) - gc.XpSettings = new(); - - return gc.XpSettings; - } - - public static IEnumerable GetGeneratingChannels(this DbSet configs) - => configs.AsQueryable() - .Include(x => x.GenerateCurrencyChannelIds) - .Where(x => x.GenerateCurrencyChannelIds.Any()) - .SelectMany(x => x.GenerateCurrencyChannelIds) - .Select(x => new GeneratingChannel - { - ChannelId = x.ChannelId, - GuildId = x.GuildConfig.GuildId - }) - .ToArray(); - - public class GeneratingChannel - { - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/ReminderExtensions.cs b/src/EllieBot/Db/Extensions/ReminderExtensions.cs deleted file mode 100644 index 8a7d992..0000000 --- a/src/EllieBot/Db/Extensions/ReminderExtensions.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class ReminderExtensions -{ - public static IEnumerable GetIncludedReminders( - this DbSet reminders, - IEnumerable guildIds) - => reminders.AsQueryable().Where(x => guildIds.Contains(x.ServerId) || x.ServerId == 0).ToList(); - - public static IEnumerable RemindersFor(this DbSet reminders, ulong userId, int page) - => reminders.AsQueryable().Where(x => x.UserId == userId).OrderBy(x => x.DateAdded).Skip(page * 10).Take(10); - - public static IEnumerable RemindersForServer(this DbSet reminders, ulong serverId, int page) - => reminders.AsQueryable() - .Where(x => x.ServerId == serverId) - .OrderBy(x => x.DateAdded) - .Skip(page * 10) - .Take(10); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/SelfAssignableRolesExtensions.cs b/src/EllieBot/Db/Extensions/SelfAssignableRolesExtensions.cs deleted file mode 100644 index 740a155..0000000 --- a/src/EllieBot/Db/Extensions/SelfAssignableRolesExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class SelfAssignableRolesExtensions -{ - public static bool DeleteByGuildAndRoleId(this DbSet roles, ulong guildId, ulong roleId) - { - var role = roles.FirstOrDefault(s => s.GuildId == guildId && s.RoleId == roleId); - - if (role is null) - return false; - - roles.Remove(role); - return true; - } - - public static IReadOnlyCollection GetFromGuild(this DbSet roles, ulong guildId) - => roles.AsQueryable().Where(s => s.GuildId == guildId).ToArray(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/UserXpExtensions.cs b/src/EllieBot/Db/Extensions/UserXpExtensions.cs deleted file mode 100644 index ab3e8bb..0000000 --- a/src/EllieBot/Db/Extensions/UserXpExtensions.cs +++ /dev/null @@ -1,70 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class UserXpExtensions -{ - public static UserXpStats GetOrCreateUserXpStats(this DbContext ctx, ulong guildId, ulong userId) - { - var usr = ctx.Set().FirstOrDefault(x => x.UserId == userId && x.GuildId == guildId); - - if (usr is null) - { - ctx.Add(usr = new() - { - Xp = 0, - UserId = userId, - NotifyOnLevelUp = XpNotificationLocation.None, - GuildId = guildId - }); - } - - return usr; - } - - public static async Task> GetUsersFor( - this DbSet xps, - ulong guildId, - int page) - => await xps.ToLinqToDBTable() - .Where(x => x.GuildId == guildId) - .OrderByDescending(x => x.Xp + x.AwardedXp) - .Skip(page * 9) - .Take(9) - .ToArrayAsyncLinqToDB(); - - public static async Task> GetTopUserXps(this DbSet xps, ulong guildId, int count) - => await xps.ToLinqToDBTable() - .Where(x => x.GuildId == guildId) - .OrderByDescending(x => x.Xp + x.AwardedXp) - .Take(count) - .ToListAsyncLinqToDB(); - - public static async Task GetUserGuildRanking(this DbSet xps, ulong userId, ulong guildId) - => await xps.ToLinqToDBTable() - .Where(x => x.GuildId == guildId - && x.Xp + x.AwardedXp - > xps.AsQueryable() - .Where(y => y.UserId == userId && y.GuildId == guildId) - .Select(y => y.Xp + y.AwardedXp) - .FirstOrDefault()) - .CountAsyncLinqToDB() - + 1; - - public static void ResetGuildUserXp(this DbSet xps, ulong userId, ulong guildId) - => xps.Delete(x => x.UserId == userId && x.GuildId == guildId); - - public static void ResetGuildXp(this DbSet xps, ulong guildId) - => xps.Delete(x => x.GuildId == guildId); - - public static async Task GetLevelDataFor(this ITable userXp, ulong guildId, ulong userId) - => await userXp - .Where(x => x.GuildId == guildId && x.UserId == userId) - .FirstOrDefaultAsyncLinqToDB() is UserXpStats uxs - ? new(uxs.Xp + uxs.AwardedXp) - : new(0); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/WarningExtensions.cs b/src/EllieBot/Db/Extensions/WarningExtensions.cs deleted file mode 100644 index 15f1039..0000000 --- a/src/EllieBot/Db/Extensions/WarningExtensions.cs +++ /dev/null @@ -1,59 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class WarningExtensions -{ - public static Warning[] ForId(this DbSet warnings, ulong guildId, ulong userId) - { - var query = warnings.AsQueryable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .OrderByDescending(x => x.DateAdded); - - return query.ToArray(); - } - - public static bool Forgive( - this DbSet warnings, - ulong guildId, - ulong userId, - string mod, - int index) - { - ArgumentOutOfRangeException.ThrowIfNegative(index); - - var warn = warnings.AsQueryable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .OrderByDescending(x => x.DateAdded) - .Skip(index) - .FirstOrDefault(); - - if (warn is null || warn.Forgiven) - return false; - - warn.Forgiven = true; - warn.ForgivenBy = mod; - return true; - } - - public static async Task ForgiveAll( - this DbSet warnings, - ulong guildId, - ulong userId, - string mod) - => await warnings.AsQueryable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .ForEachAsync(x => - { - if (x.Forgiven != true) - { - x.Forgiven = true; - x.ForgivenBy = mod; - } - }); - - public static Warning[] GetForGuild(this DbSet warnings, ulong id) - => warnings.AsQueryable().Where(x => x.GuildId == id).ToArray(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Helpers/ActivityType.cs b/src/EllieBot/Db/Helpers/ActivityType.cs deleted file mode 100644 index 9c71e4b..0000000 --- a/src/EllieBot/Db/Helpers/ActivityType.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace EllieBot.Db; - -public enum DbActivityType -{ - /// The user is playing a game. - Playing, - - /// The user is streaming online. - Streaming, - - /// The user is listening to a song. - Listening, - - /// The user is watching some form of media. - Watching, - - /// The user has set a custom status. - CustomStatus, - - /// The user is competing in a game. - Competing, -} \ No newline at end of file diff --git a/src/EllieBot/Db/Helpers/GuildPerm.cs b/src/EllieBot/Db/Helpers/GuildPerm.cs deleted file mode 100644 index 60c4cde..0000000 --- a/src/EllieBot/Db/Helpers/GuildPerm.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace EllieBot.Db; - -[Flags] -public enum GuildPerm : ulong -{ - CreateInstantInvite = 1, - KickMembers = 2, - BanMembers = 4, - Administrator = 8, - ManageChannels = 16, // 0x0000000000000010 - ManageGuild = 32, // 0x0000000000000020 - ViewGuildInsights = 524288, // 0x0000000000080000 - AddReactions = 64, // 0x0000000000000040 - ViewAuditLog = 128, // 0x0000000000000080 - ViewChannel = 1024, // 0x0000000000000400 - SendMessages = 2048, // 0x0000000000000800 - SendTTSMessages = 4096, // 0x0000000000001000 - ManageMessages = 8192, // 0x0000000000002000 - EmbedLinks = 16384, // 0x0000000000004000 - AttachFiles = 32768, // 0x0000000000008000 - ReadMessageHistory = 65536, // 0x0000000000010000 - MentionEveryone = 131072, // 0x0000000000020000 - UseExternalEmojis = 262144, // 0x0000000000040000 - Connect = 1048576, // 0x0000000000100000 - Speak = 2097152, // 0x0000000000200000 - MuteMembers = 4194304, // 0x0000000000400000 - DeafenMembers = 8388608, // 0x0000000000800000 - MoveMembers = 16777216, // 0x0000000001000000 - UseVAD = 33554432, // 0x0000000002000000 - PrioritySpeaker = 256, // 0x0000000000000100 - Stream = 512, // 0x0000000000000200 - ChangeNickname = 67108864, // 0x0000000004000000 - ManageNicknames = 134217728, // 0x0000000008000000 - ManageRoles = 268435456, // 0x0000000010000000 - ManageWebhooks = 536870912, // 0x0000000020000000 - ManageEmojisAndStickers = 1073741824, // 0x0000000040000000 - UseApplicationCommands = 2147483648, // 0x0000000080000000 - RequestToSpeak = 4294967296, // 0x0000000100000000 - ManageEvents = 8589934592, // 0x0000000200000000 - ManageThreads = 17179869184, // 0x0000000400000000 - CreatePublicThreads = 34359738368, // 0x0000000800000000 - CreatePrivateThreads = 68719476736, // 0x0000001000000000 - UseExternalStickers = 137438953472, // 0x0000002000000000 - SendMessagesInThreads = 274877906944, // 0x0000004000000000 - StartEmbeddedActivities = 549755813888, // 0x0000008000000000 - ModerateMembers = 1099511627776, // 0x0000010000000000 -} \ No newline at end of file diff --git a/src/EllieBot/Db/LevelStats.cs b/src/EllieBot/Db/LevelStats.cs deleted file mode 100644 index 25a3936..0000000 --- a/src/EllieBot/Db/LevelStats.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable disable - -namespace EllieBot.Db; - -public readonly struct LevelStats -{ - public const int XP_REQUIRED_LVL_1 = 36; - - public long Level { get; } - public long LevelXp { get; } - public long RequiredXp { get; } - public long TotalXp { get; } - - public LevelStats(long xp) - { - if (xp < 0) - xp = 0; - - TotalXp = xp; - - const int baseXp = XP_REQUIRED_LVL_1; - - var required = baseXp; - var totalXp = 0; - var lvl = 1; - while (true) - { - required = (int)(baseXp + (baseXp / 4.0 * (lvl - 1))); - - if (required + totalXp > xp) - break; - - totalXp += required; - lvl++; - } - - Level = lvl - 1; - LevelXp = xp - totalXp; - RequiredXp = required; - } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/AutoCommand.cs b/src/EllieBot/Db/Models/AutoCommand.cs deleted file mode 100644 index f412448..0000000 --- a/src/EllieBot/Db/Models/AutoCommand.cs +++ /dev/null @@ -1,14 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class AutoCommand : DbEntity -{ - public string CommandText { get; set; } - public ulong ChannelId { get; set; } - public string ChannelName { get; set; } - public ulong? GuildId { get; set; } - public string GuildName { get; set; } - public ulong? VoiceChannelId { get; set; } - public string VoiceChannelName { get; set; } - public int Interval { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/AutoPublishChannel.cs b/src/EllieBot/Db/Models/AutoPublishChannel.cs deleted file mode 100644 index c632776..0000000 --- a/src/EllieBot/Db/Models/AutoPublishChannel.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Db.Models; - -public class AutoPublishChannel : DbEntity -{ - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/AutoTranslateChannel.cs b/src/EllieBot/Db/Models/AutoTranslateChannel.cs deleted file mode 100644 index 33423c1..0000000 --- a/src/EllieBot/Db/Models/AutoTranslateChannel.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class AutoTranslateChannel : DbEntity -{ - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - public bool AutoDelete { get; set; } - public IList Users { get; set; } = new List(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/AutoTranslateUser.cs b/src/EllieBot/Db/Models/AutoTranslateUser.cs deleted file mode 100644 index 459d58b..0000000 --- a/src/EllieBot/Db/Models/AutoTranslateUser.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class AutoTranslateUser : DbEntity -{ - public int ChannelId { get; set; } - public AutoTranslateChannel Channel { get; set; } - public ulong UserId { get; set; } - public string Source { get; set; } - public string Target { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/BlacklistEntry.cs b/src/EllieBot/Db/Models/BlacklistEntry.cs deleted file mode 100644 index d457e8a..0000000 --- a/src/EllieBot/Db/Models/BlacklistEntry.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class BlacklistEntry : DbEntity -{ - public ulong ItemId { get; set; } - public BlacklistType Type { get; set; } -} - -public enum BlacklistType -{ - Server, - Channel, - User -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/CommandAlias.cs b/src/EllieBot/Db/Models/CommandAlias.cs deleted file mode 100644 index 28f614a..0000000 --- a/src/EllieBot/Db/Models/CommandAlias.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class CommandAlias : DbEntity -{ - public string Trigger { get; set; } - public string Mapping { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/CommandCooldown.cs b/src/EllieBot/Db/Models/CommandCooldown.cs deleted file mode 100644 index e12ef9c..0000000 --- a/src/EllieBot/Db/Models/CommandCooldown.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class CommandCooldown : DbEntity -{ - public int Seconds { get; set; } - public string CommandName { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/CurrencyTransaction.cs b/src/EllieBot/Db/Models/CurrencyTransaction.cs deleted file mode 100644 index 8b9f6a6..0000000 --- a/src/EllieBot/Db/Models/CurrencyTransaction.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class CurrencyTransaction : DbEntity -{ - public long Amount { get; set; } - public string Note { get; set; } - public ulong UserId { get; set; } - public string Type { get; set; } - public string Extra { get; set; } - public ulong? OtherId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/DbEntity.cs b/src/EllieBot/Db/Models/DbEntity.cs deleted file mode 100644 index 0ed8388..0000000 --- a/src/EllieBot/Db/Models/DbEntity.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class DbEntity -{ - [Key] - public int Id { get; set; } - - public DateTime? DateAdded { get; set; } = DateTime.UtcNow; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/DelMsgOnCmdChannel.cs b/src/EllieBot/Db/Models/DelMsgOnCmdChannel.cs deleted file mode 100644 index dd70ed6..0000000 --- a/src/EllieBot/Db/Models/DelMsgOnCmdChannel.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class DelMsgOnCmdChannel : DbEntity -{ - public int GuildConfigId { get; set; } - - public ulong ChannelId { get; set; } - public bool State { get; set; } - - public override int GetHashCode() - => ChannelId.GetHashCode(); - - public override bool Equals(object obj) - => obj is DelMsgOnCmdChannel x && x.ChannelId == ChannelId; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/DiscordPemOverride.cs b/src/EllieBot/Db/Models/DiscordPemOverride.cs deleted file mode 100644 index b9ecd24..0000000 --- a/src/EllieBot/Db/Models/DiscordPemOverride.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class DiscordPermOverride : DbEntity -{ - public GuildPerm Perm { get; set; } - - public ulong? GuildId { get; set; } - public string Command { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/DiscordUser.cs b/src/EllieBot/Db/Models/DiscordUser.cs deleted file mode 100644 index 69eecb6..0000000 --- a/src/EllieBot/Db/Models/DiscordUser.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - - -// FUTURE remove LastLevelUp from here and UserXpStats -public class DiscordUser : DbEntity -{ - public ulong UserId { get; set; } - public string Username { get; set; } - public string Discriminator { get; set; } - public string AvatarId { get; set; } - - public int? ClubId { get; set; } - public ClubInfo Club { get; set; } - public bool IsClubAdmin { get; set; } - - public long TotalXp { get; set; } - public XpNotificationLocation NotifyOnLevelUp { get; set; } - - public long CurrencyAmount { get; set; } - - public override bool Equals(object obj) - => obj is DiscordUser du ? du.UserId == UserId : false; - - public override int GetHashCode() - => UserId.GetHashCode(); - - public override string ToString() - { - if (string.IsNullOrWhiteSpace(Discriminator) || Discriminator == "0000") - return Username; - - return Username + "#" + Discriminator; - } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/Event.cs b/src/EllieBot/Db/Models/Event.cs deleted file mode 100644 index 63202f6..0000000 --- a/src/EllieBot/Db/Models/Event.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class CurrencyEvent -{ - public enum Type - { - Reaction, - - GameStatus - //NotRaid, - } - - public ulong ServerId { get; set; } - public ulong ChannelId { get; set; } - public ulong MessageId { get; set; } - public Type EventType { get; set; } - - /// - /// Amount of currency that the user will be rewarded. - /// - public long Amount { get; set; } - - /// - /// Maximum amount of currency that can be handed out. - /// - public long PotSize { get; set; } - - public List AwardedUsers { get; set; } - - /// - /// Used as extra data storage for events which need it. - /// - public ulong ExtraId { get; set; } - - /// - /// May be used for some future event. - /// - public ulong ExtraId2 { get; set; } - - /// - /// May be used for some future event. - /// - public string ExtraString { get; set; } -} - -public class AwardedUser -{ -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/FeedSub.cs b/src/EllieBot/Db/Models/FeedSub.cs deleted file mode 100644 index f257f96..0000000 --- a/src/EllieBot/Db/Models/FeedSub.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FeedSub : DbEntity -{ - public int GuildConfigId { get; set; } - public GuildConfig GuildConfig { get; set; } - - public ulong ChannelId { get; set; } - public string Url { get; set; } - - public string Message { get; set; } - - public override int GetHashCode() - => Url.GetHashCode(StringComparison.InvariantCulture) ^ GuildConfigId.GetHashCode(); - - public override bool Equals(object obj) - => obj is FeedSub s && s.Url.ToLower() == Url.ToLower() && s.GuildConfigId == GuildConfigId; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/FollowedStream.cs b/src/EllieBot/Db/Models/FollowedStream.cs deleted file mode 100644 index 183e0ab..0000000 --- a/src/EllieBot/Db/Models/FollowedStream.cs +++ /dev/null @@ -1,33 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FollowedStream : DbEntity -{ - public enum FType - { - Twitch = 0, - Picarto = 3, - Youtube = 4, - Facebook = 5, - Trovo = 6 - } - - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - public string Username { get; set; } - public FType Type { get; set; } - public string Message { get; set; } - - protected bool Equals(FollowedStream other) - => ChannelId == other.ChannelId - && Username.Trim().ToUpperInvariant() == other.Username.Trim().ToUpperInvariant() - && Type == other.Type; - - public override int GetHashCode() - => HashCode.Combine(ChannelId, Username, (int)Type); - - public override bool Equals(object obj) - => obj is FollowedStream fs && Equals(fs); - - -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GCChannelId.cs b/src/EllieBot/Db/Models/GCChannelId.cs deleted file mode 100644 index c6f922b..0000000 --- a/src/EllieBot/Db/Models/GCChannelId.cs +++ /dev/null @@ -1,14 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class GCChannelId : DbEntity -{ - public GuildConfig GuildConfig { get; set; } - public ulong ChannelId { get; set; } - - public override bool Equals(object obj) - => obj is GCChannelId gc && gc.ChannelId == ChannelId; - - public override int GetHashCode() - => ChannelId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GamblingStats.cs b/src/EllieBot/Db/Models/GamblingStats.cs deleted file mode 100644 index 3c91a3b..0000000 --- a/src/EllieBot/Db/Models/GamblingStats.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class GamblingStats : DbEntity -{ - public string Feature { get; set; } - public decimal Bet { get; set; } - public decimal PaidOut { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GroupName.cs b/src/EllieBot/Db/Models/GroupName.cs deleted file mode 100644 index 3e29b31..0000000 --- a/src/EllieBot/Db/Models/GroupName.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class GroupName : DbEntity -{ - public int GuildConfigId { get; set; } - public GuildConfig GuildConfig { get; set; } - - public int Number { get; set; } - public string Name { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GuildColors.cs b/src/EllieBot/Db/Models/GuildColors.cs deleted file mode 100644 index efd5fc1..0000000 --- a/src/EllieBot/Db/Models/GuildColors.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class GuildColors -{ - [Key] - public ulong GuildId { get; set; } - - [Length(0, 9)] - public string? OkColor { get; set; } - - [Length(0, 9)] - public string? ErrorColor { get; set; } - - [Length(0, 9)] - public string? PendingColor { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GuildConfig.cs b/src/EllieBot/Db/Models/GuildConfig.cs deleted file mode 100644 index 20f42b3..0000000 --- a/src/EllieBot/Db/Models/GuildConfig.cs +++ /dev/null @@ -1,106 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class GuildConfig : DbEntity -{ - // public bool Keep { get; set; } - public ulong GuildId { get; set; } - - public string Prefix { get; set; } - - public bool DeleteMessageOnCommand { get; set; } - public HashSet DelMsgOnCmdChannels { get; set; } = new(); - - public string AutoAssignRoleIds { get; set; } - - // //greet stuff - // public int AutoDeleteGreetMessagesTimer { get; set; } = 30; - // public int AutoDeleteByeMessagesTimer { get; set; } = 30; - // - // public ulong GreetMessageChannelId { get; set; } - // public ulong ByeMessageChannelId { get; set; } - // - // public bool SendDmGreetMessage { get; set; } - // public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - // - // public bool SendChannelGreetMessage { get; set; } - // public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - // - // public bool SendChannelByeMessage { get; set; } - // public string ChannelByeMessageText { get; set; } = "%user% has left!"; - // public bool SendBoostMessage { get; set; } - // pulic int BoostMessageDeleteAfter { get; set; } - - //self assignable roles - public bool ExclusiveSelfAssignedRoles { get; set; } - public bool AutoDeleteSelfAssignedRoleMessages { get; set; } - - //stream notifications - public HashSet FollowedStreams { get; set; } = new(); - - //currencyGeneration - public HashSet GenerateCurrencyChannelIds { get; set; } = new(); - - public List Permissions { get; set; } - public bool VerbosePermissions { get; set; } = true; - public string PermissionRole { get; set; } - - public HashSet CommandCooldowns { get; set; } = new(); - - //filtering - public bool FilterInvites { get; set; } - public bool FilterLinks { get; set; } - public HashSet FilterInvitesChannelIds { get; set; } = new(); - public HashSet FilterLinksChannelIds { get; set; } = new(); - - //public bool FilterLinks { get; set; } - //public HashSet FilterLinksChannels { get; set; } = new HashSet(); - - public bool FilterWords { get; set; } - public HashSet FilteredWords { get; set; } = new(); - public HashSet FilterWordsChannelIds { get; set; } = new(); - - public HashSet MutedUsers { get; set; } = new(); - - public string MuteRoleName { get; set; } - public bool CleverbotEnabled { get; set; } - - public AntiRaidSetting AntiRaidSetting { get; set; } - public AntiSpamSetting AntiSpamSetting { get; set; } - public AntiAltSetting AntiAltSetting { get; set; } - - public string Locale { get; set; } - public string TimeZoneId { get; set; } - - public HashSet UnmuteTimers { get; set; } = new(); - public HashSet UnbanTimer { get; set; } = new(); - public HashSet UnroleTimer { get; set; } = new(); - public HashSet VcRoleInfos { get; set; } - public HashSet CommandAliases { get; set; } = new(); - public List WarnPunishments { get; set; } = new(); - public bool WarningsInitialized { get; set; } - public HashSet SlowmodeIgnoredUsers { get; set; } - public HashSet SlowmodeIgnoredRoles { get; set; } - - public List ShopEntries { get; set; } - public ulong? GameVoiceChannel { get; set; } - public bool VerboseErrors { get; set; } = true; - - public StreamRoleSettings StreamRole { get; set; } - - public XpSettings XpSettings { get; set; } - public List FeedSubs { get; set; } = new(); - public bool NotifyStreamOffline { get; set; } - public bool DeleteStreamOnlineMessage { get; set; } - public List SelfAssignableRoleGroupNames { get; set; } - public int WarnExpireHours { get; set; } - public WarnExpireAction WarnExpireAction { get; set; } = WarnExpireAction.Clear; - - public bool DisableGlobalExpressions { get; set; } = false; - - #region Boost Message - - public bool StickyRoles { get; set; } - - #endregion -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/HoneypotChannel.cs b/src/EllieBot/Db/Models/HoneypotChannel.cs deleted file mode 100644 index bd074c9..0000000 --- a/src/EllieBot/Db/Models/HoneypotChannel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class HoneypotChannel -{ - [Key] - public ulong GuildId { get; set; } - - public ulong ChannelId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/IgnoredLogItem.cs b/src/EllieBot/Db/Models/IgnoredLogItem.cs deleted file mode 100644 index 7424d84..0000000 --- a/src/EllieBot/Db/Models/IgnoredLogItem.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class IgnoredLogItem : DbEntity -{ - public int LogSettingId { get; set; } - public LogSetting LogSetting { get; set; } - public ulong LogItemId { get; set; } - public IgnoredItemType ItemType { get; set; } -} - -public enum IgnoredItemType -{ - Channel, - User -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/ImageOnlyChannel.cs b/src/EllieBot/Db/Models/ImageOnlyChannel.cs deleted file mode 100644 index 01d01fa..0000000 --- a/src/EllieBot/Db/Models/ImageOnlyChannel.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class ImageOnlyChannel : DbEntity -{ - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - public OnlyChannelType Type { get; set; } -} - -public enum OnlyChannelType -{ - Image, - Link -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/LogSetting.cs b/src/EllieBot/Db/Models/LogSetting.cs deleted file mode 100644 index 916b1b8..0000000 --- a/src/EllieBot/Db/Models/LogSetting.cs +++ /dev/null @@ -1,38 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class LogSetting : DbEntity -{ - public List LogIgnores { get; set; } = new(); - - public ulong GuildId { get; set; } - public ulong? LogOtherId { get; set; } - public ulong? MessageUpdatedId { get; set; } - public ulong? MessageDeletedId { get; set; } - - public ulong? UserJoinedId { get; set; } - public ulong? UserLeftId { get; set; } - public ulong? UserBannedId { get; set; } - public ulong? UserUnbannedId { get; set; } - public ulong? UserUpdatedId { get; set; } - - public ulong? ChannelCreatedId { get; set; } - public ulong? ChannelDestroyedId { get; set; } - public ulong? ChannelUpdatedId { get; set; } - - - public ulong? ThreadDeletedId { get; set; } - public ulong? ThreadCreatedId { get; set; } - - public ulong? UserMutedId { get; set; } - - //userpresence - public ulong? LogUserPresenceId { get; set; } - - //voicepresence - - public ulong? LogVoicePresenceId { get; set; } - - public ulong? LogVoicePresenceTTSId { get; set; } - public ulong? LogWarnsId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/Permission.cs b/src/EllieBot/Db/Models/Permission.cs deleted file mode 100644 index b926f92..0000000 --- a/src/EllieBot/Db/Models/Permission.cs +++ /dev/null @@ -1,52 +0,0 @@ -#nullable disable -using System.ComponentModel.DataAnnotations.Schema; -using System.Diagnostics; - -namespace EllieBot.Db.Models; - -[DebuggerDisplay("{PrimaryTarget}{SecondaryTarget} {SecondaryTargetName} {State} {PrimaryTargetId}")] -public class Permissionv2 : DbEntity, IIndexed -{ - public int? GuildConfigId { get; set; } - public int Index { get; set; } - - public PrimaryPermissionType PrimaryTarget { get; set; } - public ulong PrimaryTargetId { get; set; } - - public SecondaryPermissionType SecondaryTarget { get; set; } - public string SecondaryTargetName { get; set; } - - public bool IsCustomCommand { get; set; } - - public bool State { get; set; } - - [NotMapped] - public static Permissionv2 AllowAllPerm - => new() - { - PrimaryTarget = PrimaryPermissionType.Server, - PrimaryTargetId = 0, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = true, - Index = 0 - }; - - public static List GetDefaultPermlist - => [AllowAllPerm]; -} - -public enum PrimaryPermissionType -{ - User, - Channel, - Role, - Server -} - -public enum SecondaryPermissionType -{ - Module, - Command, - AllModules -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/PlantedCurrency.cs b/src/EllieBot/Db/Models/PlantedCurrency.cs deleted file mode 100644 index 7e640a5..0000000 --- a/src/EllieBot/Db/Models/PlantedCurrency.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class PlantedCurrency : DbEntity -{ - public long Amount { get; set; } - public string Password { get; set; } - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - public ulong UserId { get; set; } - public ulong MessageId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/PlaylistSong.cs b/src/EllieBot/Db/Models/PlaylistSong.cs deleted file mode 100644 index ccd9312..0000000 --- a/src/EllieBot/Db/Models/PlaylistSong.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class PlaylistSong : DbEntity -{ - public string Provider { get; set; } - public MusicType ProviderType { get; set; } - public string Title { get; set; } - public string Uri { get; set; } - public string Query { get; set; } -} - -public enum MusicType -{ - Radio, - YouTube, - Local, -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/Reminder.cs b/src/EllieBot/Db/Models/Reminder.cs deleted file mode 100644 index 046615a..0000000 --- a/src/EllieBot/Db/Models/Reminder.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class Reminder : DbEntity -{ - public DateTime When { get; set; } - public ulong ChannelId { get; set; } - public ulong ServerId { get; set; } - public ulong UserId { get; set; } - public string Message { get; set; } - public bool IsPrivate { get; set; } - public ReminderType Type { get; set; } -} - -public enum ReminderType -{ - User, - Timely -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/Repeater.cs b/src/EllieBot/Db/Models/Repeater.cs deleted file mode 100644 index d0ef69e..0000000 --- a/src/EllieBot/Db/Models/Repeater.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class Repeater -{ - public int Id { get; set; } - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - public ulong? LastMessageId { get; set; } - public string Message { get; set; } - public TimeSpan Interval { get; set; } - public TimeSpan? StartTimeOfDay { get; set; } - public bool NoRedundant { get; set; } - public DateTime DateAdded { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/RotatingPlayingStatus.cs b/src/EllieBot/Db/Models/RotatingPlayingStatus.cs deleted file mode 100644 index 6cf5cc4..0000000 --- a/src/EllieBot/Db/Models/RotatingPlayingStatus.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class RotatingPlayingStatus : DbEntity -{ - public string Status { get; set; } - public DbActivityType Type { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/ShopEntry.cs b/src/EllieBot/Db/Models/ShopEntry.cs deleted file mode 100644 index a21c7e6..0000000 --- a/src/EllieBot/Db/Models/ShopEntry.cs +++ /dev/null @@ -1,46 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public enum ShopEntryType -{ - Role, - - List, - Command -} - -public class ShopEntry : DbEntity, IIndexed -{ - public int Index { get; set; } - public int Price { get; set; } - public string Name { get; set; } - public ulong AuthorId { get; set; } - - public ShopEntryType Type { get; set; } - - //role - public string RoleName { get; set; } - public ulong RoleId { get; set; } - - //list - public HashSet Items { get; set; } = new(); - public ulong? RoleRequirement { get; set; } - - // command - public string Command { get; set; } -} - -public class ShopEntryItem : DbEntity -{ - public string Text { get; set; } - - public override bool Equals(object obj) - { - if (obj is null || GetType() != obj.GetType()) - return false; - return ((ShopEntryItem)obj).Text == Text; - } - - public override int GetHashCode() - => Text.GetHashCode(StringComparison.InvariantCulture); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/StreamOnlineMessage.cs b/src/EllieBot/Db/Models/StreamOnlineMessage.cs deleted file mode 100644 index c6443a6..0000000 --- a/src/EllieBot/Db/Models/StreamOnlineMessage.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class StreamOnlineMessage : DbEntity -{ - public ulong ChannelId { get; set; } - public ulong MessageId { get; set; } - - public FollowedStream.FType Type { get; set; } - public string Name { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/StreamRoleSettings.cs b/src/EllieBot/Db/Models/StreamRoleSettings.cs deleted file mode 100644 index bd36b4c..0000000 --- a/src/EllieBot/Db/Models/StreamRoleSettings.cs +++ /dev/null @@ -1,74 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class StreamRoleSettings : DbEntity -{ - public int GuildConfigId { get; set; } - public GuildConfig GuildConfig { get; set; } - - /// - /// Whether the feature is enabled in the guild. - /// - public bool Enabled { get; set; } - - /// - /// Id of the role to give to the users in the role 'FromRole' when they start streaming - /// - public ulong AddRoleId { get; set; } - - /// - /// Id of the role whose users are eligible to get the 'AddRole' - /// - public ulong FromRoleId { get; set; } - - /// - /// If set, feature will only apply to users who have this keyword in their streaming status. - /// - public string Keyword { get; set; } - - /// - /// A collection of whitelisted users' IDs. Whitelisted users don't require 'keyword' in - /// order to get the stream role. - /// - public HashSet Whitelist { get; set; } = new(); - - /// - /// A collection of blacklisted users' IDs. Blacklisted useres will never get the stream role. - /// - public HashSet Blacklist { get; set; } = new(); -} - -public class StreamRoleBlacklistedUser : DbEntity -{ - public int StreamRoleSettingsId { get; set; } - public StreamRoleSettings StreamRoleSettings { get; set; } - - public ulong UserId { get; set; } - public string Username { get; set; } - - public override bool Equals(object obj) - { - if (obj is not StreamRoleBlacklistedUser x) - return false; - - return x.UserId == UserId; - } - - public override int GetHashCode() - => UserId.GetHashCode(); -} - -public class StreamRoleWhitelistedUser : DbEntity -{ - public int StreamRoleSettingsId { get; set; } - public StreamRoleSettings StreamRoleSettings { get; set; } - - public ulong UserId { get; set; } - public string Username { get; set; } - - public override bool Equals(object obj) - => obj is StreamRoleWhitelistedUser x ? x.UserId == UserId : false; - - public override int GetHashCode() - => UserId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/VcRoleInfo.cs b/src/EllieBot/Db/Models/VcRoleInfo.cs deleted file mode 100644 index bb28450..0000000 --- a/src/EllieBot/Db/Models/VcRoleInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class VcRoleInfo : DbEntity -{ - public ulong VoiceChannelId { get; set; } - public ulong RoleId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/Waifu.cs b/src/EllieBot/Db/Models/Waifu.cs deleted file mode 100644 index 2583afb..0000000 --- a/src/EllieBot/Db/Models/Waifu.cs +++ /dev/null @@ -1,75 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Services.Database.Models; - -public class WaifuInfo : DbEntity -{ - public int WaifuId { get; set; } - public DiscordUser Waifu { get; set; } - - public int? ClaimerId { get; set; } - public DiscordUser Claimer { get; set; } - - public int? AffinityId { get; set; } - public DiscordUser Affinity { get; set; } - - public long Price { get; set; } - public List Items { get; set; } = new(); - - public override string ToString() - { - var status = string.Empty; - - var waifuUsername = Waifu.ToString().TrimTo(20); - var claimer = Claimer?.ToString().TrimTo(20) - ?? "no one"; - - var affinity = Affinity?.ToString().TrimTo(20); - - if (AffinityId is null) - status = $"... but {waifuUsername}'s heart is empty"; - else if (AffinityId == ClaimerId) - status = $"... and {waifuUsername} likes {claimer} too <3"; - else - { - status = - $"... but {waifuUsername}'s heart belongs to {affinity}"; - } - - return $"**{waifuUsername}** - claimed by **{claimer}**\n\t{status}"; - } -} - -public class WaifuLbResult -{ - public string Username { get; set; } - public string Discrim { get; set; } - - public string Claimer { get; set; } - public string ClaimerDiscrim { get; set; } - - public string Affinity { get; set; } - public string AffinityDiscrim { get; set; } - - public long Price { get; set; } - - public override string ToString() - { - var claimer = "no one"; - var status = string.Empty; - - var waifuUsername = Username.TrimTo(20); - var claimerUsername = Claimer?.TrimTo(20); - - if (Claimer is not null) - claimer = $"{claimerUsername}#{ClaimerDiscrim}"; - if (Affinity is null) - status = $"... but {waifuUsername}'s heart is empty"; - else if (Affinity + AffinityDiscrim == Claimer + ClaimerDiscrim) - status = $"... and {waifuUsername} likes {claimerUsername} too <3"; - else - status = $"... but {waifuUsername}'s heart belongs to {Affinity.TrimTo(20)}#{AffinityDiscrim}"; - return $"**{waifuUsername}#{Discrim}** - claimed by **{claimer}**\n\t{status}"; - } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiAltSetting.cs b/src/EllieBot/Db/Models/anti/AntiAltSetting.cs deleted file mode 100644 index cb0da3c..0000000 --- a/src/EllieBot/Db/Models/anti/AntiAltSetting.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EllieBot.Db.Models; - -public class AntiAltSetting -{ - public int GuildConfigId { get; set; } - - public int Id { get; set; } - public TimeSpan MinAge { get; set; } - public PunishmentAction Action { get; set; } - public int ActionDurationMinutes { get; set; } - public ulong? RoleId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs deleted file mode 100644 index 1e219eb..0000000 --- a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - - -public class AntiRaidSetting : DbEntity -{ - public int GuildConfigId { get; set; } - - public int UserThreshold { get; set; } - public int Seconds { get; set; } - public PunishmentAction Action { get; set; } - - /// - /// Duration of the punishment, in minutes. This works only for supported Actions, like: - /// Mute, Chatmute, Voicemute, etc... - /// - public int PunishDuration { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiSpamIgnore.cs b/src/EllieBot/Db/Models/anti/AntiSpamIgnore.cs deleted file mode 100644 index a3cd623..0000000 --- a/src/EllieBot/Db/Models/anti/AntiSpamIgnore.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EllieBot.Db.Models; - -public class AntiSpamIgnore : DbEntity -{ - public ulong ChannelId { get; set; } - - public override int GetHashCode() - => ChannelId.GetHashCode(); - - public override bool Equals(object? obj) - => obj is AntiSpamIgnore inst && inst.ChannelId == ChannelId; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiSpamSetting.cs b/src/EllieBot/Db/Models/anti/AntiSpamSetting.cs deleted file mode 100644 index 7e19253..0000000 --- a/src/EllieBot/Db/Models/anti/AntiSpamSetting.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public class AntiSpamSetting : DbEntity -{ - public int GuildConfigId { get; set; } - - public PunishmentAction Action { get; set; } - public int MessageThreshold { get; set; } = 3; - public int MuteTime { get; set; } - public ulong? RoleId { get; set; } - public HashSet IgnoredChannels { get; set; } = new(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/club/ClubInfo.cs b/src/EllieBot/Db/Models/club/ClubInfo.cs deleted file mode 100644 index a7bc16f..0000000 --- a/src/EllieBot/Db/Models/club/ClubInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable disable -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class ClubInfo : DbEntity -{ - [MaxLength(20)] - public string Name { get; set; } - public string Description { get; set; } - public string ImageUrl { get; set; } = string.Empty; - - public int Xp { get; set; } = 0; - public int? OwnerId { get; set; } - public DiscordUser Owner { get; set; } - - public List Members { get; set; } = new(); - public List Applicants { get; set; } = new(); - public List Bans { get; set; } = new(); - - public override string ToString() - => Name; -} - -public class ClubApplicants -{ - public int ClubId { get; set; } - public ClubInfo Club { get; set; } - - public int UserId { get; set; } - public DiscordUser User { get; set; } -} - -public class ClubBans -{ - public int ClubId { get; set; } - public ClubInfo Club { get; set; } - - public int UserId { get; set; } - public DiscordUser User { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/currency/BankUser.cs b/src/EllieBot/Db/Models/currency/BankUser.cs deleted file mode 100644 index b62b49d..0000000 --- a/src/EllieBot/Db/Models/currency/BankUser.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Db.Models; - -public class BankUser : DbEntity -{ - public ulong UserId { get; set; } - public long Balance { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/expr/EllieExpression.cs b/src/EllieBot/Db/Models/expr/EllieExpression.cs deleted file mode 100644 index 53eef8b..0000000 --- a/src/EllieBot/Db/Models/expr/EllieExpression.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class EllieExpression : DbEntity -{ - public ulong? GuildId { get; set; } - public string Response { get; set; } - public string Trigger { get; set; } - - public bool AutoDeleteTrigger { get; set; } - public bool DmResponse { get; set; } - public bool ContainsAnywhere { get; set; } - public bool AllowTarget { get; set; } - public string Reactions { get; set; } - - public string[] GetReactions() - => string.IsNullOrWhiteSpace(Reactions) ? Array.Empty() : Reactions.Split("@@@"); - - public bool IsGlobal() - => GuildId is null or 0; -} - -public class ReactionResponse : DbEntity -{ - public bool OwnerOnly { get; set; } - public string Text { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/expr/Quote.cs b/src/EllieBot/Db/Models/expr/Quote.cs deleted file mode 100644 index 62f57d7..0000000 --- a/src/EllieBot/Db/Models/expr/Quote.cs +++ /dev/null @@ -1,26 +0,0 @@ -#nullable disable -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class Quote : DbEntity -{ - public ulong GuildId { get; set; } - - [Required] - public string Keyword { get; set; } - - [Required] - public string AuthorName { get; set; } - - public ulong AuthorId { get; set; } - - [Required] - public string Text { get; set; } -} - -public enum OrderType -{ - Id = -1, - Keyword = -2 -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/filter/FilterChannelId.cs b/src/EllieBot/Db/Models/filter/FilterChannelId.cs deleted file mode 100644 index eb1d965..0000000 --- a/src/EllieBot/Db/Models/filter/FilterChannelId.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FilterChannelId : DbEntity -{ - public ulong ChannelId { get; set; } - - public bool Equals(FilterChannelId other) - => ChannelId == other.ChannelId; - - public override bool Equals(object obj) - => obj is FilterChannelId fci && Equals(fci); - - public override int GetHashCode() - => ChannelId.GetHashCode(); -} diff --git a/src/EllieBot/Db/Models/filter/FilterLinksChannelId.cs b/src/EllieBot/Db/Models/filter/FilterLinksChannelId.cs deleted file mode 100644 index 50aca96..0000000 --- a/src/EllieBot/Db/Models/filter/FilterLinksChannelId.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FilterLinksChannelId : DbEntity -{ - public ulong ChannelId { get; set; } - - public override bool Equals(object obj) - => obj is FilterLinksChannelId f && f.ChannelId == ChannelId; - - public override int GetHashCode() - => ChannelId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/filter/FilterWordsChannelId.cs b/src/EllieBot/Db/Models/filter/FilterWordsChannelId.cs deleted file mode 100644 index 6921032..0000000 --- a/src/EllieBot/Db/Models/filter/FilterWordsChannelId.cs +++ /dev/null @@ -1,17 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FilterWordsChannelId : DbEntity -{ - public int? GuildConfigId { get; set; } - public ulong ChannelId { get; set; } - - public bool Equals(FilterWordsChannelId other) - => ChannelId == other.ChannelId; - - public override bool Equals(object obj) - => obj is FilterWordsChannelId fci && Equals(fci); - - public override int GetHashCode() - => ChannelId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/filter/FilteredWord.cs b/src/EllieBot/Db/Models/filter/FilteredWord.cs deleted file mode 100644 index de66d7a..0000000 --- a/src/EllieBot/Db/Models/filter/FilteredWord.cs +++ /dev/null @@ -1,7 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FilteredWord : DbEntity -{ - public string Word { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/giveaway/GiveawayModel.cs b/src/EllieBot/Db/Models/giveaway/GiveawayModel.cs deleted file mode 100644 index ca077b2..0000000 --- a/src/EllieBot/Db/Models/giveaway/GiveawayModel.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public sealed class GiveawayModel -{ - public int Id { get; set; } - public ulong GuildId { get; set; } - public ulong MessageId { get; set; } - public ulong ChannelId { get; set; } - public string Message { get; set; } - - public IList Participants { get; set; } = new List(); - public DateTime EndsAt { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/giveaway/GiveawayUser.cs b/src/EllieBot/Db/Models/giveaway/GiveawayUser.cs deleted file mode 100644 index a8b964e..0000000 --- a/src/EllieBot/Db/Models/giveaway/GiveawayUser.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public sealed class GiveawayUser -{ - public int Id { get; set; } - public int GiveawayId { get; set; } - public ulong UserId { get; set; } - public string Name { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/BanTemplate.cs b/src/EllieBot/Db/Models/punish/BanTemplate.cs deleted file mode 100644 index 0c8519f..0000000 --- a/src/EllieBot/Db/Models/punish/BanTemplate.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class BanTemplate : DbEntity -{ - public ulong GuildId { get; set; } - public string Text { get; set; } - public int? PruneDays { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/MutedUserId.cs b/src/EllieBot/Db/Models/punish/MutedUserId.cs deleted file mode 100644 index f067e77..0000000 --- a/src/EllieBot/Db/Models/punish/MutedUserId.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class MutedUserId : DbEntity -{ - public ulong UserId { get; set; } - - public override int GetHashCode() - => UserId.GetHashCode(); - - public override bool Equals(object obj) - => obj is MutedUserId mui ? mui.UserId == UserId : false; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/PunishmentAction.cs b/src/EllieBot/Db/Models/punish/PunishmentAction.cs deleted file mode 100644 index 5788e65..0000000 --- a/src/EllieBot/Db/Models/punish/PunishmentAction.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace EllieBot.Db.Models; - -public enum PunishmentAction -{ - Mute, - Kick, - Ban, - Softban, - RemoveRoles, - ChatMute, - VoiceMute, - AddRole, - Warn, - TimeOut -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/WarnExpireAction.cs b/src/EllieBot/Db/Models/punish/WarnExpireAction.cs deleted file mode 100644 index 0de916e..0000000 --- a/src/EllieBot/Db/Models/punish/WarnExpireAction.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public enum WarnExpireAction -{ - Clear, - Delete -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/Warning.cs b/src/EllieBot/Db/Models/punish/Warning.cs deleted file mode 100644 index 454a4cb..0000000 --- a/src/EllieBot/Db/Models/punish/Warning.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class Warning : DbEntity -{ - public ulong GuildId { get; set; } - public ulong UserId { get; set; } - public string Reason { get; set; } - public bool Forgiven { get; set; } - public string ForgivenBy { get; set; } - public string Moderator { get; set; } - public long Weight { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/punish/WarningPunishment.cs b/src/EllieBot/Db/Models/punish/WarningPunishment.cs deleted file mode 100644 index 5368938..0000000 --- a/src/EllieBot/Db/Models/punish/WarningPunishment.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class WarningPunishment : DbEntity -{ - public int Count { get; set; } - public PunishmentAction Punishment { get; set; } - public int Time { get; set; } - public ulong? RoleId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/roles/ReactionRole.cs b/src/EllieBot/Db/Models/roles/ReactionRole.cs deleted file mode 100644 index 2dedbfe..0000000 --- a/src/EllieBot/Db/Models/roles/ReactionRole.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable disable -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class ReactionRoleV2 : DbEntity -{ - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - - public ulong MessageId { get; set; } - - [MaxLength(100)] - public string Emote { get; set; } - public ulong RoleId { get; set; } - public int Group { get; set; } - public int LevelReq { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/roles/SelfAssignableRole.cs b/src/EllieBot/Db/Models/roles/SelfAssignableRole.cs deleted file mode 100644 index ac147b6..0000000 --- a/src/EllieBot/Db/Models/roles/SelfAssignableRole.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class SelfAssignedRole : DbEntity -{ - public ulong GuildId { get; set; } - public ulong RoleId { get; set; } - - public int Group { get; set; } - public int LevelRequirement { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/roles/StickyRoles.cs b/src/EllieBot/Db/Models/roles/StickyRoles.cs deleted file mode 100644 index 3e01ae9..0000000 --- a/src/EllieBot/Db/Models/roles/StickyRoles.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public class StickyRole : DbEntity -{ - public ulong GuildId { get; set; } - public string RoleIds { get; set; } - public ulong UserId { get; set; } - - public ulong[] GetRoleIds() - => string.IsNullOrWhiteSpace(RoleIds) - ? [] - : RoleIds.Split(',').Select(ulong.Parse).ToArray(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredRole.cs b/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredRole.cs deleted file mode 100644 index e41c2e7..0000000 --- a/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredRole.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class SlowmodeIgnoredRole : DbEntity -{ - public ulong RoleId { get; set; } - - // override object.Equals - public override bool Equals(object obj) - { - if (obj is null || GetType() != obj.GetType()) - return false; - - return ((SlowmodeIgnoredRole)obj).RoleId == RoleId; - } - - // override object.GetHashCode - public override int GetHashCode() - => RoleId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredUser.cs b/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredUser.cs deleted file mode 100644 index 7ae0a05..0000000 --- a/src/EllieBot/Db/Models/slowmode/SlowmodeIgnoredUser.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class SlowmodeIgnoredUser : DbEntity -{ - public ulong UserId { get; set; } - - // override object.Equals - public override bool Equals(object obj) - { - if (obj is null || GetType() != obj.GetType()) - return false; - - return ((SlowmodeIgnoredUser)obj).UserId == UserId; - } - - // override object.GetHashCode - public override int GetHashCode() - => UserId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/support/PatronQuota.cs b/src/EllieBot/Db/Models/support/PatronQuota.cs deleted file mode 100644 index d493807..0000000 --- a/src/EllieBot/Db/Models/support/PatronQuota.cs +++ /dev/null @@ -1,24 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class PatronUser -{ - public string UniquePlatformUserId { get; set; } - public ulong UserId { get; set; } - public int AmountCents { get; set; } - - public DateTime LastCharge { get; set; } - - // Date Only component - public DateTime ValidThru { get; set; } - - public PatronUser Clone() - => new PatronUser() - { - UniquePlatformUserId = this.UniquePlatformUserId, - UserId = this.UserId, - AmountCents = this.AmountCents, - LastCharge = this.LastCharge, - ValidThru = this.ValidThru - }; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/support/RewardedUser.cs b/src/EllieBot/Db/Models/support/RewardedUser.cs deleted file mode 100644 index bc12bdd..0000000 --- a/src/EllieBot/Db/Models/support/RewardedUser.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class RewardedUser : DbEntity -{ - public ulong UserId { get; set; } - public string PlatformUserId { get; set; } - public long AmountRewardedThisMonth { get; set; } - public DateTime LastReward { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/todo/ArchivedTodoListModel.cs b/src/EllieBot/Db/Models/todo/ArchivedTodoListModel.cs deleted file mode 100644 index b213788..0000000 --- a/src/EllieBot/Db/Models/todo/ArchivedTodoListModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public sealed class ArchivedTodoListModel -{ - public int Id { get; set; } - public ulong UserId { get; set; } - public string Name { get; set; } - public List Items { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/todo/TodoModel.cs b/src/EllieBot/Db/Models/todo/TodoModel.cs deleted file mode 100644 index ba3c8c1..0000000 --- a/src/EllieBot/Db/Models/todo/TodoModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EllieBot.Db.Models; - -#nullable disable -public sealed class TodoModel -{ - public int Id { get; set; } - public ulong UserId { get; set; } - public string Todo { get; set; } - - public DateTime DateAdded { get; set; } - public bool IsDone { get; set; } - public int? ArchiveId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/untimer/UnbanTimer.cs b/src/EllieBot/Db/Models/untimer/UnbanTimer.cs deleted file mode 100644 index 2f61402..0000000 --- a/src/EllieBot/Db/Models/untimer/UnbanTimer.cs +++ /dev/null @@ -1,14 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class UnbanTimer : DbEntity -{ - public ulong UserId { get; set; } - public DateTime UnbanAt { get; set; } - - public override int GetHashCode() - => UserId.GetHashCode(); - - public override bool Equals(object obj) - => obj is UnbanTimer ut ? ut.UserId == UserId : false; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/untimer/UnmuteTimer.cs b/src/EllieBot/Db/Models/untimer/UnmuteTimer.cs deleted file mode 100644 index 18b2903..0000000 --- a/src/EllieBot/Db/Models/untimer/UnmuteTimer.cs +++ /dev/null @@ -1,14 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class UnmuteTimer : DbEntity -{ - public ulong UserId { get; set; } - public DateTime UnmuteAt { get; set; } - - public override int GetHashCode() - => UserId.GetHashCode(); - - public override bool Equals(object obj) - => obj is UnmuteTimer ut ? ut.UserId == UserId : false; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/untimer/UnroleTimer.cs b/src/EllieBot/Db/Models/untimer/UnroleTimer.cs deleted file mode 100644 index 27193c2..0000000 --- a/src/EllieBot/Db/Models/untimer/UnroleTimer.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class UnroleTimer : DbEntity -{ - public ulong UserId { get; set; } - public ulong RoleId { get; set; } - public DateTime UnbanAt { get; set; } - - public override int GetHashCode() - => UserId.GetHashCode() ^ RoleId.GetHashCode(); - - public override bool Equals(object obj) - => obj is UnroleTimer ut ? ut.UserId == UserId && ut.RoleId == RoleId : false; -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/xp/UserXpStats.cs b/src/EllieBot/Db/Models/xp/UserXpStats.cs deleted file mode 100644 index f34ab26..0000000 --- a/src/EllieBot/Db/Models/xp/UserXpStats.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class UserXpStats : DbEntity -{ - public ulong UserId { get; set; } - public ulong GuildId { get; set; } - public long Xp { get; set; } - public long AwardedXp { get; set; } - public XpNotificationLocation NotifyOnLevelUp { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs deleted file mode 100644 index e5c24c7..0000000 --- a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Db.Models; - -public enum XpNotificationLocation -{ - None, - Dm, - Channel -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/xp/XpSettings.cs b/src/EllieBot/Db/Models/xp/XpSettings.cs deleted file mode 100644 index 50fd5be..0000000 --- a/src/EllieBot/Db/Models/xp/XpSettings.cs +++ /dev/null @@ -1,64 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class XpSettings : DbEntity -{ - public int GuildConfigId { get; set; } - public GuildConfig GuildConfig { get; set; } - - public HashSet RoleRewards { get; set; } = new(); - public HashSet CurrencyRewards { get; set; } = new(); - public HashSet ExclusionList { get; set; } = new(); - public bool ServerExcluded { get; set; } -} - -public enum ExcludedItemType { Channel, Role } - -public class XpRoleReward : DbEntity -{ - public int XpSettingsId { get; set; } - public XpSettings XpSettings { get; set; } - - public int Level { get; set; } - public ulong RoleId { get; set; } - - /// - /// Whether the role should be removed (true) or added (false) - /// - public bool Remove { get; set; } - - public override int GetHashCode() - => Level.GetHashCode() ^ XpSettingsId.GetHashCode(); - - public override bool Equals(object obj) - => obj is XpRoleReward xrr && xrr.Level == Level && xrr.XpSettingsId == XpSettingsId; -} - -public class XpCurrencyReward : DbEntity -{ - public int XpSettingsId { get; set; } - public XpSettings XpSettings { get; set; } - - public int Level { get; set; } - public int Amount { get; set; } - - public override int GetHashCode() - => Level.GetHashCode() ^ XpSettingsId.GetHashCode(); - - public override bool Equals(object obj) - => obj is XpCurrencyReward xrr && xrr.Level == Level && xrr.XpSettingsId == XpSettingsId; -} - -public class ExcludedItem : DbEntity -{ - public XpSettings XpSettings { get; set; } - - public ulong ItemId { get; set; } - public ExcludedItemType ItemType { get; set; } - - public override int GetHashCode() - => ItemId.GetHashCode() ^ ItemType.GetHashCode(); - - public override bool Equals(object obj) - => obj is ExcludedItem ei && ei.ItemId == ItemId && ei.ItemType == ItemType; -} \ No newline at end of file diff --git a/src/EllieBot/Db/PostgreSqlContext.cs b/src/EllieBot/Db/PostgreSqlContext.cs deleted file mode 100644 index 2305d19..0000000 --- a/src/EllieBot/Db/PostgreSqlContext.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace EllieBot.Db; - -public sealed class PostgreSqlContext : EllieContext -{ - private readonly string _connStr; - - protected override string CurrencyTransactionOtherIdDefaultValue - => "NULL"; - - public PostgreSqlContext(string connStr = "Host=localhost") - { - _connStr = connStr; - } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); - - base.OnConfiguring(optionsBuilder); - optionsBuilder - .UseLowerCaseNamingConvention() - .UseNpgsql(_connStr); - } -} \ No newline at end of file diff --git a/src/EllieBot/Db/SqliteContext.cs b/src/EllieBot/Db/SqliteContext.cs deleted file mode 100644 index 516d445..0000000 --- a/src/EllieBot/Db/SqliteContext.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.Data.Sqlite; -using Microsoft.EntityFrameworkCore; - -namespace EllieBot.Db; - -public sealed class SqliteContext : EllieContext -{ - private readonly string _connectionString; - - protected override string CurrencyTransactionOtherIdDefaultValue - => "NULL"; - - public SqliteContext(string connectionString = "Data Source=data/EllieBot.db", int commandTimeout = 60) - { - _connectionString = connectionString; - Database.SetCommandTimeout(commandTimeout); - } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - var builder = new SqliteConnectionStringBuilder(_connectionString); - builder.DataSource = Path.Combine(AppContext.BaseDirectory, builder.DataSource); - optionsBuilder.UseSqlite(builder.ToString()); - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/MigrationQueries.cs b/src/EllieBot/Migrations/MigrationQueries.cs deleted file mode 100644 index 93f4249..0000000 --- a/src/EllieBot/Migrations/MigrationQueries.cs +++ /dev/null @@ -1,68 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations; - -public static class MigrationQueries -{ - public static void MigrateRero(MigrationBuilder migrationBuilder) - { - if (migrationBuilder.IsSqlite()) - { - migrationBuilder.Sql( - @"insert or ignore into reactionroles(guildid, channelid, messageid, emote, roleid, 'group', levelreq, dateadded) -select guildid, channelid, messageid, emotename, roleid, exclusive, 0, reactionrolemessage.dateadded -from reactionrole -left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid -left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;"); - } - else if (migrationBuilder.IsNpgsql()) - { - migrationBuilder.Sql( - @"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded) - select guildid, channelid, messageid, emotename, roleid, exclusive::int, 0, reactionrolemessage.dateadded - from reactionrole - left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid - left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id - ON CONFLICT DO NOTHING;"); - } - else - { - throw new NotSupportedException("This database provider doesn't have an implementation for MigrateRero"); - } - } - - public static void GuildConfigCleanup(MigrationBuilder builder) - { - builder.Sql($""" - DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; - DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); - DELETE FROM "StreamRoleBlacklistedUser" WHERE "StreamRoleSettingsId" is NULL; - """); - } - - public static void GreetSettingsCopy(MigrationBuilder builder) - { - builder.Sql(""" - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer - FROM GuildConfigs - WHERE SendChannelGreetMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0 - FROM GuildConfigs - WHERE SendDmGreetMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer - FROM GuildConfigs - WHERE SendChannelByeMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter - FROM GuildConfigs - WHERE SendBoostMessage = TRUE; - """); - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.Designer.cs deleted file mode 100644 index 32cccfb..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.Designer.cs +++ /dev/null @@ -1,3565 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220409170719_mysql-init")] - partial class mysqlinit - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("boolean") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("text") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("integer") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("boolean") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("integer") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("text") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("integer") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs deleted file mode 100644 index 3e0cbc0..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs +++ /dev/null @@ -1,2200 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class mysqlinit : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "autocommands", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - commandtext = table.Column(type: "text", nullable: true), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - channelname = table.Column(type: "text", nullable: true), - guildid = table.Column(type: "numeric(20,0)", nullable: true), - guildname = table.Column(type: "text", nullable: true), - voicechannelid = table.Column(type: "numeric(20,0)", nullable: true), - voicechannelname = table.Column(type: "text", nullable: true), - interval = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autocommands", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "autotranslatechannels", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - autodelete = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autotranslatechannels", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "bantemplates", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - text = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_bantemplates", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "blacklist", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - itemid = table.Column(type: "numeric(20,0)", nullable: false), - type = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_blacklist", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "currencytransactions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - amount = table.Column(type: "bigint", nullable: false), - note = table.Column(type: "text", nullable: true), - userid = table.Column(type: "numeric(20,0)", nullable: false), - type = table.Column(type: "text", nullable: false), - extra = table.Column(type: "text", nullable: false), - otherid = table.Column(type: "numeric(20,0)", nullable: true, defaultValueSql: "NULL"), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_currencytransactions", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "discordpermoverrides", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - perm = table.Column(type: "numeric(20,0)", nullable: false), - guildid = table.Column(type: "numeric(20,0)", nullable: true), - command = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_discordpermoverrides", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "expressions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: true), - response = table.Column(type: "text", nullable: true), - trigger = table.Column(type: "text", nullable: true), - autodeletetrigger = table.Column(type: "boolean", nullable: false), - dmresponse = table.Column(type: "boolean", nullable: false), - containsanywhere = table.Column(type: "boolean", nullable: false), - allowtarget = table.Column(type: "boolean", nullable: false), - reactions = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_expressions", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "guildconfigs", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - prefix = table.Column(type: "text", nullable: true), - deletemessageoncommand = table.Column(type: "boolean", nullable: false), - autoassignroleids = table.Column(type: "text", nullable: true), - autodeletegreetmessagestimer = table.Column(type: "integer", nullable: false), - autodeletebyemessagestimer = table.Column(type: "integer", nullable: false), - greetmessagechannelid = table.Column(type: "numeric(20,0)", nullable: false), - byemessagechannelid = table.Column(type: "numeric(20,0)", nullable: false), - senddmgreetmessage = table.Column(type: "boolean", nullable: false), - dmgreetmessagetext = table.Column(type: "text", nullable: true), - sendchannelgreetmessage = table.Column(type: "boolean", nullable: false), - channelgreetmessagetext = table.Column(type: "text", nullable: true), - sendchannelbyemessage = table.Column(type: "boolean", nullable: false), - channelbyemessagetext = table.Column(type: "text", nullable: true), - exclusiveselfassignedroles = table.Column(type: "boolean", nullable: false), - autodeleteselfassignedrolemessages = table.Column(type: "boolean", nullable: false), - verbosepermissions = table.Column(type: "boolean", nullable: false), - permissionrole = table.Column(type: "text", nullable: true), - filterinvites = table.Column(type: "boolean", nullable: false), - filterlinks = table.Column(type: "boolean", nullable: false), - filterwords = table.Column(type: "boolean", nullable: false), - muterolename = table.Column(type: "text", nullable: true), - cleverbotenabled = table.Column(type: "boolean", nullable: false), - locale = table.Column(type: "text", nullable: true), - timezoneid = table.Column(type: "text", nullable: true), - warningsinitialized = table.Column(type: "boolean", nullable: false), - gamevoicechannel = table.Column(type: "numeric(20,0)", nullable: true), - verboseerrors = table.Column(type: "boolean", nullable: false), - notifystreamoffline = table.Column(type: "boolean", nullable: false), - warnexpirehours = table.Column(type: "integer", nullable: false), - warnexpireaction = table.Column(type: "integer", nullable: false), - sendboostmessage = table.Column(type: "boolean", nullable: false), - boostmessage = table.Column(type: "text", nullable: true), - boostmessagechannelid = table.Column(type: "numeric(20,0)", nullable: false), - boostmessagedeleteafter = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_guildconfigs", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "imageonlychannels", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_imageonlychannels", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "logsettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - logotherid = table.Column(type: "numeric(20,0)", nullable: true), - messageupdatedid = table.Column(type: "numeric(20,0)", nullable: true), - messagedeletedid = table.Column(type: "numeric(20,0)", nullable: true), - userjoinedid = table.Column(type: "numeric(20,0)", nullable: true), - userleftid = table.Column(type: "numeric(20,0)", nullable: true), - userbannedid = table.Column(type: "numeric(20,0)", nullable: true), - userunbannedid = table.Column(type: "numeric(20,0)", nullable: true), - userupdatedid = table.Column(type: "numeric(20,0)", nullable: true), - channelcreatedid = table.Column(type: "numeric(20,0)", nullable: true), - channeldestroyedid = table.Column(type: "numeric(20,0)", nullable: true), - channelupdatedid = table.Column(type: "numeric(20,0)", nullable: true), - usermutedid = table.Column(type: "numeric(20,0)", nullable: true), - loguserpresenceid = table.Column(type: "numeric(20,0)", nullable: true), - logvoicepresenceid = table.Column(type: "numeric(20,0)", nullable: true), - logvoicepresencettsid = table.Column(type: "numeric(20,0)", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_logsettings", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "musicplayersettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - playerrepeat = table.Column(type: "integer", nullable: false), - musicchannelid = table.Column(type: "numeric(20,0)", nullable: true), - volume = table.Column(type: "integer", nullable: false, defaultValue: 100), - autodisconnect = table.Column(type: "boolean", nullable: false), - qualitypreset = table.Column(type: "integer", nullable: false), - autoplay = table.Column(type: "boolean", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_musicplayersettings", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "musicplaylists", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "text", nullable: true), - author = table.Column(type: "text", nullable: true), - authorid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_musicplaylists", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "nsfwblacklistedtags", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - tag = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "plantedcurrency", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - amount = table.Column(type: "bigint", nullable: false), - password = table.Column(type: "text", nullable: true), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - userid = table.Column(type: "numeric(20,0)", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_plantedcurrency", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "poll", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - question = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_poll", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "quotes", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - keyword = table.Column(type: "text", nullable: false), - authorname = table.Column(type: "text", nullable: false), - authorid = table.Column(type: "numeric(20,0)", nullable: false), - text = table.Column(type: "text", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_quotes", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "reminders", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - when = table.Column(type: "timestamp with time zone", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - serverid = table.Column(type: "numeric(20,0)", nullable: false), - userid = table.Column(type: "numeric(20,0)", nullable: false), - message = table.Column(type: "text", nullable: true), - isprivate = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reminders", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "repeaters", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - lastmessageid = table.Column(type: "numeric(20,0)", nullable: true), - message = table.Column(type: "text", nullable: true), - interval = table.Column(type: "interval", nullable: false), - starttimeofday = table.Column(type: "interval", nullable: true), - noredundant = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_repeaters", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "rewardedusers", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - patreonuserid = table.Column(type: "text", nullable: true), - amountrewardedthismonth = table.Column(type: "integer", nullable: false), - lastreward = table.Column(type: "timestamp with time zone", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_rewardedusers", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "rotatingstatus", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - status = table.Column(type: "text", nullable: true), - type = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_rotatingstatus", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "selfassignableroles", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - group = table.Column(type: "integer", nullable: false, defaultValue: 0), - levelrequirement = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_selfassignableroles", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "userxpstats", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - xp = table.Column(type: "integer", nullable: false), - awardedxp = table.Column(type: "integer", nullable: false), - notifyonlevelup = table.Column(type: "integer", nullable: false), - lastlevelup = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "timezone('utc', now())"), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_userxpstats", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "warnings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - userid = table.Column(type: "numeric(20,0)", nullable: false), - reason = table.Column(type: "text", nullable: true), - forgiven = table.Column(type: "boolean", nullable: false), - forgivenby = table.Column(type: "text", nullable: true), - moderator = table.Column(type: "text", nullable: true), - weight = table.Column(type: "bigint", nullable: false, defaultValue: 1L), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_warnings", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "autotranslateusers", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "integer", nullable: false), - userid = table.Column(type: "numeric(20,0)", nullable: false), - source = table.Column(type: "text", nullable: true), - target = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autotranslateusers", x => x.id); - table.UniqueConstraint("ak_autotranslateusers_channelid_userid", x => new { x.channelid, x.userid }); - table.ForeignKey( - name: "fk_autotranslateusers_autotranslatechannels_channelid", - column: x => x.channelid, - principalTable: "autotranslatechannels", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "antialtsetting", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - minage = table.Column(type: "interval", nullable: false), - action = table.Column(type: "integer", nullable: false), - actiondurationminutes = table.Column(type: "integer", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antialtsetting", x => x.id); - table.ForeignKey( - name: "fk_antialtsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "antiraidsetting", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - userthreshold = table.Column(type: "integer", nullable: false), - seconds = table.Column(type: "integer", nullable: false), - action = table.Column(type: "integer", nullable: false), - punishduration = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antiraidsetting", x => x.id); - table.ForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "antispamsetting", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - action = table.Column(type: "integer", nullable: false), - messagethreshold = table.Column(type: "integer", nullable: false), - mutetime = table.Column(type: "integer", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antispamsetting", x => x.id); - table.ForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "commandalias", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - trigger = table.Column(type: "text", nullable: true), - mapping = table.Column(type: "text", nullable: true), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_commandalias", x => x.id); - table.ForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "commandcooldown", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - seconds = table.Column(type: "integer", nullable: false), - commandname = table.Column(type: "text", nullable: true), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_commandcooldown", x => x.id); - table.ForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "delmsgoncmdchannel", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - state = table.Column(type: "boolean", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_delmsgoncmdchannel", x => x.id); - table.ForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "feedsub", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - url = table.Column(type: "text", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_feedsub", x => x.id); - table.UniqueConstraint("ak_feedsub_guildconfigid_url", x => new { x.guildconfigid, x.url }); - table.ForeignKey( - name: "fk_feedsub_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "filterchannelid", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterchannelid", x => x.id); - table.ForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "filteredword", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - word = table.Column(type: "text", nullable: true), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filteredword", x => x.id); - table.ForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "filterlinkschannelid", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterlinkschannelid", x => x.id); - table.ForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "filterwordschannelid", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_filterwordschannelid", x => x.id); - table.ForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "followedstream", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - username = table.Column(type: "text", nullable: true), - type = table.Column(type: "integer", nullable: false), - message = table.Column(type: "text", nullable: true), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_followedstream", x => x.id); - table.ForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "gcchannelid", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: true), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_gcchannelid", x => x.id); - table.ForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "groupname", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - number = table.Column(type: "integer", nullable: false), - name = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_groupname", x => x.id); - table.ForeignKey( - name: "fk_groupname_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "muteduserid", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_muteduserid", x => x.id); - table.ForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "permissions", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: true), - index = table.Column(type: "integer", nullable: false), - primarytarget = table.Column(type: "integer", nullable: false), - primarytargetid = table.Column(type: "numeric(20,0)", nullable: false), - secondarytarget = table.Column(type: "integer", nullable: false), - secondarytargetname = table.Column(type: "text", nullable: true), - iscustomcommand = table.Column(type: "boolean", nullable: false), - state = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_permissions", x => x.id); - table.ForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "reactionrolemessage", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - index = table.Column(type: "integer", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false), - exclusive = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrolemessage", x => x.id); - table.ForeignKey( - name: "fk_reactionrolemessage_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "shopentry", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - index = table.Column(type: "integer", nullable: false), - price = table.Column(type: "integer", nullable: false), - name = table.Column(type: "text", nullable: true), - authorid = table.Column(type: "numeric(20,0)", nullable: false), - type = table.Column(type: "integer", nullable: false), - rolename = table.Column(type: "text", nullable: true), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_shopentry", x => x.id); - table.ForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "slowmodeignoredrole", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_slowmodeignoredrole", x => x.id); - table.ForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "slowmodeignoreduser", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_slowmodeignoreduser", x => x.id); - table.ForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "streamrolesettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - enabled = table.Column(type: "boolean", nullable: false), - addroleid = table.Column(type: "numeric(20,0)", nullable: false), - fromroleid = table.Column(type: "numeric(20,0)", nullable: false), - keyword = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamrolesettings", x => x.id); - table.ForeignKey( - name: "fk_streamrolesettings_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "unbantimer", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - unbanat = table.Column(type: "timestamp with time zone", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unbantimer", x => x.id); - table.ForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "unmutetimer", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - unmuteat = table.Column(type: "timestamp with time zone", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unmutetimer", x => x.id); - table.ForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "unroletimer", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - unbanat = table.Column(type: "timestamp with time zone", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_unroletimer", x => x.id); - table.ForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "vcroleinfo", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - voicechannelid = table.Column(type: "numeric(20,0)", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_vcroleinfo", x => x.id); - table.ForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "warningpunishment", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - count = table.Column(type: "integer", nullable: false), - punishment = table.Column(type: "integer", nullable: false), - time = table.Column(type: "integer", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: true), - guildconfigid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_warningpunishment", x => x.id); - table.ForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "xpsettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - serverexcluded = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpsettings", x => x.id); - table.ForeignKey( - name: "fk_xpsettings_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ignoredlogchannels", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - logsettingid = table.Column(type: "integer", nullable: false), - logitemid = table.Column(type: "numeric(20,0)", nullable: false), - itemtype = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredlogchannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredlogchannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ignoredvoicepresencechannels", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - logsettingid = table.Column(type: "integer", nullable: true), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "playlistsong", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - provider = table.Column(type: "text", nullable: true), - providertype = table.Column(type: "integer", nullable: false), - title = table.Column(type: "text", nullable: true), - uri = table.Column(type: "text", nullable: true), - query = table.Column(type: "text", nullable: true), - musicplaylistid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_playlistsong", x => x.id); - table.ForeignKey( - name: "fk_playlistsong_musicplaylists_musicplaylistid", - column: x => x.musicplaylistid, - principalTable: "musicplaylists", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "pollanswer", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - index = table.Column(type: "integer", nullable: false), - text = table.Column(type: "text", nullable: true), - pollid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_pollanswer", x => x.id); - table.ForeignKey( - name: "fk_pollanswer_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "pollvote", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - voteindex = table.Column(type: "integer", nullable: false), - pollid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_pollvote", x => x.id); - table.ForeignKey( - name: "fk_pollvote_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "antispamignore", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - antispamsettingid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_antispamignore", x => x.id); - table.ForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - column: x => x.antispamsettingid, - principalTable: "antispamsetting", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "reactionrole", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - emotename = table.Column(type: "text", nullable: true), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - reactionrolemessageid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrole", x => x.id); - table.ForeignKey( - name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", - column: x => x.reactionrolemessageid, - principalTable: "reactionrolemessage", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "shopentryitem", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - text = table.Column(type: "text", nullable: true), - shopentryid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_shopentryitem", x => x.id); - table.ForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - column: x => x.shopentryid, - principalTable: "shopentry", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "streamroleblacklisteduser", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - username = table.Column(type: "text", nullable: true), - streamrolesettingsid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamroleblacklisteduser", x => x.id); - table.ForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~", - column: x => x.streamrolesettingsid, - principalTable: "streamrolesettings", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "streamrolewhitelisteduser", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - username = table.Column(type: "text", nullable: true), - streamrolesettingsid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamrolewhitelisteduser", x => x.id); - table.ForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~", - column: x => x.streamrolesettingsid, - principalTable: "streamrolesettings", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "excludeditem", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - itemid = table.Column(type: "numeric(20,0)", nullable: false), - itemtype = table.Column(type: "integer", nullable: false), - xpsettingsid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_excludeditem", x => x.id); - table.ForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "xpcurrencyreward", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - xpsettingsid = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: false), - amount = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpcurrencyreward", x => x.id); - table.ForeignKey( - name: "fk_xpcurrencyreward_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "xprolereward", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - xpsettingsid = table.Column(type: "integer", nullable: false), - level = table.Column(type: "integer", nullable: false), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - remove = table.Column(type: "boolean", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xprolereward", x => x.id); - table.ForeignKey( - name: "fk_xprolereward_xpsettings_xpsettingsid", - column: x => x.xpsettingsid, - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "clubapplicants", - columns: table => new - { - clubid = table.Column(type: "integer", nullable: false), - userid = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_clubapplicants", x => new { x.clubid, x.userid }); - }); - - migrationBuilder.CreateTable( - name: "clubbans", - columns: table => new - { - clubid = table.Column(type: "integer", nullable: false), - userid = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_clubbans", x => new { x.clubid, x.userid }); - }); - - migrationBuilder.CreateTable( - name: "clubs", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - name = table.Column(type: "character varying(20)", maxLength: 20, nullable: false), - description = table.Column(type: "text", nullable: true), - imageurl = table.Column(type: "text", nullable: true), - xp = table.Column(type: "integer", nullable: false), - ownerid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_clubs", x => x.id); - table.UniqueConstraint("ak_clubs_name", x => x.name); - }); - - migrationBuilder.CreateTable( - name: "discorduser", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - username = table.Column(type: "text", nullable: true), - discriminator = table.Column(type: "text", nullable: true), - avatarid = table.Column(type: "text", nullable: true), - clubid = table.Column(type: "integer", nullable: true), - isclubadmin = table.Column(type: "boolean", nullable: false, defaultValue: false), - totalxp = table.Column(type: "integer", nullable: false, defaultValue: 0), - lastlevelup = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "timezone('utc', now())"), - lastxpgain = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "timezone('utc', now()) - interval '-1 year'"), - notifyonlevelup = table.Column(type: "integer", nullable: false, defaultValue: 0), - currencyamount = table.Column(type: "bigint", nullable: false, defaultValue: 0L), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_discorduser", x => x.id); - table.UniqueConstraint("ak_discorduser_userid", x => x.userid); - table.ForeignKey( - name: "fk_discorduser_clubs_clubid", - column: x => x.clubid, - principalTable: "clubs", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "waifuinfo", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - waifuid = table.Column(type: "integer", nullable: false), - claimerid = table.Column(type: "integer", nullable: true), - affinityid = table.Column(type: "integer", nullable: true), - price = table.Column(type: "bigint", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuinfo", x => x.id); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_affinityid", - column: x => x.affinityid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_claimerid", - column: x => x.claimerid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuinfo_discorduser_waifuid", - column: x => x.waifuid, - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "waifuupdates", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "integer", nullable: false), - updatetype = table.Column(type: "integer", nullable: false), - oldid = table.Column(type: "integer", nullable: true), - newid = table.Column(type: "integer", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuupdates", x => x.id); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_newid", - column: x => x.newid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_oldid", - column: x => x.oldid, - principalTable: "discorduser", - principalColumn: "id"); - table.ForeignKey( - name: "fk_waifuupdates_discorduser_userid", - column: x => x.userid, - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "waifuitem", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - waifuinfoid = table.Column(type: "integer", nullable: true), - itememoji = table.Column(type: "text", nullable: true), - name = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_waifuitem", x => x.id); - table.ForeignKey( - name: "fk_waifuitem_waifuinfo_waifuinfoid", - column: x => x.waifuinfoid, - principalTable: "waifuinfo", - principalColumn: "id"); - }); - - migrationBuilder.CreateIndex( - name: "ix_antialtsetting_guildconfigid", - table: "antialtsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_antiraidsetting_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_antispamignore_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid"); - - migrationBuilder.CreateIndex( - name: "ix_antispamsetting_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_autotranslatechannels_channelid", - table: "autotranslatechannels", - column: "channelid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_autotranslatechannels_guildid", - table: "autotranslatechannels", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_bantemplates_guildid", - table: "bantemplates", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_clubapplicants_userid", - table: "clubapplicants", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_clubbans_userid", - table: "clubbans", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_clubs_ownerid", - table: "clubs", - column: "ownerid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_commandalias_guildconfigid", - table: "commandalias", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_commandcooldown_guildconfigid", - table: "commandcooldown", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_currencytransactions_userid", - table: "currencytransactions", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_delmsgoncmdchannel_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_discordpermoverrides_guildid_command", - table: "discordpermoverrides", - columns: new[] { "guildid", "command" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_clubid", - table: "discorduser", - column: "clubid"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_currencyamount", - table: "discorduser", - column: "currencyamount"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_totalxp", - table: "discorduser", - column: "totalxp"); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_userid", - table: "discorduser", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_excludeditem_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_filterchannelid_guildconfigid", - table: "filterchannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filteredword_guildconfigid", - table: "filteredword", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filterlinkschannelid_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_filterwordschannelid_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_followedstream_guildconfigid", - table: "followedstream", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_gcchannelid_guildconfigid", - table: "gcchannelid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_groupname_guildconfigid_number", - table: "groupname", - columns: new[] { "guildconfigid", "number" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_guildconfigs_guildid", - table: "guildconfigs", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_guildconfigs_warnexpirehours", - table: "guildconfigs", - column: "warnexpirehours"); - - migrationBuilder.CreateIndex( - name: "ix_ignoredlogchannels_logsettingid_logitemid_itemtype", - table: "ignoredlogchannels", - columns: new[] { "logsettingid", "logitemid", "itemtype" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_ignoredvoicepresencechannels_logsettingid", - table: "ignoredvoicepresencechannels", - column: "logsettingid"); - - migrationBuilder.CreateIndex( - name: "ix_imageonlychannels_channelid", - table: "imageonlychannels", - column: "channelid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_logsettings_guildid", - table: "logsettings", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_musicplayersettings_guildid", - table: "musicplayersettings", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_muteduserid_guildconfigid", - table: "muteduserid", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_nsfwblacklistedtags_guildid", - table: "nsfwblacklistedtags", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_permissions_guildconfigid", - table: "permissions", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_plantedcurrency_channelid", - table: "plantedcurrency", - column: "channelid"); - - migrationBuilder.CreateIndex( - name: "ix_plantedcurrency_messageid", - table: "plantedcurrency", - column: "messageid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_playlistsong_musicplaylistid", - table: "playlistsong", - column: "musicplaylistid"); - - migrationBuilder.CreateIndex( - name: "ix_poll_guildid", - table: "poll", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_pollanswer_pollid", - table: "pollanswer", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_pollvote_pollid", - table: "pollvote", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_quotes_guildid", - table: "quotes", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_quotes_keyword", - table: "quotes", - column: "keyword"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrole_reactionrolemessageid", - table: "reactionrole", - column: "reactionrolemessageid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrolemessage_guildconfigid", - table: "reactionrolemessage", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_reminders_when", - table: "reminders", - column: "when"); - - migrationBuilder.CreateIndex( - name: "ix_rewardedusers_patreonuserid", - table: "rewardedusers", - column: "patreonuserid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_selfassignableroles_guildid_roleid", - table: "selfassignableroles", - columns: new[] { "guildid", "roleid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_shopentry_guildconfigid", - table: "shopentry", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_shopentryitem_shopentryid", - table: "shopentryitem", - column: "shopentryid"); - - migrationBuilder.CreateIndex( - name: "ix_slowmodeignoredrole_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_slowmodeignoreduser_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_streamroleblacklisteduser_streamrolesettingsid", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_streamrolesettings_guildconfigid", - table: "streamrolesettings", - column: "guildconfigid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_streamrolewhitelisteduser_streamrolesettingsid", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_unbantimer_guildconfigid", - table: "unbantimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_unmutetimer_guildconfigid", - table: "unmutetimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_unroletimer_guildconfigid", - table: "unroletimer", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_awardedxp", - table: "userxpstats", - column: "awardedxp"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_guildid", - table: "userxpstats", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_userid", - table: "userxpstats", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_userid_guildid", - table: "userxpstats", - columns: new[] { "userid", "guildid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_userxpstats_xp", - table: "userxpstats", - column: "xp"); - - migrationBuilder.CreateIndex( - name: "ix_vcroleinfo_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_affinityid", - table: "waifuinfo", - column: "affinityid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_claimerid", - table: "waifuinfo", - column: "claimerid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_price", - table: "waifuinfo", - column: "price"); - - migrationBuilder.CreateIndex( - name: "ix_waifuinfo_waifuid", - table: "waifuinfo", - column: "waifuid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_waifuitem_waifuinfoid", - table: "waifuitem", - column: "waifuinfoid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_newid", - table: "waifuupdates", - column: "newid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_oldid", - table: "waifuupdates", - column: "oldid"); - - migrationBuilder.CreateIndex( - name: "ix_waifuupdates_userid", - table: "waifuupdates", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_warningpunishment_guildconfigid", - table: "warningpunishment", - column: "guildconfigid"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_dateadded", - table: "warnings", - column: "dateadded"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_guildid", - table: "warnings", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_warnings_userid", - table: "warnings", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_xpcurrencyreward_xpsettingsid", - table: "xpcurrencyreward", - column: "xpsettingsid"); - - migrationBuilder.CreateIndex( - name: "ix_xprolereward_xpsettingsid_level", - table: "xprolereward", - columns: new[] { "xpsettingsid", "level" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_xpsettings_guildconfigid", - table: "xpsettings", - column: "guildconfigid", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_clubapplicants_clubs_clubid", - table: "clubapplicants", - column: "clubid", - principalTable: "clubs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubapplicants_discorduser_userid", - table: "clubapplicants", - column: "userid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubbans_clubs_clubid", - table: "clubbans", - column: "clubid", - principalTable: "clubs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubbans_discorduser_userid", - table: "clubbans", - column: "userid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_clubs_discorduser_ownerid", - table: "clubs", - column: "ownerid", - principalTable: "discorduser", - principalColumn: "id", - onDelete: ReferentialAction.SetNull); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_discorduser_clubs_clubid", - table: "discorduser"); - - migrationBuilder.DropTable( - name: "antialtsetting"); - - migrationBuilder.DropTable( - name: "antiraidsetting"); - - migrationBuilder.DropTable( - name: "antispamignore"); - - migrationBuilder.DropTable( - name: "autocommands"); - - migrationBuilder.DropTable( - name: "autotranslateusers"); - - migrationBuilder.DropTable( - name: "bantemplates"); - - migrationBuilder.DropTable( - name: "blacklist"); - - migrationBuilder.DropTable( - name: "clubapplicants"); - - migrationBuilder.DropTable( - name: "clubbans"); - - migrationBuilder.DropTable( - name: "commandalias"); - - migrationBuilder.DropTable( - name: "commandcooldown"); - - migrationBuilder.DropTable( - name: "currencytransactions"); - - migrationBuilder.DropTable( - name: "delmsgoncmdchannel"); - - migrationBuilder.DropTable( - name: "discordpermoverrides"); - - migrationBuilder.DropTable( - name: "excludeditem"); - - migrationBuilder.DropTable( - name: "expressions"); - - migrationBuilder.DropTable( - name: "feedsub"); - - migrationBuilder.DropTable( - name: "filterchannelid"); - - migrationBuilder.DropTable( - name: "filteredword"); - - migrationBuilder.DropTable( - name: "filterlinkschannelid"); - - migrationBuilder.DropTable( - name: "filterwordschannelid"); - - migrationBuilder.DropTable( - name: "followedstream"); - - migrationBuilder.DropTable( - name: "gcchannelid"); - - migrationBuilder.DropTable( - name: "groupname"); - - migrationBuilder.DropTable( - name: "ignoredlogchannels"); - - migrationBuilder.DropTable( - name: "ignoredvoicepresencechannels"); - - migrationBuilder.DropTable( - name: "imageonlychannels"); - - migrationBuilder.DropTable( - name: "musicplayersettings"); - - migrationBuilder.DropTable( - name: "muteduserid"); - - migrationBuilder.DropTable( - name: "nsfwblacklistedtags"); - - migrationBuilder.DropTable( - name: "permissions"); - - migrationBuilder.DropTable( - name: "plantedcurrency"); - - migrationBuilder.DropTable( - name: "playlistsong"); - - migrationBuilder.DropTable( - name: "pollanswer"); - - migrationBuilder.DropTable( - name: "pollvote"); - - migrationBuilder.DropTable( - name: "quotes"); - - migrationBuilder.DropTable( - name: "reactionrole"); - - migrationBuilder.DropTable( - name: "reminders"); - - migrationBuilder.DropTable( - name: "repeaters"); - - migrationBuilder.DropTable( - name: "rewardedusers"); - - migrationBuilder.DropTable( - name: "rotatingstatus"); - - migrationBuilder.DropTable( - name: "selfassignableroles"); - - migrationBuilder.DropTable( - name: "shopentryitem"); - - migrationBuilder.DropTable( - name: "slowmodeignoredrole"); - - migrationBuilder.DropTable( - name: "slowmodeignoreduser"); - - migrationBuilder.DropTable( - name: "streamroleblacklisteduser"); - - migrationBuilder.DropTable( - name: "streamrolewhitelisteduser"); - - migrationBuilder.DropTable( - name: "unbantimer"); - - migrationBuilder.DropTable( - name: "unmutetimer"); - - migrationBuilder.DropTable( - name: "unroletimer"); - - migrationBuilder.DropTable( - name: "userxpstats"); - - migrationBuilder.DropTable( - name: "vcroleinfo"); - - migrationBuilder.DropTable( - name: "waifuitem"); - - migrationBuilder.DropTable( - name: "waifuupdates"); - - migrationBuilder.DropTable( - name: "warningpunishment"); - - migrationBuilder.DropTable( - name: "warnings"); - - migrationBuilder.DropTable( - name: "xpcurrencyreward"); - - migrationBuilder.DropTable( - name: "xprolereward"); - - migrationBuilder.DropTable( - name: "antispamsetting"); - - migrationBuilder.DropTable( - name: "autotranslatechannels"); - - migrationBuilder.DropTable( - name: "logsettings"); - - migrationBuilder.DropTable( - name: "musicplaylists"); - - migrationBuilder.DropTable( - name: "poll"); - - migrationBuilder.DropTable( - name: "reactionrolemessage"); - - migrationBuilder.DropTable( - name: "shopentry"); - - migrationBuilder.DropTable( - name: "streamrolesettings"); - - migrationBuilder.DropTable( - name: "waifuinfo"); - - migrationBuilder.DropTable( - name: "xpsettings"); - - migrationBuilder.DropTable( - name: "guildconfigs"); - - migrationBuilder.DropTable( - name: "clubs"); - - migrationBuilder.DropTable( - name: "discorduser"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.Designer.cs deleted file mode 100644 index 296f158..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.Designer.cs +++ /dev/null @@ -1,3569 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220428044547_stondel")] - partial class stondel - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("boolean") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("text") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("integer") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("boolean") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("integer") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("text") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("integer") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.cs b/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.cs deleted file mode 100644 index 4a2b544..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220428044547_stondel.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class stondel : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "deletestreamonlinemessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "deletestreamonlinemessage", - table: "guildconfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.Designer.cs deleted file mode 100644 index 2368670..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.Designer.cs +++ /dev/null @@ -1,3600 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220429044808_bank")] - partial class bank - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("boolean") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("EmoteName") - .HasColumnType("text") - .HasColumnName("emotename"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("integer") - .HasColumnName("reactionrolemessageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionrole"); - - b.HasIndex("ReactionRoleMessageId") - .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); - - b.ToTable("reactionrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Exclusive") - .HasColumnType("boolean") - .HasColumnName("exclusive"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_reactionrolemessage"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); - - b.ToTable("reactionrolemessage", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("integer") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("text") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("integer") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs deleted file mode 100644 index 4f0a4a5..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class bank : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "bankusers", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - balance = table.Column(type: "bigint", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_bankusers", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_bankusers_userid", - table: "bankusers", - column: "userid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "bankusers"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.Designer.cs deleted file mode 100644 index 24c7cdb..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.Designer.cs +++ /dev/null @@ -1,3551 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220504162457_new-rero")] - partial class newrero - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .HasColumnType("boolean") - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("integer") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PatreonUserId") - .HasColumnType("text") - .HasColumnName("patreonuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PatreonUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_patreonuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("integer") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs deleted file mode 100644 index 7185c09..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs +++ /dev/null @@ -1,114 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class newrero : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "reactionroles", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false), - emote = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - roleid = table.Column(type: "numeric(20,0)", nullable: false), - group = table.Column(type: "integer", nullable: false), - levelreq = table.Column(type: "integer", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionroles", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_reactionroles_guildid", - table: "reactionroles", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionroles_messageid_emote", - table: "reactionroles", - columns: new[] { "messageid", "emote" }, - unique: true); - - MigrationQueries.MigrateRero(migrationBuilder); - - migrationBuilder.DropTable( - name: "reactionrole"); - - migrationBuilder.DropTable( - name: "reactionrolemessage"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "reactionroles"); - - migrationBuilder.CreateTable( - name: "reactionrolemessage", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildconfigid = table.Column(type: "integer", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true), - exclusive = table.Column(type: "boolean", nullable: false), - index = table.Column(type: "integer", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrolemessage", x => x.id); - table.ForeignKey( - name: "fk_reactionrolemessage_guildconfigs_guildconfigid", - column: x => x.guildconfigid, - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "reactionrole", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - dateadded = table.Column(type: "timestamp with time zone", nullable: true), - emotename = table.Column(type: "text", nullable: true), - reactionrolemessageid = table.Column(type: "integer", nullable: true), - roleid = table.Column(type: "numeric(20,0)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_reactionrole", x => x.id); - table.ForeignKey( - name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", - column: x => x.reactionrolemessageid, - principalTable: "reactionrolemessage", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_reactionrole_reactionrolemessageid", - table: "reactionrole", - column: "reactionrolemessageid"); - - migrationBuilder.CreateIndex( - name: "ix_reactionrolemessage_guildconfigid", - table: "reactionrolemessage", - column: "guildconfigid"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.Designer.cs deleted file mode 100644 index 7f9e828..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.Designer.cs +++ /dev/null @@ -1,3621 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220614071421_patronage-system")] - partial class patronagesystem - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.5") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp with time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs deleted file mode 100644 index b8fcc2c..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs +++ /dev/null @@ -1,169 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class patronagesystem : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "patreonuserid", - table: "rewardedusers", - newName: "platformuserid"); - - migrationBuilder.RenameIndex( - name: "ix_rewardedusers_patreonuserid", - table: "rewardedusers", - newName: "ix_rewardedusers_platformuserid"); - - migrationBuilder.AlterColumn( - name: "xp", - table: "userxpstats", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AlterColumn( - name: "awardedxp", - table: "userxpstats", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AlterColumn( - name: "amountrewardedthismonth", - table: "rewardedusers", - type: "bigint", - nullable: false, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AlterColumn( - name: "verboseerrors", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: true, - oldClrType: typeof(bool), - oldType: "boolean"); - - migrationBuilder.AlterColumn( - name: "totalxp", - table: "discorduser", - type: "bigint", - nullable: false, - defaultValue: 0L, - oldClrType: typeof(int), - oldType: "integer", - oldDefaultValue: 0); - - migrationBuilder.CreateTable( - name: "patronquotas", - columns: table => new - { - userid = table.Column(type: "numeric(20,0)", nullable: false), - featuretype = table.Column(type: "integer", nullable: false), - feature = table.Column(type: "text", nullable: false), - hourlycount = table.Column(type: "bigint", nullable: false), - dailycount = table.Column(type: "bigint", nullable: false), - monthlycount = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); - }); - - migrationBuilder.CreateTable( - name: "patrons", - columns: table => new - { - userid = table.Column(type: "numeric(20,0)", nullable: false), - uniqueplatformuserid = table.Column(type: "text", nullable: true), - amountcents = table.Column(type: "integer", nullable: false), - lastcharge = table.Column(type: "timestamp with time zone", nullable: false), - validthru = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patrons", x => x.userid); - }); - - migrationBuilder.CreateIndex( - name: "ix_patronquotas_userid", - table: "patronquotas", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "ix_patrons_uniqueplatformuserid", - table: "patrons", - column: "uniqueplatformuserid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "patronquotas"); - - migrationBuilder.DropTable( - name: "patrons"); - - migrationBuilder.RenameColumn( - name: "platformuserid", - table: "rewardedusers", - newName: "patreonuserid"); - - migrationBuilder.RenameIndex( - name: "ix_rewardedusers_platformuserid", - table: "rewardedusers", - newName: "ix_rewardedusers_patreonuserid"); - - migrationBuilder.AlterColumn( - name: "xp", - table: "userxpstats", - type: "integer", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "awardedxp", - table: "userxpstats", - type: "integer", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "amountrewardedthismonth", - table: "rewardedusers", - type: "integer", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint"); - - migrationBuilder.AlterColumn( - name: "verboseerrors", - table: "guildconfigs", - type: "boolean", - nullable: false, - oldClrType: typeof(bool), - oldType: "boolean", - oldDefaultValue: true); - - migrationBuilder.AlterColumn( - name: "totalxp", - table: "discorduser", - type: "integer", - nullable: false, - defaultValue: 0, - oldClrType: typeof(long), - oldType: "bigint", - oldDefaultValue: 0L); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.Designer.cs deleted file mode 100644 index b8ec8ea..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.Designer.cs +++ /dev/null @@ -1,3656 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220623090729_stondel-db-cache")] - partial class stondeldbcache - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp with time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs deleted file mode 100644 index eed96a7..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class stondeldbcache : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "streamonlinemessages", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false), - type = table.Column(type: "integer", nullable: false), - name = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_streamonlinemessages", x => x.id); - }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "streamonlinemessages"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.Designer.cs deleted file mode 100644 index 2c19566..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.Designer.cs +++ /dev/null @@ -1,3660 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220703194412_logwarns")] - partial class logwarns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp with time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.cs b/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.cs deleted file mode 100644 index b16e187..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220703194412_logwarns.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class logwarns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "logwarnsid", - table: "logsettings", - type: "numeric(20,0)", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "logwarnsid", - table: "logsettings"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.Designer.cs deleted file mode 100644 index 0ad20f8..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.Designer.cs +++ /dev/null @@ -1,3700 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220725155941_xpitemshop")] - partial class xpitemshop - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp with time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs deleted file mode 100644 index 258dc4c..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class xpitemshop : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "xpshopowneditem", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - itemtype = table.Column(type: "integer", nullable: false), - isusing = table.Column(type: "boolean", nullable: false), - itemkey = table.Column(type: "text", nullable: false), - dateadded = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_xpshopowneditem", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_xpshopowneditem_userid_itemtype_itemkey", - table: "xpshopowneditem", - columns: new[] { "userid", "itemtype", "itemkey" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "xpshopowneditem"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.Designer.cs deleted file mode 100644 index a6d9203..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.Designer.cs +++ /dev/null @@ -1,3704 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220727033944_linkonly-channels")] - partial class linkonlychannels - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastxpgain") - .HasDefaultValueSql("timezone('utc', now()) - interval '-1 year'"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp with time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp with time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp with time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasColumnName("lastlevelup") - .HasDefaultValueSql("timezone('utc', now())"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp with time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.cs b/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.cs deleted file mode 100644 index 958fffa..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220727033944_linkonly-channels.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class linkonlychannels : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "type", - table: "imageonlychannels", - type: "integer", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "type", - table: "imageonlychannels"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs deleted file mode 100644 index 60ef9a6..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.Designer.cs +++ /dev/null @@ -1,3686 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220808142559_remove-obsolete-xp-columns")] - partial class removeobsoletexpcolumns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs deleted file mode 100644 index 64f3334..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs +++ /dev/null @@ -1,1400 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class removeobsoletexpcolumns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "lastlevelup", - table: "userxpstats"); - - migrationBuilder.DropColumn( - name: "lastlevelup", - table: "discorduser"); - - migrationBuilder.DropColumn( - name: "lastxpgain", - table: "discorduser"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpshopowneditem", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpsettings", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xprolereward", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpcurrencyreward", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "warnings", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "warningpunishment", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuupdates", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuitem", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuinfo", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "vcroleinfo", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "userxpstats", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "unbanat", - table: "unroletimer", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unroletimer", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "unmuteat", - table: "unmutetimer", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unmutetimer", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "unbanat", - table: "unbantimer", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unbantimer", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamrolewhitelisteduser", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamrolesettings", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamroleblacklisteduser", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamonlinemessages", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "slowmodeignoreduser", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "slowmodeignoredrole", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "shopentryitem", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "shopentry", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "selfassignableroles", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "rotatingstatus", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "lastreward", - table: "rewardedusers", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "rewardedusers", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "repeaters", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "when", - table: "reminders", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "reminders", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "reactionroles", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "quotes", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "pollvote", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "pollanswer", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "poll", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "playlistsong", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "plantedcurrency", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "permissions", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "validthru", - table: "patrons", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "lastcharge", - table: "patrons", - type: "timestamp without time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "nsfwblacklistedtags", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "muteduserid", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "musicplaylists", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "logsettings", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "imageonlychannels", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "ignoredvoicepresencechannels", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "ignoredlogchannels", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "guildconfigs", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "groupname", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "gcchannelid", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "followedstream", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterwordschannelid", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterlinkschannelid", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filteredword", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterchannelid", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "feedsub", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "expressions", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "excludeditem", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "discorduser", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "discordpermoverrides", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "delmsgoncmdchannel", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "currencytransactions", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "commandcooldown", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "commandalias", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "clubs", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "blacklist", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "bantemplates", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "bankusers", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autotranslateusers", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autotranslatechannels", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autocommands", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antispamsetting", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antispamignore", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antiraidsetting", - type: "timestamp without time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpshopowneditem", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpsettings", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xprolereward", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "xpcurrencyreward", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "warnings", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "warningpunishment", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuupdates", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuitem", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "waifuinfo", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "vcroleinfo", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "userxpstats", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "lastlevelup", - table: "userxpstats", - type: "timestamp with time zone", - nullable: false, - defaultValueSql: "timezone('utc', now())"); - - migrationBuilder.AlterColumn( - name: "unbanat", - table: "unroletimer", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unroletimer", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "unmuteat", - table: "unmutetimer", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unmutetimer", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "unbanat", - table: "unbantimer", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "unbantimer", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamrolewhitelisteduser", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamrolesettings", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamroleblacklisteduser", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "streamonlinemessages", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "slowmodeignoreduser", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "slowmodeignoredrole", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "shopentryitem", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "shopentry", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "selfassignableroles", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "rotatingstatus", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "lastreward", - table: "rewardedusers", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "rewardedusers", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "repeaters", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "when", - table: "reminders", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "reminders", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "reactionroles", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "quotes", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "pollvote", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "pollanswer", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "poll", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "playlistsong", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "plantedcurrency", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "permissions", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "validthru", - table: "patrons", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "lastcharge", - table: "patrons", - type: "timestamp with time zone", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "nsfwblacklistedtags", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "muteduserid", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "musicplaylists", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "logsettings", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "imageonlychannels", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "ignoredvoicepresencechannels", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "ignoredlogchannels", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "guildconfigs", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "groupname", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "gcchannelid", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "followedstream", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterwordschannelid", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterlinkschannelid", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filteredword", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "filterchannelid", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "feedsub", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "expressions", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "excludeditem", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "discorduser", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "lastlevelup", - table: "discorduser", - type: "timestamp with time zone", - nullable: false, - defaultValueSql: "timezone('utc', now())"); - - migrationBuilder.AddColumn( - name: "lastxpgain", - table: "discorduser", - type: "timestamp with time zone", - nullable: false, - defaultValueSql: "timezone('utc', now()) - interval '-1 year'"); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "discordpermoverrides", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "delmsgoncmdchannel", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "currencytransactions", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "commandcooldown", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "commandalias", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "clubs", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "blacklist", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "bantemplates", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "bankusers", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autotranslateusers", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autotranslatechannels", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "autocommands", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antispamsetting", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antispamignore", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "dateadded", - table: "antiraidsetting", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp without time zone", - oldNullable: true); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs deleted file mode 100644 index 812f165..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.Designer.cs +++ /dev/null @@ -1,3690 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220831142735_banprune")] - partial class banprune - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.cs b/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.cs deleted file mode 100644 index 2622cfa..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220831142735_banprune.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class banprune : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "prunedays", - table: "bantemplates", - type: "integer", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "prunedays", - table: "bantemplates"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs deleted file mode 100644 index 564fb8d..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.Designer.cs +++ /dev/null @@ -1,3694 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220913192529_shop-role-req")] - partial class shoprolereq - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.cs b/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.cs deleted file mode 100644 index 5772766..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220913192529_shop-role-req.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class shoprolereq : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "rolerequirement", - table: "shopentry", - type: "numeric(20,0)", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "rolerequirement", - table: "shopentry"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs deleted file mode 100644 index b372469..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.Designer.cs +++ /dev/null @@ -1,3725 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20220916194523_autopub")] - partial class autopub - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs deleted file mode 100644 index 177c650..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class autopub : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "autopublishchannel", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_autopublishchannel", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_autopublishchannel_guildid", - table: "autopublishchannel", - column: "guildid", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "autopublishchannel"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs deleted file mode 100644 index 78021a9..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs +++ /dev/null @@ -1,3760 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20221003175752_gambling-stats")] - partial class gamblingstats - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs deleted file mode 100644 index 88c4b12..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class gamblingstats : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "gamblingstats", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - feature = table.Column(type: "text", nullable: true), - bet = table.Column(type: "numeric", nullable: false), - paidout = table.Column(type: "numeric", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_gamblingstats", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_gamblingstats_feature", - table: "gamblingstats", - column: "feature", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "gamblingstats"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs deleted file mode 100644 index 813ffd1..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.Designer.cs +++ /dev/null @@ -1,3764 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20221021192807_toggle-global-expressions")] - partial class toggleglobalexpressions - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.cs b/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.cs deleted file mode 100644 index 3f39c19..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221021192807_toggle-global-expressions.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class toggleglobalexpressions : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "disableglobalexpressions", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "disableglobalexpressions", - table: "guildconfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.Designer.cs deleted file mode 100644 index 51c8a35..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.Designer.cs +++ /dev/null @@ -1,3772 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20221118195200_log-thread")] - partial class logthread - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.cs b/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.cs deleted file mode 100644 index 14cf121..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221118195200_log-thread.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class logthread : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "threadcreatedid", - table: "logsettings", - type: "numeric(20,0)", - nullable: true); - - migrationBuilder.AddColumn( - name: "threaddeletedid", - table: "logsettings", - type: "numeric(20,0)", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "threadcreatedid", - table: "logsettings"); - - migrationBuilder.DropColumn( - name: "threaddeletedid", - table: "logsettings"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.Designer.cs deleted file mode 100644 index a0a8272..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.Designer.cs +++ /dev/null @@ -1,3776 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20221122204423_feed-text")] - partial class feedtext - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasAlternateKey("Name") - .HasName("ak_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Tag") - .HasColumnType("text") - .HasColumnName("tag"); - - b.HasKey("Id") - .HasName("pk_nsfwblacklistedtags"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); - - b.ToTable("nsfwblacklistedtags", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Question") - .HasColumnType("text") - .HasColumnName("question"); - - b.HasKey("Id") - .HasName("pk_poll"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_poll_guildid"); - - b.ToTable("poll", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_pollanswer"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollanswer_pollid"); - - b.ToTable("pollanswer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("PollId") - .HasColumnType("integer") - .HasColumnName("pollid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("VoteIndex") - .HasColumnType("integer") - .HasColumnName("voteindex"); - - b.HasKey("Id") - .HasName("pk_pollvote"); - - b.HasIndex("PollId") - .HasDatabaseName("ix_pollvote_pollid"); - - b.ToTable("pollvote", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollanswer_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId") - .HasConstraintName("fk_pollvote_poll_pollid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.cs b/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.cs deleted file mode 100644 index 6234f02..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20221122204423_feed-text.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - public partial class feedtext : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "message", - table: "feedsub", - type: "text", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "message", - table: "feedsub"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs deleted file mode 100644 index 2546c39..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs +++ /dev/null @@ -1,3827 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240502233202_v5")] - partial class v5 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredvoicepresencechannels"); - - b.HasIndex("LogSettingId") - .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); - - b.ToTable("ignoredvoicepresencechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId") - .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs deleted file mode 100644 index 943e959..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs +++ /dev/null @@ -1,326 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class v5 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "nsfwblacklistedtags"); - - migrationBuilder.DropTable( - name: "pollanswer"); - - migrationBuilder.DropTable( - name: "pollvote"); - - migrationBuilder.DropTable( - name: "poll"); - - migrationBuilder.DropUniqueConstraint( - name: "ak_clubs_name", - table: "clubs"); - - migrationBuilder.AddColumn( - name: "command", - table: "shopentry", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "type", - table: "reminders", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "stickyroles", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "name", - table: "clubs", - type: "character varying(20)", - maxLength: 20, - nullable: true, - oldClrType: typeof(string), - oldType: "character varying(20)", - oldMaxLength: 20); - - migrationBuilder.CreateTable( - name: "giveawaymodel", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - messageid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - message = table.Column(type: "text", nullable: true), - endsat = table.Column(type: "timestamp without time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_giveawaymodel", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "stickyroles", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - roleids = table.Column(type: "text", nullable: true), - userid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_stickyroles", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "todosarchive", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - name = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_todosarchive", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "giveawayuser", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - giveawayid = table.Column(type: "integer", nullable: false), - userid = table.Column(type: "numeric(20,0)", nullable: false), - name = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_giveawayuser", x => x.id); - table.ForeignKey( - name: "fk_giveawayuser_giveawaymodel_giveawayid", - column: x => x.giveawayid, - principalTable: "giveawaymodel", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "todos", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - userid = table.Column(type: "numeric(20,0)", nullable: false), - todo = table.Column(type: "text", nullable: true), - dateadded = table.Column(type: "timestamp without time zone", nullable: false), - isdone = table.Column(type: "boolean", nullable: false), - archiveid = table.Column(type: "integer", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_todos", x => x.id); - table.ForeignKey( - name: "fk_todos_todosarchive_archiveid", - column: x => x.archiveid, - principalTable: "todosarchive", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_clubs_name", - table: "clubs", - column: "name", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_giveawayuser_giveawayid_userid", - table: "giveawayuser", - columns: new[] { "giveawayid", "userid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_stickyroles_guildid_userid", - table: "stickyroles", - columns: new[] { "guildid", "userid" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_todos_archiveid", - table: "todos", - column: "archiveid"); - - migrationBuilder.CreateIndex( - name: "ix_todos_userid", - table: "todos", - column: "userid"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "giveawayuser"); - - migrationBuilder.DropTable( - name: "stickyroles"); - - migrationBuilder.DropTable( - name: "todos"); - - migrationBuilder.DropTable( - name: "giveawaymodel"); - - migrationBuilder.DropTable( - name: "todosarchive"); - - migrationBuilder.DropIndex( - name: "ix_clubs_name", - table: "clubs"); - - migrationBuilder.DropColumn( - name: "command", - table: "shopentry"); - - migrationBuilder.DropColumn( - name: "type", - table: "reminders"); - - migrationBuilder.DropColumn( - name: "stickyroles", - table: "guildconfigs"); - - migrationBuilder.AlterColumn( - name: "name", - table: "clubs", - type: "character varying(20)", - maxLength: 20, - nullable: false, - defaultValue: "", - oldClrType: typeof(string), - oldType: "character varying(20)", - oldMaxLength: 20, - oldNullable: true); - - migrationBuilder.AddUniqueConstraint( - name: "ak_clubs_name", - table: "clubs", - column: "name"); - - migrationBuilder.CreateTable( - name: "nsfwblacklistedtags", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - dateadded = table.Column(type: "timestamp without time zone", nullable: true), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - tag = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "poll", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - question = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_poll", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "pollanswer", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - dateadded = table.Column(type: "timestamp without time zone", nullable: true), - index = table.Column(type: "integer", nullable: false), - pollid = table.Column(type: "integer", nullable: true), - text = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_pollanswer", x => x.id); - table.ForeignKey( - name: "fk_pollanswer_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "pollvote", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - dateadded = table.Column(type: "timestamp without time zone", nullable: true), - pollid = table.Column(type: "integer", nullable: true), - userid = table.Column(type: "numeric(20,0)", nullable: false), - voteindex = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_pollvote", x => x.id); - table.ForeignKey( - name: "fk_pollvote_poll_pollid", - column: x => x.pollid, - principalTable: "poll", - principalColumn: "id"); - }); - - migrationBuilder.CreateIndex( - name: "ix_nsfwblacklistedtags_guildid", - table: "nsfwblacklistedtags", - column: "guildid"); - - migrationBuilder.CreateIndex( - name: "ix_poll_guildid", - table: "poll", - column: "guildid", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_pollanswer_pollid", - table: "pollanswer", - column: "pollid"); - - migrationBuilder.CreateIndex( - name: "ix_pollvote_pollid", - table: "pollvote", - column: "pollid"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.Designer.cs deleted file mode 100644 index fde53c6..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.Designer.cs +++ /dev/null @@ -1,3816 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240518221432_guidlconfig-cleanup")] - partial class guidlconfigcleanup - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("FeatureType") - .HasColumnType("integer") - .HasColumnName("featuretype"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("DailyCount") - .HasColumnType("bigint") - .HasColumnName("dailycount"); - - b.Property("HourlyCount") - .HasColumnType("bigint") - .HasColumnName("hourlycount"); - - b.Property("MonthlyCount") - .HasColumnType("bigint") - .HasColumnName("monthlycount"); - - b.HasKey("UserId", "FeatureType", "Feature") - .HasName("pk_patronquotas"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_patronquotas_userid"); - - b.ToTable("patronquotas", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs deleted file mode 100644 index a6a4994..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs +++ /dev/null @@ -1,701 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class guidlconfigcleanup : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias"); - - migrationBuilder.DropForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown"); - - migrationBuilder.DropForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel"); - - migrationBuilder.DropForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem"); - - migrationBuilder.DropForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword"); - - migrationBuilder.DropForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream"); - - migrationBuilder.DropForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid"); - - migrationBuilder.DropForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~", - table: "streamroleblacklisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~", - table: "streamrolewhitelisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer"); - - migrationBuilder.DropForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo"); - - migrationBuilder.DropForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.DropTable( - name: "ignoredvoicepresencechannels"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamrolewhitelisteduser", - type: "integer", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "integer", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamroleblacklisteduser", - type: "integer", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "integer", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "guildconfigid", - table: "delmsgoncmdchannel", - type: "integer", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "integer", - oldNullable: true); - - migrationBuilder.AddForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid", - principalTable: "antispamsetting", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid", - principalTable: "xpsettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem", - column: "shopentryid", - principalTable: "shopentry", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore"); - - migrationBuilder.DropForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting"); - - migrationBuilder.DropForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias"); - - migrationBuilder.DropForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown"); - - migrationBuilder.DropForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel"); - - migrationBuilder.DropForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem"); - - migrationBuilder.DropForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword"); - - migrationBuilder.DropForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream"); - - migrationBuilder.DropForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid"); - - migrationBuilder.DropForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid"); - - migrationBuilder.DropForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry"); - - migrationBuilder.DropForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole"); - - migrationBuilder.DropForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~", - table: "streamroleblacklisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~", - table: "streamrolewhitelisteduser"); - - migrationBuilder.DropForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer"); - - migrationBuilder.DropForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer"); - - migrationBuilder.DropForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo"); - - migrationBuilder.DropForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamrolewhitelisteduser", - type: "integer", - nullable: true, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AlterColumn( - name: "streamrolesettingsid", - table: "streamroleblacklisteduser", - type: "integer", - nullable: true, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AlterColumn( - name: "guildconfigid", - table: "delmsgoncmdchannel", - type: "integer", - nullable: true, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.CreateTable( - name: "ignoredvoicepresencechannels", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - logsettingid = table.Column(type: "integer", nullable: true), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); - table.ForeignKey( - name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", - column: x => x.logsettingid, - principalTable: "logsettings", - principalColumn: "id"); - }); - - migrationBuilder.CreateIndex( - name: "ix_ignoredvoicepresencechannels_logsettingid", - table: "ignoredvoicepresencechannels", - column: "logsettingid"); - - migrationBuilder.AddForeignKey( - name: "fk_antiraidsetting_guildconfigs_guildconfigid", - table: "antiraidsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_antispamignore_antispamsetting_antispamsettingid", - table: "antispamignore", - column: "antispamsettingid", - principalTable: "antispamsetting", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_antispamsetting_guildconfigs_guildconfigid", - table: "antispamsetting", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "fk_commandalias_guildconfigs_guildconfigid", - table: "commandalias", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_commandcooldown_guildconfigs_guildconfigid", - table: "commandcooldown", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", - table: "delmsgoncmdchannel", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_excludeditem_xpsettings_xpsettingsid", - table: "excludeditem", - column: "xpsettingsid", - principalTable: "xpsettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterchannelid_guildconfigs_guildconfigid", - table: "filterchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filteredword_guildconfigs_guildconfigid", - table: "filteredword", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", - table: "filterlinkschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_filterwordschannelid_guildconfigs_guildconfigid", - table: "filterwordschannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_followedstream_guildconfigs_guildconfigid", - table: "followedstream", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_gcchannelid_guildconfigs_guildconfigid", - table: "gcchannelid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_muteduserid_guildconfigs_guildconfigid", - table: "muteduserid", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_permissions_guildconfigs_guildconfigid", - table: "permissions", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_shopentry_guildconfigs_guildconfigid", - table: "shopentry", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_shopentryitem_shopentry_shopentryid", - table: "shopentryitem", - column: "shopentryid", - principalTable: "shopentry", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", - table: "slowmodeignoredrole", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", - table: "slowmodeignoreduser", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~", - table: "streamroleblacklisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~", - table: "streamrolewhitelisteduser", - column: "streamrolesettingsid", - principalTable: "streamrolesettings", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unbantimer_guildconfigs_guildconfigid", - table: "unbantimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unmutetimer_guildconfigs_guildconfigid", - table: "unmutetimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_unroletimer_guildconfigs_guildconfigid", - table: "unroletimer", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_vcroleinfo_guildconfigs_guildconfigid", - table: "vcroleinfo", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.Designer.cs deleted file mode 100644 index 18a4651..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.Designer.cs +++ /dev/null @@ -1,3781 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240611180506_remove-patron-limits")] - partial class removepatronlimits - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.cs b/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.cs deleted file mode 100644 index 7fb11bc..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240611180506_remove-patron-limits.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class removepatronlimits : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "patronquotas"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "patronquotas", - columns: table => new - { - userid = table.Column(type: "numeric(20,0)", nullable: false), - featuretype = table.Column(type: "integer", nullable: false), - feature = table.Column(type: "text", nullable: false), - dailycount = table.Column(type: "bigint", nullable: false), - hourlycount = table.Column(type: "bigint", nullable: false), - monthlycount = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); - }); - - migrationBuilder.CreateIndex( - name: "ix_patronquotas_userid", - table: "patronquotas", - column: "userid"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs deleted file mode 100644 index b0380ea..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs +++ /dev/null @@ -1,3798 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240627033522_honeypot")] - partial class honeypot - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletebyemessagestimer"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("integer") - .HasColumnName("autodeletegreetmessagestimer"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("BoostMessage") - .HasColumnType("text") - .HasColumnName("boostmessage"); - - b.Property("BoostMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("boostmessagechannelid"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("integer") - .HasColumnName("boostmessagedeleteafter"); - - b.Property("ByeMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("byemessagechannelid"); - - b.Property("ChannelByeMessageText") - .HasColumnType("text") - .HasColumnName("channelbyemessagetext"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("text") - .HasColumnName("channelgreetmessagetext"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("DmGreetMessageText") - .HasColumnType("text") - .HasColumnName("dmgreetmessagetext"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GreetMessageChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("greetmessagechannelid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("SendBoostMessage") - .HasColumnType("boolean") - .HasColumnName("sendboostmessage"); - - b.Property("SendChannelByeMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelbyemessage"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("boolean") - .HasColumnName("sendchannelgreetmessage"); - - b.Property("SendDmGreetMessage") - .HasColumnType("boolean") - .HasColumnName("senddmgreetmessage"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.cs b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.cs deleted file mode 100644 index 2a40ff3..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class honeypot : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "honeypotchannels", - columns: table => new - { - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_honeypotchannels", x => x.guildid); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "honeypotchannels"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs deleted file mode 100644 index 8a2c51c..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.Designer.cs +++ /dev/null @@ -1,3785 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240911104857_greet-settings")] - partial class greetsettings - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDeleteTimer") - .HasColumnType("integer") - .HasColumnName("autodeletetimer"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("GreetType") - .HasColumnType("integer") - .HasColumnName("greettype"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("IsEnabled") - .HasColumnType("boolean") - .HasColumnName("isenabled"); - - b.Property("MessageText") - .HasColumnType("text") - .HasColumnName("messagetext"); - - b.HasKey("Id") - .HasName("pk_greetsettings"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique() - .HasDatabaseName("ix_greetsettings_guildid_greettype"); - - b.ToTable("greetsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs b/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs deleted file mode 100644 index afa0de2..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240911104857_greet-settings.cs +++ /dev/null @@ -1,196 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class greetsettings : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "byemessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelbyemessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "dmgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "greetmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendboostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelbyemessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "senddmgreetmessage", - table: "guildconfigs"); - - migrationBuilder.CreateTable( - name: "greetsettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - greettype = table.Column(type: "integer", nullable: false), - messagetext = table.Column(type: "text", nullable: true), - isenabled = table.Column(type: "boolean", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: true), - autodeletetimer = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_greetsettings", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_greetsettings_guildid_greettype", - table: "greetsettings", - columns: new[] { "guildid", "greettype" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "greetsettings"); - - migrationBuilder.AddColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "boostmessage", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "boostmessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "byemessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "channelbyemessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "channelgreetmessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "dmgreetmessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "greetmessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "sendboostmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelbyemessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "senddmgreetmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs deleted file mode 100644 index c72940f..0000000 --- a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs +++ /dev/null @@ -1,3782 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - partial class PostgreSqlContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("ActionDurationMinutes") - .HasColumnType("integer") - .HasColumnName("actiondurationminutes"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MinAge") - .HasColumnType("interval") - .HasColumnName("minage"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antialtsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antialtsetting_guildconfigid"); - - b.ToTable("antialtsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("PunishDuration") - .HasColumnType("integer") - .HasColumnName("punishduration"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.Property("UserThreshold") - .HasColumnType("integer") - .HasColumnName("userthreshold"); - - b.HasKey("Id") - .HasName("pk_antiraidsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antiraidsetting_guildconfigid"); - - b.ToTable("antiraidsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AntiSpamSettingId") - .HasColumnType("integer") - .HasColumnName("antispamsettingid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.HasKey("Id") - .HasName("pk_antispamignore"); - - b.HasIndex("AntiSpamSettingId") - .HasDatabaseName("ix_antispamignore_antispamsettingid"); - - b.ToTable("antispamignore", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Action") - .HasColumnType("integer") - .HasColumnName("action"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("MessageThreshold") - .HasColumnType("integer") - .HasColumnName("messagethreshold"); - - b.Property("MuteTime") - .HasColumnType("integer") - .HasColumnName("mutetime"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_antispamsetting"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_antispamsetting_guildconfigid"); - - b.ToTable("antispamsetting", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todosarchive"); - - b.ToTable("todosarchive", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("ChannelName") - .HasColumnType("text") - .HasColumnName("channelname"); - - b.Property("CommandText") - .HasColumnType("text") - .HasColumnName("commandtext"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("GuildName") - .HasColumnType("text") - .HasColumnName("guildname"); - - b.Property("Interval") - .HasColumnType("integer") - .HasColumnName("interval"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.Property("VoiceChannelName") - .HasColumnType("text") - .HasColumnName("voicechannelname"); - - b.HasKey("Id") - .HasName("pk_autocommands"); - - b.ToTable("autocommands", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autopublishchannel"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_autopublishchannel_guildid"); - - b.ToTable("autopublishchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("autodelete"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.HasKey("Id") - .HasName("pk_autotranslatechannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_autotranslatechannels_channelid"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_autotranslatechannels_guildid"); - - b.ToTable("autotranslatechannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("integer") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Source") - .HasColumnType("text") - .HasColumnName("source"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_autotranslateusers"); - - b.HasAlternateKey("ChannelId", "UserId") - .HasName("ak_autotranslateusers_channelid_userid"); - - b.ToTable("autotranslateusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("PruneDays") - .HasColumnType("integer") - .HasColumnName("prunedays"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_bantemplates"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_bantemplates_guildid"); - - b.ToTable("bantemplates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Balance") - .HasColumnType("bigint") - .HasColumnName("balance"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_bankusers"); - - b.HasIndex("UserId") - .IsUnique() - .HasDatabaseName("ix_bankusers_userid"); - - b.ToTable("bankusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_blacklist"); - - b.ToTable("blacklist", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubapplicants"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubapplicants_userid"); - - b.ToTable("clubapplicants", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("ClubId", "UserId") - .HasName("pk_clubbans"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_clubbans_userid"); - - b.ToTable("clubbans", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("ImageUrl") - .HasColumnType("text") - .HasColumnName("imageurl"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); - - b.Property("OwnerId") - .HasColumnType("integer") - .HasColumnName("ownerid"); - - b.Property("Xp") - .HasColumnType("integer") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_clubs"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_clubs_name"); - - b.HasIndex("OwnerId") - .IsUnique() - .HasDatabaseName("ix_clubs_ownerid"); - - b.ToTable("clubs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Mapping") - .HasColumnType("text") - .HasColumnName("mapping"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_commandalias"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandalias_guildconfigid"); - - b.ToTable("commandalias", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CommandName") - .HasColumnType("text") - .HasColumnName("commandname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Seconds") - .HasColumnType("integer") - .HasColumnName("seconds"); - - b.HasKey("Id") - .HasName("pk_commandcooldown"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_commandcooldown_guildconfigid"); - - b.ToTable("commandcooldown", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("text") - .HasColumnName("extra"); - - b.Property("Note") - .HasColumnType("text") - .HasColumnName("note"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("otherid") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_currencytransactions"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_currencytransactions_userid"); - - b.ToTable("currencytransactions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_delmsgoncmdchannel"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); - - b.ToTable("delmsgoncmdchannel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Perm") - .HasColumnType("numeric(20,0)") - .HasColumnName("perm"); - - b.HasKey("Id") - .HasName("pk_discordpermoverrides"); - - b.HasIndex("GuildId", "Command") - .IsUnique() - .HasDatabaseName("ix_discordpermoverrides_guildid_command"); - - b.ToTable("discordpermoverrides", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AvatarId") - .HasColumnType("text") - .HasColumnName("avatarid"); - - b.Property("ClubId") - .HasColumnType("integer") - .HasColumnName("clubid"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("currencyamount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Discriminator") - .HasColumnType("text") - .HasColumnName("discriminator"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("isclubadmin"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("notifyonlevelup"); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(0L) - .HasColumnName("totalxp"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_discorduser"); - - b.HasAlternateKey("UserId") - .HasName("ak_discorduser_userid"); - - b.HasIndex("ClubId") - .HasDatabaseName("ix_discorduser_clubid"); - - b.HasIndex("CurrencyAmount") - .HasDatabaseName("ix_discorduser_currencyamount"); - - b.HasIndex("TotalXp") - .HasDatabaseName("ix_discorduser_totalxp"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_discorduser_userid"); - - b.ToTable("discorduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("itemid"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_excludeditem"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_excludeditem_xpsettingsid"); - - b.ToTable("excludeditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Url") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url"); - - b.HasKey("Id") - .HasName("pk_feedsub"); - - b.HasAlternateKey("GuildConfigId", "Url") - .HasName("ak_feedsub_guildconfigid_url"); - - b.ToTable("feedsub", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterchannelid_guildconfigid"); - - b.ToTable("filterchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterlinkschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); - - b.ToTable("filterlinkschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_filterwordschannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); - - b.ToTable("filterwordschannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Word") - .HasColumnType("text") - .HasColumnName("word"); - - b.HasKey("Id") - .HasName("pk_filteredword"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_filteredword_guildconfigid"); - - b.ToTable("filteredword", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_followedstream"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_followedstream_guildconfigid"); - - b.ToTable("followedstream", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.HasKey("Id") - .HasName("pk_gcchannelid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_gcchannelid_guildconfigid"); - - b.ToTable("gcchannelid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Bet") - .HasColumnType("numeric") - .HasColumnName("bet"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Feature") - .HasColumnType("text") - .HasColumnName("feature"); - - b.Property("PaidOut") - .HasColumnType("numeric") - .HasColumnName("paidout"); - - b.HasKey("Id") - .HasName("pk_gamblingstats"); - - b.HasIndex("Feature") - .IsUnique() - .HasDatabaseName("ix_gamblingstats_feature"); - - b.ToTable("gamblingstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("EndsAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("endsat"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.HasKey("Id") - .HasName("pk_giveawaymodel"); - - b.ToTable("giveawaymodel", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("GiveawayId") - .HasColumnType("integer") - .HasColumnName("giveawayid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_giveawayuser"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique() - .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); - - b.ToTable("giveawayuser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Number") - .HasColumnType("integer") - .HasColumnName("number"); - - b.HasKey("Id") - .HasName("pk_groupname"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique() - .HasDatabaseName("ix_groupname_guildconfigid_number"); - - b.ToTable("groupname", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoAssignRoleIds") - .HasColumnType("text") - .HasColumnName("autoassignroleids"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") - .HasColumnName("autodeleteselfassignedrolemessages"); - - b.Property("CleverbotEnabled") - .HasColumnType("boolean") - .HasColumnName("cleverbotenabled"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") - .HasColumnName("deletemessageoncommand"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") - .HasColumnName("deletestreamonlinemessage"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") - .HasColumnName("disableglobalexpressions"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") - .HasColumnName("exclusiveselfassignedroles"); - - b.Property("FilterInvites") - .HasColumnType("boolean") - .HasColumnName("filterinvites"); - - b.Property("FilterLinks") - .HasColumnType("boolean") - .HasColumnName("filterlinks"); - - b.Property("FilterWords") - .HasColumnType("boolean") - .HasColumnName("filterwords"); - - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") - .HasColumnName("gamevoicechannel"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Locale") - .HasColumnType("text") - .HasColumnName("locale"); - - b.Property("MuteRoleName") - .HasColumnType("text") - .HasColumnName("muterolename"); - - b.Property("NotifyStreamOffline") - .HasColumnType("boolean") - .HasColumnName("notifystreamoffline"); - - b.Property("PermissionRole") - .HasColumnType("text") - .HasColumnName("permissionrole"); - - b.Property("Prefix") - .HasColumnType("text") - .HasColumnName("prefix"); - - b.Property("StickyRoles") - .HasColumnType("boolean") - .HasColumnName("stickyroles"); - - b.Property("TimeZoneId") - .HasColumnType("text") - .HasColumnName("timezoneid"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("verboseerrors"); - - b.Property("VerbosePermissions") - .HasColumnType("boolean") - .HasColumnName("verbosepermissions"); - - b.Property("WarnExpireAction") - .HasColumnType("integer") - .HasColumnName("warnexpireaction"); - - b.Property("WarnExpireHours") - .HasColumnType("integer") - .HasColumnName("warnexpirehours"); - - b.Property("WarningsInitialized") - .HasColumnType("boolean") - .HasColumnName("warningsinitialized"); - - b.HasKey("Id") - .HasName("pk_guildconfigs"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_guildconfigs_guildid"); - - b.HasIndex("WarnExpireHours") - .HasDatabaseName("ix_guildconfigs_warnexpirehours"); - - b.ToTable("guildconfigs", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.HasKey("GuildId") - .HasName("pk_honeypotchannels"); - - b.ToTable("honeypotchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logitemid"); - - b.Property("LogSettingId") - .HasColumnType("integer") - .HasColumnName("logsettingid"); - - b.HasKey("Id") - .HasName("pk_ignoredlogchannels"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique() - .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); - - b.ToTable("ignoredlogchannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_imageonlychannels"); - - b.HasIndex("ChannelId") - .IsUnique() - .HasDatabaseName("ix_imageonlychannels_channelid"); - - b.ToTable("imageonlychannels", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelcreatedid"); - - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channeldestroyedid"); - - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelupdatedid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logotherid"); - - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("loguserpresenceid"); - - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresenceid"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logvoicepresencettsid"); - - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") - .HasColumnName("logwarnsid"); - - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messagedeletedid"); - - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageupdatedid"); - - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threadcreatedid"); - - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("threaddeletedid"); - - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userbannedid"); - - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userjoinedid"); - - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userleftid"); - - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("usermutedid"); - - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userunbannedid"); - - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userupdatedid"); - - b.HasKey("Id") - .HasName("pk_logsettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_logsettings_guildid"); - - b.ToTable("logsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDisconnect") - .HasColumnType("boolean") - .HasColumnName("autodisconnect"); - - b.Property("AutoPlay") - .HasColumnType("boolean") - .HasColumnName("autoplay"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("musicchannelid"); - - b.Property("PlayerRepeat") - .HasColumnType("integer") - .HasColumnName("playerrepeat"); - - b.Property("QualityPreset") - .HasColumnType("integer") - .HasColumnName("qualitypreset"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(100) - .HasColumnName("volume"); - - b.HasKey("Id") - .HasName("pk_musicplayersettings"); - - b.HasIndex("GuildId") - .IsUnique() - .HasDatabaseName("ix_musicplayersettings_guildid"); - - b.ToTable("musicplayersettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Author") - .HasColumnType("text") - .HasColumnName("author"); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id") - .HasName("pk_musicplaylists"); - - b.ToTable("musicplaylists", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_muteduserid"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_muteduserid_guildconfigid"); - - b.ToTable("muteduserid", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Punishment") - .HasColumnType("integer") - .HasColumnName("punishment"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("time"); - - b.HasKey("Id") - .HasName("pk_warningpunishment"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_warningpunishment_guildconfigid"); - - b.ToTable("warningpunishment", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("integer") - .HasColumnName("amount"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xpcurrencyreward"); - - b.HasIndex("XpSettingsId") - .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); - - b.ToTable("xpcurrencyreward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Remove") - .HasColumnType("boolean") - .HasColumnName("remove"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("XpSettingsId") - .HasColumnType("integer") - .HasColumnName("xpsettingsid"); - - b.HasKey("Id") - .HasName("pk_xprolereward"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique() - .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); - - b.ToTable("xprolereward", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("ServerExcluded") - .HasColumnType("boolean") - .HasColumnName("serverexcluded"); - - b.HasKey("Id") - .HasName("pk_xpsettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_xpsettings_guildconfigid"); - - b.ToTable("xpsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsUsing") - .HasColumnType("boolean") - .HasColumnName("isusing"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("text") - .HasColumnName("itemkey"); - - b.Property("ItemType") - .HasColumnType("integer") - .HasColumnName("itemtype"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_xpshopowneditem"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique() - .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); - - b.ToTable("xpshopowneditem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AutoDeleteTimer") - .HasColumnType("integer") - .HasColumnName("autodeletetimer"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("GreetType") - .HasColumnType("integer") - .HasColumnName("greettype"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("IsEnabled") - .HasColumnType("boolean") - .HasColumnName("isenabled"); - - b.Property("MessageText") - .HasColumnType("text") - .HasColumnName("messagetext"); - - b.HasKey("Id") - .HasName("pk_greetsettings"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique() - .HasDatabaseName("ix_greetsettings_guildid_greettype"); - - b.ToTable("greetsettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubapplicants_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_clubs_clubid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_clubbans_discorduser_userid"); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("fk_clubs_discorduser_ownerid"); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction) - .HasConstraintName("fk_discorduser_clubs_clubid"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_todos_todosarchive_archiveid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId") - .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId") - .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId") - .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId") - .HasConstraintName("fk_waifuupdates_discorduser_newid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId") - .HasConstraintName("fk_waifuupdates_discorduser_oldid"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_waifuupdates_discorduser_userid"); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.Designer.cs deleted file mode 100644 index cc325d6..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.Designer.cs +++ /dev/null @@ -1,2786 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210621042359_squash")] - partial class squash - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); - - b.Property("LastXpGain") - .HasColumnType("TEXT"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("IsRegex") - .HasColumnType("INTEGER"); - - b.Property("OwnerOnly") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.Property("UseCount") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleId") - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDcFromVc") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DefaultMusicVolume") - .HasColumnType("REAL"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("RootPermissionId") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("VoicePlusTextEnabled") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("LogSettingId"); - - b.HasIndex("RootPermissionId"); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreated") - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyed") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdated") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsLogging") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresence") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresence") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeleted") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdated") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBanned") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoined") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeft") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserPresenceChannelId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbanned") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdated") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("VoicePresenceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NextId") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NextId") - .IsUnique(); - - b.ToTable("Permission"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UseCount") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Stake", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Stakes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Item") - .HasColumnType("INTEGER"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("NotifyMessage") - .HasColumnType("TEXT"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.Property("XpRoleRewardExclusive") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.HasOne("EllieBot.Services.Database.Models.Permission", "RootPermission") - .WithMany() - .HasForeignKey("RootPermissionId"); - - b.Navigation("LogSetting"); - - b.Navigation("RootPermission"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permission", b => - { - b.HasOne("EllieBot.Services.Database.Models.Permission", "Next") - .WithOne("Previous") - .HasForeignKey("EllieBot.Services.Database.Models.Permission", "NextId"); - - b.Navigation("Next"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permission", b => - { - b.Navigation("Previous"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs deleted file mode 100644 index 4273df4..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs +++ /dev/null @@ -1,2229 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class squash : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AutoCommands", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - CommandText = table.Column(type: "TEXT", nullable: true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - ChannelName = table.Column(type: "TEXT", nullable: true), - GuildId = table.Column(type: "INTEGER", nullable: true), - GuildName = table.Column(type: "TEXT", nullable: true), - VoiceChannelId = table.Column(type: "INTEGER", nullable: true), - VoiceChannelName = table.Column(type: "TEXT", nullable: true), - Interval = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AutoCommands", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "BanTemplates", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Text = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_BanTemplates", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Blacklist", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ItemId = table.Column(type: "INTEGER", nullable: false), - Type = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Blacklist", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CurrencyTransactions", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Amount = table.Column(type: "INTEGER", nullable: false), - Reason = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CurrencyTransactions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CustomReactions", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UseCount = table.Column(type: "INTEGER", nullable: false), - IsRegex = table.Column(type: "INTEGER", nullable: false), - OwnerOnly = table.Column(type: "INTEGER", nullable: false), - GuildId = table.Column(type: "INTEGER", nullable: true), - Response = table.Column(type: "TEXT", nullable: true), - Trigger = table.Column(type: "TEXT", nullable: true), - AutoDeleteTrigger = table.Column(type: "INTEGER", nullable: false), - DmResponse = table.Column(type: "INTEGER", nullable: false), - ContainsAnywhere = table.Column(type: "INTEGER", nullable: false), - AllowTarget = table.Column(type: "INTEGER", nullable: false), - Reactions = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CustomReactions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DiscordPermOverrides", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Perm = table.Column(type: "INTEGER", nullable: false), - GuildId = table.Column(type: "INTEGER", nullable: true), - Command = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_DiscordPermOverrides", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "LogSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - LogOtherId = table.Column(type: "INTEGER", nullable: true), - MessageUpdatedId = table.Column(type: "INTEGER", nullable: true), - MessageDeletedId = table.Column(type: "INTEGER", nullable: true), - UserJoinedId = table.Column(type: "INTEGER", nullable: true), - UserLeftId = table.Column(type: "INTEGER", nullable: true), - UserBannedId = table.Column(type: "INTEGER", nullable: true), - UserUnbannedId = table.Column(type: "INTEGER", nullable: true), - UserUpdatedId = table.Column(type: "INTEGER", nullable: true), - ChannelCreatedId = table.Column(type: "INTEGER", nullable: true), - ChannelDestroyedId = table.Column(type: "INTEGER", nullable: true), - ChannelUpdatedId = table.Column(type: "INTEGER", nullable: true), - UserMutedId = table.Column(type: "INTEGER", nullable: true), - LogUserPresenceId = table.Column(type: "INTEGER", nullable: true), - LogVoicePresenceId = table.Column(type: "INTEGER", nullable: true), - LogVoicePresenceTTSId = table.Column(type: "INTEGER", nullable: true), - IsLogging = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - MessageUpdated = table.Column(type: "INTEGER", nullable: false), - MessageDeleted = table.Column(type: "INTEGER", nullable: false), - UserJoined = table.Column(type: "INTEGER", nullable: false), - UserLeft = table.Column(type: "INTEGER", nullable: false), - UserBanned = table.Column(type: "INTEGER", nullable: false), - UserUnbanned = table.Column(type: "INTEGER", nullable: false), - UserUpdated = table.Column(type: "INTEGER", nullable: false), - ChannelCreated = table.Column(type: "INTEGER", nullable: false), - ChannelDestroyed = table.Column(type: "INTEGER", nullable: false), - ChannelUpdated = table.Column(type: "INTEGER", nullable: false), - LogUserPresence = table.Column(type: "INTEGER", nullable: false), - UserPresenceChannelId = table.Column(type: "INTEGER", nullable: false), - LogVoicePresence = table.Column(type: "INTEGER", nullable: false), - VoicePresenceChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_LogSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "MusicPlayerSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - PlayerRepeat = table.Column(type: "INTEGER", nullable: false), - MusicChannelId = table.Column(type: "INTEGER", nullable: true), - Volume = table.Column(type: "INTEGER", nullable: false, defaultValue: 100), - AutoDisconnect = table.Column(type: "INTEGER", nullable: false), - QualityPreset = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_MusicPlayerSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "MusicPlaylists", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Name = table.Column(type: "TEXT", nullable: true), - Author = table.Column(type: "TEXT", nullable: true), - AuthorId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_MusicPlaylists", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Permission", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - NextId = table.Column(type: "INTEGER", nullable: true), - PrimaryTarget = table.Column(type: "INTEGER", nullable: false), - PrimaryTargetId = table.Column(type: "INTEGER", nullable: false), - SecondaryTarget = table.Column(type: "INTEGER", nullable: false), - SecondaryTargetName = table.Column(type: "TEXT", nullable: true), - State = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Permission", x => x.Id); - table.ForeignKey( - name: "FK_Permission_Permission_NextId", - column: x => x.NextId, - principalTable: "Permission", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "PlantedCurrency", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Amount = table.Column(type: "INTEGER", nullable: false), - Password = table.Column(type: "TEXT", nullable: true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PlantedCurrency", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Poll", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - Question = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Poll", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Quotes", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Keyword = table.Column(type: "TEXT", nullable: false), - AuthorName = table.Column(type: "TEXT", nullable: false), - AuthorId = table.Column(type: "INTEGER", nullable: false), - Text = table.Column(type: "TEXT", nullable: false), - UseCount = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Quotes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Reminders", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - When = table.Column(type: "TEXT", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - ServerId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false), - Message = table.Column(type: "TEXT", nullable: true), - IsPrivate = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Reminders", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Repeaters", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - LastMessageId = table.Column(type: "INTEGER", nullable: true), - Message = table.Column(type: "TEXT", nullable: true), - Interval = table.Column(type: "TEXT", nullable: false), - StartTimeOfDay = table.Column(type: "TEXT", nullable: true), - NoRedundant = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Repeaters", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RewardedUsers", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - PatreonUserId = table.Column(type: "TEXT", nullable: true), - AmountRewardedThisMonth = table.Column(type: "INTEGER", nullable: false), - LastReward = table.Column(type: "TEXT", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RewardedUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RotatingStatus", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Status = table.Column(type: "TEXT", nullable: true), - Type = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RotatingStatus", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "SelfAssignableRoles", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: false), - Group = table.Column(type: "INTEGER", nullable: false, defaultValue: 0), - LevelRequirement = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_SelfAssignableRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Stakes", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Amount = table.Column(type: "INTEGER", nullable: false), - Source = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Stakes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "UserXpStats", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - GuildId = table.Column(type: "INTEGER", nullable: false), - Xp = table.Column(type: "INTEGER", nullable: false), - AwardedXp = table.Column(type: "INTEGER", nullable: false), - NotifyOnLevelUp = table.Column(type: "INTEGER", nullable: false), - LastLevelUp = table.Column(type: "TEXT", nullable: false, defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserXpStats", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Warnings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false), - Reason = table.Column(type: "TEXT", nullable: true), - Forgiven = table.Column(type: "INTEGER", nullable: false), - ForgivenBy = table.Column(type: "TEXT", nullable: true), - Moderator = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Warnings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IgnoredLogChannels", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - LogSettingId = table.Column(type: "INTEGER", nullable: true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IgnoredLogChannels", x => x.Id); - table.ForeignKey( - name: "FK_IgnoredLogChannels_LogSettings_LogSettingId", - column: x => x.LogSettingId, - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "IgnoredVoicePresenceCHannels", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - LogSettingId = table.Column(type: "INTEGER", nullable: true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IgnoredVoicePresenceCHannels", x => x.Id); - table.ForeignKey( - name: "FK_IgnoredVoicePresenceCHannels_LogSettings_LogSettingId", - column: x => x.LogSettingId, - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "PlaylistSong", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Provider = table.Column(type: "TEXT", nullable: true), - ProviderType = table.Column(type: "INTEGER", nullable: false), - Title = table.Column(type: "TEXT", nullable: true), - Uri = table.Column(type: "TEXT", nullable: true), - Query = table.Column(type: "TEXT", nullable: true), - MusicPlaylistId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PlaylistSong", x => x.Id); - table.ForeignKey( - name: "FK_PlaylistSong_MusicPlaylists_MusicPlaylistId", - column: x => x.MusicPlaylistId, - principalTable: "MusicPlaylists", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "GuildConfigs", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Prefix = table.Column(type: "TEXT", nullable: true), - DeleteMessageOnCommand = table.Column(type: "INTEGER", nullable: false), - AutoAssignRoleId = table.Column(type: "INTEGER", nullable: false), - AutoAssignRoleIds = table.Column(type: "TEXT", nullable: true), - AutoDeleteGreetMessages = table.Column(type: "INTEGER", nullable: false), - AutoDeleteByeMessages = table.Column(type: "INTEGER", nullable: false), - AutoDeleteGreetMessagesTimer = table.Column(type: "INTEGER", nullable: false), - AutoDeleteByeMessagesTimer = table.Column(type: "INTEGER", nullable: false), - GreetMessageChannelId = table.Column(type: "INTEGER", nullable: false), - ByeMessageChannelId = table.Column(type: "INTEGER", nullable: false), - SendDmGreetMessage = table.Column(type: "INTEGER", nullable: false), - DmGreetMessageText = table.Column(type: "TEXT", nullable: true), - SendChannelGreetMessage = table.Column(type: "INTEGER", nullable: false), - ChannelGreetMessageText = table.Column(type: "TEXT", nullable: true), - SendChannelByeMessage = table.Column(type: "INTEGER", nullable: false), - ChannelByeMessageText = table.Column(type: "TEXT", nullable: true), - LogSettingId = table.Column(type: "INTEGER", nullable: true), - ExclusiveSelfAssignedRoles = table.Column(type: "INTEGER", nullable: false), - AutoDeleteSelfAssignedRoleMessages = table.Column(type: "INTEGER", nullable: false), - DefaultMusicVolume = table.Column(type: "REAL", nullable: false), - VoicePlusTextEnabled = table.Column(type: "INTEGER", nullable: false), - RootPermissionId = table.Column(type: "INTEGER", nullable: true), - VerbosePermissions = table.Column(type: "INTEGER", nullable: false), - PermissionRole = table.Column(type: "TEXT", nullable: true), - FilterInvites = table.Column(type: "INTEGER", nullable: false), - FilterLinks = table.Column(type: "INTEGER", nullable: false), - FilterWords = table.Column(type: "INTEGER", nullable: false), - MuteRoleName = table.Column(type: "TEXT", nullable: true), - CleverbotEnabled = table.Column(type: "INTEGER", nullable: false), - Locale = table.Column(type: "TEXT", nullable: true), - TimeZoneId = table.Column(type: "TEXT", nullable: true), - WarningsInitialized = table.Column(type: "INTEGER", nullable: false), - GameVoiceChannel = table.Column(type: "INTEGER", nullable: true), - VerboseErrors = table.Column(type: "INTEGER", nullable: false), - AutoDcFromVc = table.Column(type: "INTEGER", nullable: false), - NotifyStreamOffline = table.Column(type: "INTEGER", nullable: false), - WarnExpireHours = table.Column(type: "INTEGER", nullable: false), - WarnExpireAction = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GuildConfigs", x => x.Id); - table.ForeignKey( - name: "FK_GuildConfigs_LogSettings_LogSettingId", - column: x => x.LogSettingId, - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_GuildConfigs_Permission_RootPermissionId", - column: x => x.RootPermissionId, - principalTable: "Permission", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "PollAnswer", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Index = table.Column(type: "INTEGER", nullable: false), - Text = table.Column(type: "TEXT", nullable: true), - PollId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PollAnswer", x => x.Id); - table.ForeignKey( - name: "FK_PollAnswer_Poll_PollId", - column: x => x.PollId, - principalTable: "Poll", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "PollVote", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - VoteIndex = table.Column(type: "INTEGER", nullable: false), - PollId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PollVote", x => x.Id); - table.ForeignKey( - name: "FK_PollVote_Poll_PollId", - column: x => x.PollId, - principalTable: "Poll", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AntiAltSetting", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - MinAge = table.Column(type: "TEXT", nullable: false), - Action = table.Column(type: "INTEGER", nullable: false), - ActionDurationMinutes = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AntiAltSetting", x => x.Id); - table.ForeignKey( - name: "FK_AntiAltSetting_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AntiRaidSetting", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - UserThreshold = table.Column(type: "INTEGER", nullable: false), - Seconds = table.Column(type: "INTEGER", nullable: false), - Action = table.Column(type: "INTEGER", nullable: false), - PunishDuration = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AntiRaidSetting", x => x.Id); - table.ForeignKey( - name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AntiSpamSetting", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - Action = table.Column(type: "INTEGER", nullable: false), - MessageThreshold = table.Column(type: "INTEGER", nullable: false), - MuteTime = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AntiSpamSetting", x => x.Id); - table.ForeignKey( - name: "FK_AntiSpamSetting_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "CommandAlias", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Trigger = table.Column(type: "TEXT", nullable: true), - Mapping = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CommandAlias", x => x.Id); - table.ForeignKey( - name: "FK_CommandAlias_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "CommandCooldown", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Seconds = table.Column(type: "INTEGER", nullable: false), - CommandName = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CommandCooldown", x => x.Id); - table.ForeignKey( - name: "FK_CommandCooldown_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "DelMsgOnCmdChannel", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - State = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_DelMsgOnCmdChannel", x => x.Id); - table.ForeignKey( - name: "FK_DelMsgOnCmdChannel_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "FeedSub", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - Url = table.Column(type: "TEXT", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FeedSub", x => x.Id); - table.UniqueConstraint("AK_FeedSub_GuildConfigId_Url", x => new { x.GuildConfigId, x.Url }); - table.ForeignKey( - name: "FK_FeedSub_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "FilterChannelId", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - GuildConfigId1 = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FilterChannelId", x => x.Id); - table.ForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId1", - column: x => x.GuildConfigId1, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "FilteredWord", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Word = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FilteredWord", x => x.Id); - table.ForeignKey( - name: "FK_FilteredWord_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "FilterLinksChannelId", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FilterLinksChannelId", x => x.Id); - table.ForeignKey( - name: "FK_FilterLinksChannelId_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "FollowedStream", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - Username = table.Column(type: "TEXT", nullable: true), - Type = table.Column(type: "INTEGER", nullable: false), - Message = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FollowedStream", x => x.Id); - table.ForeignKey( - name: "FK_FollowedStream_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "GCChannelId", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GCChannelId", x => x.Id); - table.ForeignKey( - name: "FK_GCChannelId_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "GroupName", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - Number = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GroupName", x => x.Id); - table.ForeignKey( - name: "FK_GroupName_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "MutedUserId", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_MutedUserId", x => x.Id); - table.ForeignKey( - name: "FK_MutedUserId_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "NsfwBlacklitedTag", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Tag = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_NsfwBlacklitedTag", x => x.Id); - table.ForeignKey( - name: "FK_NsfwBlacklitedTag_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Permissionv2", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - Index = table.Column(type: "INTEGER", nullable: false), - PrimaryTarget = table.Column(type: "INTEGER", nullable: false), - PrimaryTargetId = table.Column(type: "INTEGER", nullable: false), - SecondaryTarget = table.Column(type: "INTEGER", nullable: false), - SecondaryTargetName = table.Column(type: "TEXT", nullable: true), - IsCustomCommand = table.Column(type: "INTEGER", nullable: false), - State = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Permissionv2", x => x.Id); - table.ForeignKey( - name: "FK_Permissionv2_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "ReactionRoleMessage", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Index = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false), - Exclusive = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ReactionRoleMessage", x => x.Id); - table.ForeignKey( - name: "FK_ReactionRoleMessage_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ShopEntry", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Index = table.Column(type: "INTEGER", nullable: false), - Price = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - AuthorId = table.Column(type: "INTEGER", nullable: false), - Type = table.Column(type: "INTEGER", nullable: false), - RoleName = table.Column(type: "TEXT", nullable: true), - RoleId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ShopEntry", x => x.Id); - table.ForeignKey( - name: "FK_ShopEntry_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "SlowmodeIgnoredRole", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - RoleId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_SlowmodeIgnoredRole", x => x.Id); - table.ForeignKey( - name: "FK_SlowmodeIgnoredRole_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "SlowmodeIgnoredUser", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_SlowmodeIgnoredUser", x => x.Id); - table.ForeignKey( - name: "FK_SlowmodeIgnoredUser_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "StreamRoleSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - Enabled = table.Column(type: "INTEGER", nullable: false), - AddRoleId = table.Column(type: "INTEGER", nullable: false), - FromRoleId = table.Column(type: "INTEGER", nullable: false), - Keyword = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_StreamRoleSettings", x => x.Id); - table.ForeignKey( - name: "FK_StreamRoleSettings_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UnbanTimer", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - UnbanAt = table.Column(type: "TEXT", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UnbanTimer", x => x.Id); - table.ForeignKey( - name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "UnmuteTimer", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - UnmuteAt = table.Column(type: "TEXT", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UnmuteTimer", x => x.Id); - table.ForeignKey( - name: "FK_UnmuteTimer_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "UnroleTimer", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: false), - UnbanAt = table.Column(type: "TEXT", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UnroleTimer", x => x.Id); - table.ForeignKey( - name: "FK_UnroleTimer_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "VcRoleInfo", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - VoiceChannelId = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_VcRoleInfo", x => x.Id); - table.ForeignKey( - name: "FK_VcRoleInfo_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "WarningPunishment", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Count = table.Column(type: "INTEGER", nullable: false), - Punishment = table.Column(type: "INTEGER", nullable: false), - Time = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_WarningPunishment", x => x.Id); - table.ForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "XpSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - XpRoleRewardExclusive = table.Column(type: "INTEGER", nullable: false), - NotifyMessage = table.Column(type: "TEXT", nullable: true), - ServerExcluded = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_XpSettings", x => x.Id); - table.ForeignKey( - name: "FK_XpSettings_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AntiSpamIgnore", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - AntiSpamSettingId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AntiSpamIgnore", x => x.Id); - table.ForeignKey( - name: "FK_AntiSpamIgnore_AntiSpamSetting_AntiSpamSettingId", - column: x => x.AntiSpamSettingId, - principalTable: "AntiSpamSetting", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "ReactionRole", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - EmoteName = table.Column(type: "TEXT", nullable: true), - RoleId = table.Column(type: "INTEGER", nullable: false), - ReactionRoleMessageId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ReactionRole", x => x.Id); - table.ForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - column: x => x.ReactionRoleMessageId, - principalTable: "ReactionRoleMessage", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "ShopEntryItem", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Text = table.Column(type: "TEXT", nullable: true), - ShopEntryId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ShopEntryItem", x => x.Id); - table.ForeignKey( - name: "FK_ShopEntryItem_ShopEntry_ShopEntryId", - column: x => x.ShopEntryId, - principalTable: "ShopEntry", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "StreamRoleBlacklistedUser", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Username = table.Column(type: "TEXT", nullable: true), - StreamRoleSettingsId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_StreamRoleBlacklistedUser", x => x.Id); - table.ForeignKey( - name: "FK_StreamRoleBlacklistedUser_StreamRoleSettings_StreamRoleSettingsId", - column: x => x.StreamRoleSettingsId, - principalTable: "StreamRoleSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "StreamRoleWhitelistedUser", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Username = table.Column(type: "TEXT", nullable: true), - StreamRoleSettingsId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_StreamRoleWhitelistedUser", x => x.Id); - table.ForeignKey( - name: "FK_StreamRoleWhitelistedUser_StreamRoleSettings_StreamRoleSettingsId", - column: x => x.StreamRoleSettingsId, - principalTable: "StreamRoleSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "ExcludedItem", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ItemId = table.Column(type: "INTEGER", nullable: false), - ItemType = table.Column(type: "INTEGER", nullable: false), - XpSettingsId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ExcludedItem", x => x.Id); - table.ForeignKey( - name: "FK_ExcludedItem_XpSettings_XpSettingsId", - column: x => x.XpSettingsId, - principalTable: "XpSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "XpCurrencyReward", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - XpSettingsId = table.Column(type: "INTEGER", nullable: false), - Level = table.Column(type: "INTEGER", nullable: false), - Amount = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_XpCurrencyReward", x => x.Id); - table.ForeignKey( - name: "FK_XpCurrencyReward_XpSettings_XpSettingsId", - column: x => x.XpSettingsId, - principalTable: "XpSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "XpRoleReward", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - XpSettingsId = table.Column(type: "INTEGER", nullable: false), - Level = table.Column(type: "INTEGER", nullable: false), - RoleId = table.Column(type: "INTEGER", nullable: false), - Remove = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_XpRoleReward", x => x.Id); - table.ForeignKey( - name: "FK_XpRoleReward_XpSettings_XpSettingsId", - column: x => x.XpSettingsId, - principalTable: "XpSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ClubApplicants", - columns: table => new - { - ClubId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ClubApplicants", x => new { x.ClubId, x.UserId }); - }); - - migrationBuilder.CreateTable( - name: "ClubBans", - columns: table => new - { - ClubId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ClubBans", x => new { x.ClubId, x.UserId }); - }); - - migrationBuilder.CreateTable( - name: "DiscordUser", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Username = table.Column(type: "TEXT", nullable: true), - Discriminator = table.Column(type: "TEXT", nullable: true), - AvatarId = table.Column(type: "TEXT", nullable: true), - ClubId = table.Column(type: "INTEGER", nullable: true), - IsClubAdmin = table.Column(type: "INTEGER", nullable: false), - TotalXp = table.Column(type: "INTEGER", nullable: false), - LastLevelUp = table.Column(type: "TEXT", nullable: false, defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)), - LastXpGain = table.Column(type: "TEXT", nullable: false), - NotifyOnLevelUp = table.Column(type: "INTEGER", nullable: false), - CurrencyAmount = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_DiscordUser", x => x.Id); - table.UniqueConstraint("AK_DiscordUser_UserId", x => x.UserId); - }); - - migrationBuilder.CreateTable( - name: "Clubs", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Name = table.Column(type: "TEXT", maxLength: 20, nullable: false), - Discrim = table.Column(type: "INTEGER", nullable: false), - ImageUrl = table.Column(type: "TEXT", nullable: true), - MinimumLevelReq = table.Column(type: "INTEGER", nullable: false), - Xp = table.Column(type: "INTEGER", nullable: false), - OwnerId = table.Column(type: "INTEGER", nullable: false), - Description = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Clubs", x => x.Id); - table.UniqueConstraint("AK_Clubs_Name_Discrim", x => new { x.Name, x.Discrim }); - table.ForeignKey( - name: "FK_Clubs_DiscordUser_OwnerId", - column: x => x.OwnerId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "WaifuInfo", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - WaifuId = table.Column(type: "INTEGER", nullable: false), - ClaimerId = table.Column(type: "INTEGER", nullable: true), - AffinityId = table.Column(type: "INTEGER", nullable: true), - Price = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_WaifuInfo", x => x.Id); - table.ForeignKey( - name: "FK_WaifuInfo_DiscordUser_AffinityId", - column: x => x.AffinityId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_WaifuInfo_DiscordUser_ClaimerId", - column: x => x.ClaimerId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_WaifuInfo_DiscordUser_WaifuId", - column: x => x.WaifuId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "WaifuUpdates", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - UpdateType = table.Column(type: "INTEGER", nullable: false), - OldId = table.Column(type: "INTEGER", nullable: true), - NewId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_WaifuUpdates", x => x.Id); - table.ForeignKey( - name: "FK_WaifuUpdates_DiscordUser_NewId", - column: x => x.NewId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_WaifuUpdates_DiscordUser_OldId", - column: x => x.OldId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_WaifuUpdates_DiscordUser_UserId", - column: x => x.UserId, - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "WaifuItem", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - WaifuInfoId = table.Column(type: "INTEGER", nullable: true), - ItemEmoji = table.Column(type: "TEXT", nullable: true), - Name = table.Column(type: "TEXT", nullable: true), - Price = table.Column(type: "INTEGER", nullable: false), - Item = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_WaifuItem", x => x.Id); - table.ForeignKey( - name: "FK_WaifuItem_WaifuInfo_WaifuInfoId", - column: x => x.WaifuInfoId, - principalTable: "WaifuInfo", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_AntiAltSetting_GuildConfigId", - table: "AntiAltSetting", - column: "GuildConfigId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AntiRaidSetting_GuildConfigId", - table: "AntiRaidSetting", - column: "GuildConfigId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AntiSpamIgnore_AntiSpamSettingId", - table: "AntiSpamIgnore", - column: "AntiSpamSettingId"); - - migrationBuilder.CreateIndex( - name: "IX_AntiSpamSetting_GuildConfigId", - table: "AntiSpamSetting", - column: "GuildConfigId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_BanTemplates_GuildId", - table: "BanTemplates", - column: "GuildId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ClubApplicants_UserId", - table: "ClubApplicants", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_ClubBans_UserId", - table: "ClubBans", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Clubs_OwnerId", - table: "Clubs", - column: "OwnerId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_CommandAlias_GuildConfigId", - table: "CommandAlias", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_CommandCooldown_GuildConfigId", - table: "CommandCooldown", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_CurrencyTransactions_UserId", - table: "CurrencyTransactions", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_DelMsgOnCmdChannel_GuildConfigId", - table: "DelMsgOnCmdChannel", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_DiscordPermOverrides_GuildId_Command", - table: "DiscordPermOverrides", - columns: new[] { "GuildId", "Command" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_DiscordUser_ClubId", - table: "DiscordUser", - column: "ClubId"); - - migrationBuilder.CreateIndex( - name: "IX_DiscordUser_CurrencyAmount", - table: "DiscordUser", - column: "CurrencyAmount"); - - migrationBuilder.CreateIndex( - name: "IX_DiscordUser_TotalXp", - table: "DiscordUser", - column: "TotalXp"); - - migrationBuilder.CreateIndex( - name: "IX_DiscordUser_UserId", - table: "DiscordUser", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_ExcludedItem_XpSettingsId", - table: "ExcludedItem", - column: "XpSettingsId"); - - migrationBuilder.CreateIndex( - name: "IX_FilterChannelId_GuildConfigId", - table: "FilterChannelId", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_FilterChannelId_GuildConfigId1", - table: "FilterChannelId", - column: "GuildConfigId1"); - - migrationBuilder.CreateIndex( - name: "IX_FilteredWord_GuildConfigId", - table: "FilteredWord", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_FilterLinksChannelId_GuildConfigId", - table: "FilterLinksChannelId", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_FollowedStream_GuildConfigId", - table: "FollowedStream", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_GCChannelId_GuildConfigId", - table: "GCChannelId", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_GroupName_GuildConfigId_Number", - table: "GroupName", - columns: new[] { "GuildConfigId", "Number" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_GuildId", - table: "GuildConfigs", - column: "GuildId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_LogSettingId", - table: "GuildConfigs", - column: "LogSettingId"); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_RootPermissionId", - table: "GuildConfigs", - column: "RootPermissionId"); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_WarnExpireHours", - table: "GuildConfigs", - column: "WarnExpireHours"); - - migrationBuilder.CreateIndex( - name: "IX_IgnoredLogChannels_LogSettingId", - table: "IgnoredLogChannels", - column: "LogSettingId"); - - migrationBuilder.CreateIndex( - name: "IX_IgnoredVoicePresenceCHannels_LogSettingId", - table: "IgnoredVoicePresenceCHannels", - column: "LogSettingId"); - - migrationBuilder.CreateIndex( - name: "IX_MusicPlayerSettings_GuildId", - table: "MusicPlayerSettings", - column: "GuildId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_MutedUserId_GuildConfigId", - table: "MutedUserId", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_NsfwBlacklitedTag_GuildConfigId", - table: "NsfwBlacklitedTag", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_Permission_NextId", - table: "Permission", - column: "NextId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Permissionv2_GuildConfigId", - table: "Permissionv2", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_PlantedCurrency_ChannelId", - table: "PlantedCurrency", - column: "ChannelId"); - - migrationBuilder.CreateIndex( - name: "IX_PlantedCurrency_MessageId", - table: "PlantedCurrency", - column: "MessageId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_PlaylistSong_MusicPlaylistId", - table: "PlaylistSong", - column: "MusicPlaylistId"); - - migrationBuilder.CreateIndex( - name: "IX_Poll_GuildId", - table: "Poll", - column: "GuildId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_PollAnswer_PollId", - table: "PollAnswer", - column: "PollId"); - - migrationBuilder.CreateIndex( - name: "IX_PollVote_PollId", - table: "PollVote", - column: "PollId"); - - migrationBuilder.CreateIndex( - name: "IX_Quotes_GuildId", - table: "Quotes", - column: "GuildId"); - - migrationBuilder.CreateIndex( - name: "IX_Quotes_Keyword", - table: "Quotes", - column: "Keyword"); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRole_ReactionRoleMessageId", - table: "ReactionRole", - column: "ReactionRoleMessageId"); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRoleMessage_GuildConfigId", - table: "ReactionRoleMessage", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_Reminders_When", - table: "Reminders", - column: "When"); - - migrationBuilder.CreateIndex( - name: "IX_RewardedUsers_PatreonUserId", - table: "RewardedUsers", - column: "PatreonUserId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_SelfAssignableRoles_GuildId_RoleId", - table: "SelfAssignableRoles", - columns: new[] { "GuildId", "RoleId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ShopEntry_GuildConfigId", - table: "ShopEntry", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_ShopEntryItem_ShopEntryId", - table: "ShopEntryItem", - column: "ShopEntryId"); - - migrationBuilder.CreateIndex( - name: "IX_SlowmodeIgnoredRole_GuildConfigId", - table: "SlowmodeIgnoredRole", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_SlowmodeIgnoredUser_GuildConfigId", - table: "SlowmodeIgnoredUser", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_StreamRoleBlacklistedUser_StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser", - column: "StreamRoleSettingsId"); - - migrationBuilder.CreateIndex( - name: "IX_StreamRoleSettings_GuildConfigId", - table: "StreamRoleSettings", - column: "GuildConfigId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_StreamRoleWhitelistedUser_StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser", - column: "StreamRoleSettingsId"); - - migrationBuilder.CreateIndex( - name: "IX_UnbanTimer_GuildConfigId", - table: "UnbanTimer", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_UnmuteTimer_GuildConfigId", - table: "UnmuteTimer", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_UnroleTimer_GuildConfigId", - table: "UnroleTimer", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_UserXpStats_AwardedXp", - table: "UserXpStats", - column: "AwardedXp"); - - migrationBuilder.CreateIndex( - name: "IX_UserXpStats_GuildId", - table: "UserXpStats", - column: "GuildId"); - - migrationBuilder.CreateIndex( - name: "IX_UserXpStats_UserId", - table: "UserXpStats", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserXpStats_UserId_GuildId", - table: "UserXpStats", - columns: new[] { "UserId", "GuildId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_UserXpStats_Xp", - table: "UserXpStats", - column: "Xp"); - - migrationBuilder.CreateIndex( - name: "IX_VcRoleInfo_GuildConfigId", - table: "VcRoleInfo", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuInfo_AffinityId", - table: "WaifuInfo", - column: "AffinityId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuInfo_ClaimerId", - table: "WaifuInfo", - column: "ClaimerId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuInfo_Price", - table: "WaifuInfo", - column: "Price"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuInfo_WaifuId", - table: "WaifuInfo", - column: "WaifuId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_WaifuItem_WaifuInfoId", - table: "WaifuItem", - column: "WaifuInfoId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuUpdates_NewId", - table: "WaifuUpdates", - column: "NewId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuUpdates_OldId", - table: "WaifuUpdates", - column: "OldId"); - - migrationBuilder.CreateIndex( - name: "IX_WaifuUpdates_UserId", - table: "WaifuUpdates", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_WarningPunishment_GuildConfigId", - table: "WarningPunishment", - column: "GuildConfigId"); - - migrationBuilder.CreateIndex( - name: "IX_Warnings_DateAdded", - table: "Warnings", - column: "DateAdded"); - - migrationBuilder.CreateIndex( - name: "IX_Warnings_GuildId", - table: "Warnings", - column: "GuildId"); - - migrationBuilder.CreateIndex( - name: "IX_Warnings_UserId", - table: "Warnings", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_XpCurrencyReward_XpSettingsId", - table: "XpCurrencyReward", - column: "XpSettingsId"); - - migrationBuilder.CreateIndex( - name: "IX_XpRoleReward_XpSettingsId_Level", - table: "XpRoleReward", - columns: new[] { "XpSettingsId", "Level" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_XpSettings_GuildConfigId", - table: "XpSettings", - column: "GuildConfigId", - unique: true); - - migrationBuilder.AddForeignKey( - name: "FK_ClubApplicants_Clubs_ClubId", - table: "ClubApplicants", - column: "ClubId", - principalTable: "Clubs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ClubApplicants_DiscordUser_UserId", - table: "ClubApplicants", - column: "UserId", - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ClubBans_Clubs_ClubId", - table: "ClubBans", - column: "ClubId", - principalTable: "Clubs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ClubBans_DiscordUser_UserId", - table: "ClubBans", - column: "UserId", - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_DiscordUser_Clubs_ClubId", - table: "DiscordUser", - column: "ClubId", - principalTable: "Clubs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_DiscordUser_Clubs_ClubId", - table: "DiscordUser"); - - migrationBuilder.DropTable( - name: "AntiAltSetting"); - - migrationBuilder.DropTable( - name: "AntiRaidSetting"); - - migrationBuilder.DropTable( - name: "AntiSpamIgnore"); - - migrationBuilder.DropTable( - name: "AutoCommands"); - - migrationBuilder.DropTable( - name: "BanTemplates"); - - migrationBuilder.DropTable( - name: "Blacklist"); - - migrationBuilder.DropTable( - name: "ClubApplicants"); - - migrationBuilder.DropTable( - name: "ClubBans"); - - migrationBuilder.DropTable( - name: "CommandAlias"); - - migrationBuilder.DropTable( - name: "CommandCooldown"); - - migrationBuilder.DropTable( - name: "CurrencyTransactions"); - - migrationBuilder.DropTable( - name: "CustomReactions"); - - migrationBuilder.DropTable( - name: "DelMsgOnCmdChannel"); - - migrationBuilder.DropTable( - name: "DiscordPermOverrides"); - - migrationBuilder.DropTable( - name: "ExcludedItem"); - - migrationBuilder.DropTable( - name: "FeedSub"); - - migrationBuilder.DropTable( - name: "FilterChannelId"); - - migrationBuilder.DropTable( - name: "FilteredWord"); - - migrationBuilder.DropTable( - name: "FilterLinksChannelId"); - - migrationBuilder.DropTable( - name: "FollowedStream"); - - migrationBuilder.DropTable( - name: "GCChannelId"); - - migrationBuilder.DropTable( - name: "GroupName"); - - migrationBuilder.DropTable( - name: "IgnoredLogChannels"); - - migrationBuilder.DropTable( - name: "IgnoredVoicePresenceCHannels"); - - migrationBuilder.DropTable( - name: "MusicPlayerSettings"); - - migrationBuilder.DropTable( - name: "MutedUserId"); - - migrationBuilder.DropTable( - name: "NsfwBlacklitedTag"); - - migrationBuilder.DropTable( - name: "Permissionv2"); - - migrationBuilder.DropTable( - name: "PlantedCurrency"); - - migrationBuilder.DropTable( - name: "PlaylistSong"); - - migrationBuilder.DropTable( - name: "PollAnswer"); - - migrationBuilder.DropTable( - name: "PollVote"); - - migrationBuilder.DropTable( - name: "Quotes"); - - migrationBuilder.DropTable( - name: "ReactionRole"); - - migrationBuilder.DropTable( - name: "Reminders"); - - migrationBuilder.DropTable( - name: "Repeaters"); - - migrationBuilder.DropTable( - name: "RewardedUsers"); - - migrationBuilder.DropTable( - name: "RotatingStatus"); - - migrationBuilder.DropTable( - name: "SelfAssignableRoles"); - - migrationBuilder.DropTable( - name: "ShopEntryItem"); - - migrationBuilder.DropTable( - name: "SlowmodeIgnoredRole"); - - migrationBuilder.DropTable( - name: "SlowmodeIgnoredUser"); - - migrationBuilder.DropTable( - name: "Stakes"); - - migrationBuilder.DropTable( - name: "StreamRoleBlacklistedUser"); - - migrationBuilder.DropTable( - name: "StreamRoleWhitelistedUser"); - - migrationBuilder.DropTable( - name: "UnbanTimer"); - - migrationBuilder.DropTable( - name: "UnmuteTimer"); - - migrationBuilder.DropTable( - name: "UnroleTimer"); - - migrationBuilder.DropTable( - name: "UserXpStats"); - - migrationBuilder.DropTable( - name: "VcRoleInfo"); - - migrationBuilder.DropTable( - name: "WaifuItem"); - - migrationBuilder.DropTable( - name: "WaifuUpdates"); - - migrationBuilder.DropTable( - name: "WarningPunishment"); - - migrationBuilder.DropTable( - name: "Warnings"); - - migrationBuilder.DropTable( - name: "XpCurrencyReward"); - - migrationBuilder.DropTable( - name: "XpRoleReward"); - - migrationBuilder.DropTable( - name: "AntiSpamSetting"); - - migrationBuilder.DropTable( - name: "MusicPlaylists"); - - migrationBuilder.DropTable( - name: "Poll"); - - migrationBuilder.DropTable( - name: "ReactionRoleMessage"); - - migrationBuilder.DropTable( - name: "ShopEntry"); - - migrationBuilder.DropTable( - name: "StreamRoleSettings"); - - migrationBuilder.DropTable( - name: "WaifuInfo"); - - migrationBuilder.DropTable( - name: "XpSettings"); - - migrationBuilder.DropTable( - name: "GuildConfigs"); - - migrationBuilder.DropTable( - name: "LogSettings"); - - migrationBuilder.DropTable( - name: "Permission"); - - migrationBuilder.DropTable( - name: "Clubs"); - - migrationBuilder.DropTable( - name: "DiscordUser"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.Designer.cs deleted file mode 100644 index 07c24ec..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.Designer.cs +++ /dev/null @@ -1,2625 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210707002343_cleanup")] - partial class cleanup - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("LogSettingId"); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs deleted file mode 100644 index 1d2dc92..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs +++ /dev/null @@ -1,493 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class cleanup : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_GuildConfigs_Permission_RootPermissionId", - table: "GuildConfigs"); - - migrationBuilder.Sql("UPDATE Permission SET NextId = NULL;"); - - migrationBuilder.Sql("DELETE FROM FilteredWord WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)"); - migrationBuilder.Sql("DELETE FROM FilterChannelId WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)"); - migrationBuilder.Sql("DELETE FROM CommandCooldown WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)"); - - // fix for users who edited their waifuinfo table manually and are unable to update - migrationBuilder.Sql("DELETE FROM WaifuInfo where WaifuId not in (SELECT Id from DiscordUser);"); - - // fix for users who deleted clubs manually and are unable to update now - migrationBuilder.Sql("UPDATE DiscordUser SET ClubId = null WHERE ClubId is not null and ClubId not in (SELECT Id from Clubs);"); - - migrationBuilder.DropColumn( - name: "ChannelCreated", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "ChannelDestroyed", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "ChannelId", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "ChannelUpdated", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "IsLogging", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "LogUserPresence", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "LogVoicePresence", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "MessageDeleted", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "MessageUpdated", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserBanned", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserJoined", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserLeft", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserPresenceChannelId", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserUnbanned", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "UserUpdated", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "VoicePresenceChannelId", - table: "LogSettings"); - - // FUTURE cleanup guildconfigs which have logsettings id set to null - migrationBuilder.Sql("UPDATE GuildConfigs SET LogSettingId = null WHERE LogSettingId NOT IN (SELECT Id from LogSettings)"); - - migrationBuilder.DropTable( - name: "Permission"); - - migrationBuilder.DropTable( - name: "Stakes"); - - migrationBuilder.DropIndex( - name: "IX_GuildConfigs_RootPermissionId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "NotifyMessage", - table: "XpSettings"); - - migrationBuilder.DropColumn( - name: "XpRoleRewardExclusive", - table: "XpSettings"); - - migrationBuilder.DropColumn( - name: "Item", - table: "WaifuItem"); - - migrationBuilder.DropColumn( - name: "Price", - table: "WaifuItem"); - - migrationBuilder.DropColumn( - name: "UseCount", - table: "Quotes"); - - migrationBuilder.DropColumn( - name: "AutoAssignRoleId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "AutoDcFromVc", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "DefaultMusicVolume", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "RootPermissionId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "VoicePlusTextEnabled", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "IsRegex", - table: "CustomReactions"); - - migrationBuilder.DropColumn( - name: "OwnerOnly", - table: "CustomReactions"); - - migrationBuilder.DropColumn( - name: "UseCount", - table: "CustomReactions"); - - migrationBuilder.AlterColumn( - name: "NotifyOnLevelUp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "LastXpGain", - table: "DiscordUser", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now', '-1 years')", - oldClrType: typeof(DateTime), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "LastLevelUp", - table: "DiscordUser", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now')", - oldClrType: typeof(DateTime), - oldType: "TEXT", - oldDefaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); - - migrationBuilder.AlterColumn( - name: "IsClubAdmin", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: false, - oldClrType: typeof(bool), - oldType: "INTEGER"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "NotifyMessage", - table: "XpSettings", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "XpRoleRewardExclusive", - table: "XpSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "Item", - table: "WaifuItem", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Price", - table: "WaifuItem", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "UseCount", - table: "Quotes", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "ChannelCreated", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "ChannelDestroyed", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "ChannelId", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "ChannelUpdated", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "IsLogging", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "LogUserPresence", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "LogVoicePresence", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "MessageDeleted", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "MessageUpdated", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UserBanned", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UserJoined", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UserLeft", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UserPresenceChannelId", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "UserUnbanned", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UserUpdated", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "VoicePresenceChannelId", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "AutoAssignRoleId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "AutoDcFromVc", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "DefaultMusicVolume", - table: "GuildConfigs", - type: "REAL", - nullable: false, - defaultValue: 0f); - - migrationBuilder.AddColumn( - name: "RootPermissionId", - table: "GuildConfigs", - type: "INTEGER", - nullable: true); - - migrationBuilder.AddColumn( - name: "VoicePlusTextEnabled", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "NotifyOnLevelUp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - oldClrType: typeof(int), - oldType: "INTEGER", - oldDefaultValue: 0); - - migrationBuilder.AlterColumn( - name: "LastXpGain", - table: "DiscordUser", - type: "TEXT", - nullable: false, - oldClrType: typeof(DateTime), - oldType: "TEXT", - oldDefaultValueSql: "datetime('now', '-1 years')"); - - migrationBuilder.AlterColumn( - name: "LastLevelUp", - table: "DiscordUser", - type: "TEXT", - nullable: false, - defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local), - oldClrType: typeof(DateTime), - oldType: "TEXT", - oldDefaultValueSql: "datetime('now')"); - - migrationBuilder.AlterColumn( - name: "IsClubAdmin", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER", - oldDefaultValue: false); - - migrationBuilder.AddColumn( - name: "IsRegex", - table: "CustomReactions", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "OwnerOnly", - table: "CustomReactions", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "UseCount", - table: "CustomReactions", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.CreateTable( - name: "Permission", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - NextId = table.Column(type: "INTEGER", nullable: true), - PrimaryTarget = table.Column(type: "INTEGER", nullable: false), - PrimaryTargetId = table.Column(type: "INTEGER", nullable: false), - SecondaryTarget = table.Column(type: "INTEGER", nullable: false), - SecondaryTargetName = table.Column(type: "TEXT", nullable: true), - State = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Permission", x => x.Id); - table.ForeignKey( - name: "FK_Permission_Permission_NextId", - column: x => x.NextId, - principalTable: "Permission", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Stakes", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Amount = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true), - Source = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Stakes", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_RootPermissionId", - table: "GuildConfigs", - column: "RootPermissionId"); - - migrationBuilder.CreateIndex( - name: "IX_Permission_NextId", - table: "Permission", - column: "NextId", - unique: true); - - migrationBuilder.AddForeignKey( - name: "FK_GuildConfigs_Permission_RootPermissionId", - table: "GuildConfigs", - column: "RootPermissionId", - principalTable: "Permission", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.Designer.cs deleted file mode 100644 index bbf13ab..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.Designer.cs +++ /dev/null @@ -1,2626 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210911225622_rero-cascade")] - partial class rerocascade - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("LogSettingId"); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.cs b/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.cs deleted file mode 100644 index 9fea8c2..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210911225622_rero-cascade.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class rerocascade : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - table: "ReactionRole"); - - migrationBuilder.AddForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - table: "ReactionRole", - column: "ReactionRoleMessageId", - principalTable: "ReactionRoleMessage", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - table: "ReactionRole"); - - migrationBuilder.AddForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - table: "ReactionRole", - column: "ReactionRoleMessageId", - principalTable: "ReactionRoleMessage", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.Designer.cs deleted file mode 100644 index ffe2144..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.Designer.cs +++ /dev/null @@ -1,2638 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210912182515_boost-messages")] - partial class boostmessages - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("LogSettingId"); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.cs b/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.cs deleted file mode 100644 index ede857e..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210912182515_boost-messages.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class boostmessages : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "BoostMessage", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "SendBoostMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "BoostMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendBoostMessage", - table: "GuildConfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.Designer.cs deleted file mode 100644 index 6559514..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.Designer.cs +++ /dev/null @@ -1,2630 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210912200106_logsettings-independence")] - partial class logsettingsindependence - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.cs b/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.cs deleted file mode 100644 index c2ca0ec..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210912200106_logsettings-independence.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class logsettingsindependence : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "GuildId", - table: "LogSettings", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.Sql( - @"UPDATE LogSettings SET GuildId = (SELECT GuildId FROM GuildConfigs WHERE LogSettingId = LogSettings.Id); - DELETE FROM LogSettings WHERE GuildId = 0;"); - - migrationBuilder.DropForeignKey( - name: "FK_GuildConfigs_LogSettings_LogSettingId", - table: "GuildConfigs"); - - migrationBuilder.DropIndex( - name: "IX_GuildConfigs_LogSettingId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "LogSettingId", - table: "GuildConfigs"); - - migrationBuilder.CreateIndex( - name: "IX_LogSettings_GuildId", - table: "LogSettings", - column: "GuildId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_LogSettings_GuildId", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "GuildId", - table: "LogSettings"); - - migrationBuilder.AddColumn( - name: "LogSettingId", - table: "GuildConfigs", - type: "INTEGER", - nullable: true); - - migrationBuilder.CreateIndex( - name: "IX_GuildConfigs_LogSettingId", - table: "GuildConfigs", - column: "LogSettingId"); - - migrationBuilder.AddForeignKey( - name: "FK_GuildConfigs_LogSettings_LogSettingId", - table: "GuildConfigs", - column: "LogSettingId", - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.Designer.cs deleted file mode 100644 index 22804b3..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.Designer.cs +++ /dev/null @@ -1,2653 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210914180026_image-only-channels")] - partial class imageonlychannels - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredChannels") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("IgnoredVoicePresenceChannelIds") - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("IgnoredChannels"); - - b.Navigation("IgnoredVoicePresenceChannelIds"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs deleted file mode 100644 index 5dfbf73..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class imageonlychannels : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ImageOnlyChannels", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ImageOnlyChannels", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_ImageOnlyChannels_ChannelId", - table: "ImageOnlyChannels", - column: "ChannelId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ImageOnlyChannels"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.Designer.cs b/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.Designer.cs deleted file mode 100644 index 736c7f8..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.Designer.cs +++ /dev/null @@ -1,2657 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20210921204645_logignore-user-channel")] - partial class logignoreuserchannel - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("NsfwBlacklitedTag"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklitedTag", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("NsfwBlacklistedTags") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("NsfwBlacklistedTags"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.cs b/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.cs deleted file mode 100644 index e514082..0000000 --- a/src/EllieBot/Migrations/Sqlite/20210921204645_logignore-user-channel.cs +++ /dev/null @@ -1,97 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class logignoreuserchannel : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.Sql("DELETE FROM IgnoredLogChannels WHERE LogSettingId is NULL"); - - migrationBuilder.DropForeignKey( - name: "FK_IgnoredLogChannels_LogSettings_LogSettingId", - table: "IgnoredLogChannels"); - - migrationBuilder.DropIndex( - name: "IX_IgnoredLogChannels_LogSettingId", - table: "IgnoredLogChannels"); - - migrationBuilder.RenameColumn( - name: "ChannelId", - table: "IgnoredLogChannels", - newName: "LogItemId"); - - migrationBuilder.AlterColumn( - name: "LogSettingId", - table: "IgnoredLogChannels", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "ItemType", - table: "IgnoredLogChannels", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateIndex( - name: "IX_IgnoredLogChannels_LogSettingId_LogItemId_ItemType", - table: "IgnoredLogChannels", - columns: new[] { "LogSettingId", "LogItemId", "ItemType" }, - unique: true); - - migrationBuilder.AddForeignKey( - name: "FK_IgnoredLogChannels_LogSettings_LogSettingId", - table: "IgnoredLogChannels", - column: "LogSettingId", - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_IgnoredLogChannels_LogSettings_LogSettingId", - table: "IgnoredLogChannels"); - - migrationBuilder.DropIndex( - name: "IX_IgnoredLogChannels_LogSettingId_LogItemId_ItemType", - table: "IgnoredLogChannels"); - - migrationBuilder.DropColumn( - name: "ItemType", - table: "IgnoredLogChannels"); - - migrationBuilder.RenameColumn( - name: "LogItemId", - table: "IgnoredLogChannels", - newName: "ChannelId"); - - migrationBuilder.AlterColumn( - name: "LogSettingId", - table: "IgnoredLogChannels", - type: "INTEGER", - nullable: true, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.CreateIndex( - name: "IX_IgnoredLogChannels_LogSettingId", - table: "IgnoredLogChannels", - column: "LogSettingId"); - - migrationBuilder.AddForeignKey( - name: "FK_IgnoredLogChannels_LogSettings_LogSettingId", - table: "IgnoredLogChannels", - column: "LogSettingId", - principalTable: "LogSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.Designer.cs b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.Designer.cs deleted file mode 100644 index 5e95672..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.Designer.cs +++ /dev/null @@ -1,2648 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20211015232708_nsfw-blacklist-tags")] - partial class nsfwblacklisttags - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs deleted file mode 100644 index 760e27f..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class nsfwblacklisttags : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - - migrationBuilder.CreateTable( - name: "NsfwBlacklistedTags", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Tag = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_NsfwBlacklistedTags", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_NsfwBlacklistedTags_GuildId", - table: "NsfwBlacklistedTags", - column: "GuildId"); - - migrationBuilder.Sql(@"INSERT INTO NsfwBlacklistedTags(Id, GuildId, Tag, DateAdded) -SELECT - Id, - (SELECT GuildId From GuildConfigs WHERE Id=GuildConfigId), - Tag, - DateAdded -FROM NsfwBlacklitedTag -WHERE GuildConfigId in (SELECT Id from GuildConfigs);"); - - migrationBuilder.DropTable( - name: "NsfwBlacklitedTag"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "NsfwBlacklistedTags"); - - migrationBuilder.CreateTable( - name: "NsfwBlacklitedTag", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - Tag = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_NsfwBlacklitedTag", x => x.Id); - table.ForeignKey( - name: "FK_NsfwBlacklitedTag_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_NsfwBlacklitedTag_GuildConfigId", - table: "NsfwBlacklitedTag", - column: "GuildConfigId"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.Designer.cs b/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.Designer.cs deleted file mode 100644 index 7a3204a..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.Designer.cs +++ /dev/null @@ -1,2653 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20211121002508_weighted-warnings")] - partial class weightedwarnings - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.cs b/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.cs deleted file mode 100644 index ed341d7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211121002508_weighted-warnings.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class weightedwarnings : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Weight", - table: "Warnings", - type: "INTEGER", - nullable: false, - defaultValue: 1); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Weight", - table: "Warnings"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.Designer.cs b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.Designer.cs deleted file mode 100644 index 4642aca..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.Designer.cs +++ /dev/null @@ -1,2725 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20211213145407_atl-rework")] - partial class atlrework - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("CustomReactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissionv2"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilteredWords"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs deleted file mode 100644 index bb7df2b..0000000 --- a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs +++ /dev/null @@ -1,70 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EllieBot.Migrations -{ - public partial class atlrework : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AutoTranslateChannels", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - AutoDelete = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AutoTranslateChannels", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AutoTranslateUsers", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false), - Source = table.Column(type: "TEXT", nullable: true), - Target = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AutoTranslateUsers", x => x.Id); - table.UniqueConstraint("AK_AutoTranslateUsers_ChannelId_UserId", x => new { x.ChannelId, x.UserId }); - table.ForeignKey( - name: "FK_AutoTranslateUsers_AutoTranslateChannels_ChannelId", - column: x => x.ChannelId, - principalTable: "AutoTranslateChannels", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AutoTranslateChannels_ChannelId", - table: "AutoTranslateChannels", - column: "ChannelId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AutoTranslateChannels_GuildId", - table: "AutoTranslateChannels", - column: "GuildId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AutoTranslateUsers"); - - migrationBuilder.DropTable( - name: "AutoTranslateChannels"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs deleted file mode 100644 index 31cc3a7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs +++ /dev/null @@ -1,2726 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220102102344_crs-rename-to-expressions-perm-rename")] - partial class crsrenametoexpressionspermrename - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.1"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CustomReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId1") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.HasIndex("GuildConfigId1"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId1"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.cs b/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.cs deleted file mode 100644 index 2fad8c2..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220102102344_crs-rename-to-expressions-perm-rename.cs +++ /dev/null @@ -1,118 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class crsrenametoexpressionspermrename : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Permissionv2_GuildConfigs_GuildConfigId", - table: "Permissionv2"); - - migrationBuilder.DropPrimaryKey( - name: "PK_Permissionv2", - table: "Permissionv2"); - - migrationBuilder.DropPrimaryKey( - name: "PK_CustomReactions", - table: "CustomReactions"); - - migrationBuilder.RenameTable( - name: "Permissionv2", - newName: "Permissions"); - - migrationBuilder.RenameTable( - name: "CustomReactions", - newName: "Expressions"); - - migrationBuilder.RenameIndex( - name: "IX_Permissionv2_GuildConfigId", - table: "Permissions", - newName: "IX_Permissions_GuildConfigId"); - - migrationBuilder.AddPrimaryKey( - name: "PK_Permissions", - table: "Permissions", - column: "Id"); - - migrationBuilder.AddPrimaryKey( - name: "PK_Expressions", - table: "Expressions", - column: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.Sql(@"UPDATE Permissions -SET SecondaryTargetName='ACTUALEXPRESSIONS' -WHERE SecondaryTargetName='ActualCustomReactions' COLLATE NOCASE;"); - - migrationBuilder.Sql(@"UPDATE Permissions -SET SecondaryTargetName='EXPRESSIONS' -WHERE SecondaryTargetName='CustomReactions' COLLATE NOCASE;"); - - migrationBuilder.Sql(@"UPDATE Permissions -SET SecondaryTargetName= case lower(SecondaryTargetName) - WHEN 'editcustreact' THEN 'expredit' - WHEN 'delcustreact' THEN 'exprdel' - WHEN 'listcustreact' THEN 'exprlist' - WHEN 'addcustreact' THEN 'expradd' - WHEN 'showcustreact' THEN 'exprshow' -ELSE SecondaryTargetName -END -WHERE lower(SecondaryTargetName) in ('editcustreact', 'delcustreact', 'listcustreact', 'addcustreact', 'showcustreact');"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions"); - - migrationBuilder.DropPrimaryKey( - name: "PK_Permissions", - table: "Permissions"); - - migrationBuilder.DropPrimaryKey( - name: "PK_Expressions", - table: "Expressions"); - - migrationBuilder.RenameTable( - name: "Permissions", - newName: "Permissionv2"); - - migrationBuilder.RenameTable( - name: "Expressions", - newName: "CustomReactions"); - - migrationBuilder.RenameIndex( - name: "IX_Permissions_GuildConfigId", - table: "Permissionv2", - newName: "IX_Permissionv2_GuildConfigId"); - - migrationBuilder.AddPrimaryKey( - name: "PK_Permissionv2", - table: "Permissionv2", - column: "Id"); - - migrationBuilder.AddPrimaryKey( - name: "PK_CustomReactions", - table: "CustomReactions", - column: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_Permissionv2_GuildConfigs_GuildConfigId", - table: "Permissionv2", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.Designer.cs deleted file mode 100644 index 5e3be33..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.Designer.cs +++ /dev/null @@ -1,2746 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220110105942_filter-settings-cleanup")] - partial class filtersettingscleanup - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.1"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs deleted file mode 100644 index 0920046..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs +++ /dev/null @@ -1,81 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class filtersettingscleanup : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId1", - table: "FilterChannelId"); - - migrationBuilder.DropIndex( - name: "IX_FilterChannelId_GuildConfigId1", - table: "FilterChannelId"); - - migrationBuilder.CreateTable( - name: "FilterWordsChannelId", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - GuildConfigId = table.Column(type: "INTEGER", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FilterWordsChannelId", x => x.Id); - table.ForeignKey( - name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_FilterWordsChannelId_GuildConfigId", - table: "FilterWordsChannelId", - column: "GuildConfigId"); - - migrationBuilder.Sql(@"INSERT INTO FilterWordsChannelId(Id, ChannelId, GuildConfigId, DateAdded) -SELECT Id, ChannelId, GuildConfigId1, DateAdded -FROM FilterChannelId -WHERE GuildConfigId1 is not null; --- Remove them after moving them to a different table -DELETE FROM FilterChannelId -WHERE GuildConfigId is null;"); - - migrationBuilder.DropColumn( - name: "GuildConfigId1", - table: "FilterChannelId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "FilterWordsChannelId"); - - migrationBuilder.AddColumn( - name: "GuildConfigId1", - table: "FilterChannelId", - type: "INTEGER", - nullable: true); - - migrationBuilder.CreateIndex( - name: "IX_FilterChannelId_GuildConfigId1", - table: "FilterChannelId", - column: "GuildConfigId1"); - - migrationBuilder.AddForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId1", - table: "FilterChannelId", - column: "GuildConfigId1", - principalTable: "GuildConfigs", - principalColumn: "Id"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.Designer.cs deleted file mode 100644 index 132ec55..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.Designer.cs +++ /dev/null @@ -1,2763 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220125044401_curtrs-rework-discorduser-defaults")] - partial class curtrsreworkdiscorduserdefaults - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.1"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessages") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.cs b/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.cs deleted file mode 100644 index 2fb7395..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220125044401_curtrs-rework-discorduser-defaults.cs +++ /dev/null @@ -1,94 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class curtrsreworkdiscorduserdefaults : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "Reason", - table: "CurrencyTransactions", - newName: "Note"); - - migrationBuilder.AlterColumn( - name: "TotalXp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "CurrencyAmount", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: 0L, - oldClrType: typeof(long), - oldType: "INTEGER"); - - migrationBuilder.AddColumn( - name: "Extra", - table: "CurrencyTransactions", - type: "TEXT", - nullable: false, - defaultValue: ""); - - migrationBuilder.AddColumn( - name: "OtherId", - table: "CurrencyTransactions", - type: "INTEGER", - nullable: true, - defaultValueSql: "NULL"); - - migrationBuilder.AddColumn( - name: "Type", - table: "CurrencyTransactions", - type: "TEXT", - nullable: false, - defaultValue: ""); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Extra", - table: "CurrencyTransactions"); - - migrationBuilder.DropColumn( - name: "OtherId", - table: "CurrencyTransactions"); - - migrationBuilder.DropColumn( - name: "Type", - table: "CurrencyTransactions"); - - migrationBuilder.RenameColumn( - name: "Note", - table: "CurrencyTransactions", - newName: "Reason"); - - migrationBuilder.AlterColumn( - name: "TotalXp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - oldClrType: typeof(int), - oldType: "INTEGER", - oldDefaultValue: 0); - - migrationBuilder.AlterColumn( - name: "CurrencyAmount", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - oldClrType: typeof(long), - oldType: "INTEGER", - oldDefaultValue: 0L); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.Designer.cs deleted file mode 100644 index 65a38a5..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.Designer.cs +++ /dev/null @@ -1,2760 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220213123633_music-autoplay")] - partial class musicautoplay - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.2"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("Discrim") - .HasColumnType("INTEGER"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("MinimumLevelReq") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name", "Discrim"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Users") - .HasForeignKey("ClubId"); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", null) - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.cs b/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.cs deleted file mode 100644 index d838fe4..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220213123633_music-autoplay.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class musicautoplay : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - // these 2 settings weren't being used for a long time - migrationBuilder.DropColumn( - name: "AutoDeleteByeMessages", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "AutoDeleteGreetMessages", - table: "GuildConfigs"); - - migrationBuilder.AlterColumn( - name: "Weight", - table: "Warnings", - type: "INTEGER", - nullable: false, - defaultValue: 1L, - oldClrType: typeof(int), - oldType: "INTEGER", - oldDefaultValue: 1); - - migrationBuilder.AddColumn( - name: "AutoPlay", - table: "MusicPlayerSettings", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AutoPlay", - table: "MusicPlayerSettings"); - - migrationBuilder.AlterColumn( - name: "Weight", - table: "Warnings", - type: "INTEGER", - nullable: false, - defaultValue: 1, - oldClrType: typeof(long), - oldType: "INTEGER", - oldDefaultValue: 1L); - - migrationBuilder.AddColumn( - name: "AutoDeleteByeMessages", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "AutoDeleteGreetMessages", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.Designer.cs deleted file mode 100644 index fc93a94..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.Designer.cs +++ /dev/null @@ -1,2756 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220409170828_clubs-refactor")] - partial class clubsrefactor - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.3"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs deleted file mode 100644 index 1dc81f7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs +++ /dev/null @@ -1,131 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class clubsrefactor : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.Sql(@"UPDATE Clubs -SET Name = Name || '#' || Discrim -WHERE Discrim <> 1; - -UPDATE Clubs as co -SET Name = - CASE (select count(*) from Clubs as ci where co.Name == ci.Name) = 1 - WHEN true - THEN Name - ELSE - Name || '#' || Discrim - END - WHERE Discrim = 1;"); - - migrationBuilder.DropForeignKey( - name: "FK_Clubs_DiscordUser_OwnerId", - table: "Clubs"); - - migrationBuilder.DropUniqueConstraint( - name: "AK_Clubs_Name_Discrim", - table: "Clubs"); - - migrationBuilder.DropColumn( - name: "Discrim", - table: "Clubs"); - - migrationBuilder.DropColumn( - name: "MinimumLevelReq", - table: "Clubs"); - - migrationBuilder.AlterColumn( - name: "LastLevelUp", - table: "UserXpStats", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now')", - oldClrType: typeof(DateTime), - oldType: "TEXT", - oldDefaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); - - migrationBuilder.AlterColumn( - name: "OwnerId", - table: "Clubs", - type: "INTEGER", - nullable: true, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AddUniqueConstraint( - name: "AK_Clubs_Name", - table: "Clubs", - column: "Name"); - - migrationBuilder.AddForeignKey( - name: "FK_Clubs_DiscordUser_OwnerId", - table: "Clubs", - column: "OwnerId", - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.SetNull); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Clubs_DiscordUser_OwnerId", - table: "Clubs"); - - migrationBuilder.DropUniqueConstraint( - name: "AK_Clubs_Name", - table: "Clubs"); - - migrationBuilder.AlterColumn( - name: "LastLevelUp", - table: "UserXpStats", - type: "TEXT", - nullable: false, - defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local), - oldClrType: typeof(DateTime), - oldType: "TEXT", - oldDefaultValueSql: "datetime('now')"); - - migrationBuilder.AlterColumn( - name: "OwnerId", - table: "Clubs", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "Discrim", - table: "Clubs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "MinimumLevelReq", - table: "Clubs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddUniqueConstraint( - name: "AK_Clubs_Name_Discrim", - table: "Clubs", - columns: new[] { "Name", "Discrim" }); - - migrationBuilder.AddForeignKey( - name: "FK_Clubs_DiscordUser_OwnerId", - table: "Clubs", - column: "OwnerId", - principalTable: "DiscordUser", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.Designer.cs deleted file mode 100644 index 55d076b..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.Designer.cs +++ /dev/null @@ -1,2759 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220427200557_stondel")] - partial class stondel - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.3"); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.cs b/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.cs deleted file mode 100644 index 0bb114e..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220427200557_stondel.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class stondel : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DeleteStreamOnlineMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DeleteStreamOnlineMessage", - table: "GuildConfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.Designer.cs deleted file mode 100644 index b6aa609..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.Designer.cs +++ /dev/null @@ -1,2782 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220428051304_bank")] - partial class bank - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.3"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("EmoteName") - .HasColumnType("TEXT"); - - b.Property("ReactionRoleMessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ReactionRoleMessageId"); - - b.ToTable("ReactionRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Exclusive") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ReactionRoleMessage"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) - .WithMany("ReactionRoles") - .HasForeignKey("ReactionRoleMessageId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("ReactionRoleMessages") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("ReactionRoleMessages"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => - { - b.Navigation("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs deleted file mode 100644 index b3efa7e..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class bank : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "BankUsers", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Balance = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_BankUsers", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_BankUsers_UserId", - table: "BankUsers", - column: "UserId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "BankUsers"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.Designer.cs deleted file mode 100644 index 9d8eb43..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.Designer.cs +++ /dev/null @@ -1,2741 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220503234243_new-rero")] - partial class newrero - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.3"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .HasColumnType("INTEGER"); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PatreonUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PatreonUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs deleted file mode 100644 index dce2e4b..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class newrero : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ReactionRoles", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false), - Emote = table.Column(type: "TEXT", maxLength: 100, nullable: true), - RoleId = table.Column(type: "INTEGER", nullable: false), - Group = table.Column(type: "INTEGER", nullable: false), - LevelReq = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ReactionRoles", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRoles_GuildId", - table: "ReactionRoles", - column: "GuildId"); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRoles_MessageId_Emote", - table: "ReactionRoles", - columns: new[] { "MessageId", "Emote" }, - unique: true); - - MigrationQueries.MigrateRero(migrationBuilder); - - migrationBuilder.DropTable( - name: "ReactionRole"); - - migrationBuilder.DropTable( - name: "ReactionRoleMessage"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ReactionRoles"); - - migrationBuilder.CreateTable( - name: "ReactionRoleMessage", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildConfigId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true), - Exclusive = table.Column(type: "INTEGER", nullable: false), - Index = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ReactionRoleMessage", x => x.Id); - table.ForeignKey( - name: "FK_ReactionRoleMessage_GuildConfigs_GuildConfigId", - column: x => x.GuildConfigId, - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ReactionRole", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - EmoteName = table.Column(type: "TEXT", nullable: true), - ReactionRoleMessageId = table.Column(type: "INTEGER", nullable: true), - RoleId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ReactionRole", x => x.Id); - table.ForeignKey( - name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId", - column: x => x.ReactionRoleMessageId, - principalTable: "ReactionRoleMessage", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRole_ReactionRoleMessageId", - table: "ReactionRole", - column: "ReactionRoleMessageId"); - - migrationBuilder.CreateIndex( - name: "IX_ReactionRoleMessage_GuildConfigId", - table: "ReactionRoleMessage", - column: "GuildConfigId"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.Designer.cs deleted file mode 100644 index cf44e5c..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.Designer.cs +++ /dev/null @@ -1,2796 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220614071359_patronage-system")] - partial class patronagesystem - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.5"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs deleted file mode 100644 index fd1100f..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class patronagesystem : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "PatreonUserId", - table: "RewardedUsers", - newName: "PlatformUserId"); - - migrationBuilder.RenameIndex( - name: "IX_RewardedUsers_PatreonUserId", - table: "RewardedUsers", - newName: "IX_RewardedUsers_PlatformUserId"); - - migrationBuilder.AlterColumn( - name: "VerboseErrors", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: true, - oldClrType: typeof(bool), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "TotalXp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: 0L, - oldClrType: typeof(int), - oldType: "INTEGER", - oldDefaultValue: 0); - - migrationBuilder.CreateTable( - name: "PatronQuotas", - columns: table => new - { - UserId = table.Column(type: "INTEGER", nullable: false), - FeatureType = table.Column(type: "INTEGER", nullable: false), - Feature = table.Column(type: "TEXT", nullable: false), - HourlyCount = table.Column(type: "INTEGER", nullable: false), - DailyCount = table.Column(type: "INTEGER", nullable: false), - MonthlyCount = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PatronQuotas", x => new { x.UserId, x.FeatureType, x.Feature }); - }); - - migrationBuilder.CreateTable( - name: "Patrons", - columns: table => new - { - UserId = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UniquePlatformUserId = table.Column(type: "TEXT", nullable: true), - AmountCents = table.Column(type: "INTEGER", nullable: false), - LastCharge = table.Column(type: "TEXT", nullable: false), - ValidThru = table.Column(type: "TEXT", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Patrons", x => x.UserId); - }); - - migrationBuilder.CreateIndex( - name: "IX_PatronQuotas_UserId", - table: "PatronQuotas", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Patrons_UniquePlatformUserId", - table: "Patrons", - column: "UniquePlatformUserId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "PatronQuotas"); - - migrationBuilder.DropTable( - name: "Patrons"); - - migrationBuilder.RenameColumn( - name: "PlatformUserId", - table: "RewardedUsers", - newName: "PatreonUserId"); - - migrationBuilder.RenameIndex( - name: "IX_RewardedUsers_PlatformUserId", - table: "RewardedUsers", - newName: "IX_RewardedUsers_PatreonUserId"); - - migrationBuilder.AlterColumn( - name: "VerboseErrors", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER", - oldDefaultValue: true); - - migrationBuilder.AlterColumn( - name: "TotalXp", - table: "DiscordUser", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(long), - oldType: "INTEGER", - oldDefaultValue: 0L); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.Designer.cs deleted file mode 100644 index c7bb178..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.Designer.cs +++ /dev/null @@ -1,2823 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220623073903_stondel-db-cache")] - partial class stondeldbcache - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.6"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs deleted file mode 100644 index efce911..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class stondeldbcache : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "StreamOnlineMessages", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false), - Type = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_StreamOnlineMessages", x => x.Id); - }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "StreamOnlineMessages"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.Designer.cs deleted file mode 100644 index 0ec6c77..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.Designer.cs +++ /dev/null @@ -1,2825 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220703194348_logwarns")] - partial class logwarns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.6"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.cs b/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.cs deleted file mode 100644 index 91751a2..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220703194348_logwarns.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class logwarns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Name", - table: "StreamOnlineMessages", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AddColumn( - name: "LogWarnsId", - table: "LogSettings", - type: "INTEGER", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LogWarnsId", - table: "LogSettings"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "StreamOnlineMessages", - type: "TEXT", - nullable: false, - defaultValue: "", - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.Designer.cs deleted file mode 100644 index b421948..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.Designer.cs +++ /dev/null @@ -1,2855 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220725112348_xpitemshop")] - partial class xpitemshop - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs deleted file mode 100644 index ef8d9c4..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class xpitemshop : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "XpShopOwnedItem", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - ItemType = table.Column(type: "INTEGER", nullable: false), - IsUsing = table.Column(type: "INTEGER", nullable: false), - ItemKey = table.Column(type: "TEXT", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_XpShopOwnedItem", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_XpShopOwnedItem_UserId_ItemType_ItemKey", - table: "XpShopOwnedItem", - columns: new[] { "UserId", "ItemType", "ItemKey" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "XpShopOwnedItem"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.Designer.cs deleted file mode 100644 index 53c0181..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.Designer.cs +++ /dev/null @@ -1,2858 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220727005807_linkonly-channels")] - partial class linkonlychannels - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("LastXpGain") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now', '-1 years')"); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LastLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasDefaultValueSql("datetime('now')"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.cs b/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.cs deleted file mode 100644 index 867cd21..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220727005807_linkonly-channels.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class linkonlychannels : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Type", - table: "ImageOnlyChannels", - type: "INTEGER", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Type", - table: "ImageOnlyChannels"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.Designer.cs deleted file mode 100644 index d22f899..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.Designer.cs +++ /dev/null @@ -1,2843 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220808141842_remove-obsolete-xp-columns")] - partial class removeobsoletexpcolumns - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs deleted file mode 100644 index 8ef5757..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class removeobsoletexpcolumns : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LastLevelUp", - table: "UserXpStats"); - - migrationBuilder.DropColumn( - name: "LastLevelUp", - table: "DiscordUser"); - - migrationBuilder.DropColumn( - name: "LastXpGain", - table: "DiscordUser"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastLevelUp", - table: "UserXpStats", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now')"); - - migrationBuilder.AddColumn( - name: "LastLevelUp", - table: "DiscordUser", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now')"); - - migrationBuilder.AddColumn( - name: "LastXpGain", - table: "DiscordUser", - type: "TEXT", - nullable: false, - defaultValueSql: "datetime('now', '-1 years')"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.Designer.cs deleted file mode 100644 index 4aa267a..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.Designer.cs +++ /dev/null @@ -1,2846 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220831142504_banprune")] - partial class banprune - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.cs b/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.cs deleted file mode 100644 index 869098f..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220831142504_banprune.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class banprune : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "PruneDays", - table: "BanTemplates", - type: "INTEGER", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PruneDays", - table: "BanTemplates"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.Designer.cs deleted file mode 100644 index 1ddb355..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.Designer.cs +++ /dev/null @@ -1,2849 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220913190532_shop-role-req")] - partial class shoprolereq - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.cs b/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.cs deleted file mode 100644 index 346ce0b..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220913190532_shop-role-req.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class shoprolereq : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RoleRequirement", - table: "ShopEntry", - type: "INTEGER", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RoleRequirement", - table: "ShopEntry"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.Designer.cs b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.Designer.cs deleted file mode 100644 index d154827..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.Designer.cs +++ /dev/null @@ -1,2872 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20220916191702_autopub")] - partial class autopub - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs deleted file mode 100644 index f3d98db..0000000 --- a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class autopub : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AutoPublishChannel", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AutoPublishChannel", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AutoPublishChannel_GuildId", - table: "AutoPublishChannel", - column: "GuildId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AutoPublishChannel"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.Designer.cs b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.Designer.cs deleted file mode 100644 index 3aee35a..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.Designer.cs +++ /dev/null @@ -1,2898 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20221003111019_gambling-stats")] - partial class gamblingstats - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs deleted file mode 100644 index 6ebf812..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class gamblingstats : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "GamblingStats", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Feature = table.Column(type: "TEXT", nullable: true), - Bet = table.Column(type: "TEXT", nullable: false), - PaidOut = table.Column(type: "TEXT", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GamblingStats", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_GamblingStats_Feature", - table: "GamblingStats", - column: "Feature", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "GamblingStats"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.Designer.cs b/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.Designer.cs deleted file mode 100644 index 7eef7ab..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.Designer.cs +++ /dev/null @@ -1,2901 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20221021192121_toggle-global-expressions")] - partial class toggleglobalexpressions - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.cs b/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.cs deleted file mode 100644 index 7a834c3..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221021192121_toggle-global-expressions.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class toggleglobalexpressions : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DisableGlobalExpressions", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DisableGlobalExpressions", - table: "GuildConfigs"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.Designer.cs b/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.Designer.cs deleted file mode 100644 index 04c5f5b..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.Designer.cs +++ /dev/null @@ -1,2907 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20221118195152_log-thread")] - partial class logthread - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.cs b/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.cs deleted file mode 100644 index 6f0fba0..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221118195152_log-thread.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class logthread : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ThreadCreatedId", - table: "LogSettings", - type: "INTEGER", - nullable: true); - - migrationBuilder.AddColumn( - name: "ThreadDeletedId", - table: "LogSettings", - type: "INTEGER", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ThreadCreatedId", - table: "LogSettings"); - - migrationBuilder.DropColumn( - name: "ThreadDeletedId", - table: "LogSettings"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.Designer.cs b/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.Designer.cs deleted file mode 100644 index cfe5a1e..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.Designer.cs +++ /dev/null @@ -1,2910 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Services.Database; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20221122204324_feed-text")] - partial class feedtext - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("Name"); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Tag") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.ToTable("NsfwBlacklistedTags"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Question") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("Poll"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollAnswer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("PollId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("VoteIndex") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PollId"); - - b.ToTable("PollVote"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Answers") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => - { - b.HasOne("EllieBot.Services.Database.Models.Poll", null) - .WithMany("Votes") - .HasForeignKey("PollId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => - { - b.Navigation("Answers"); - - b.Navigation("Votes"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.cs b/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.cs deleted file mode 100644 index c00cfb7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20221122204324_feed-text.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - public partial class feedtext : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Message", - table: "FeedSub", - type: "TEXT", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Message", - table: "FeedSub"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.Designer.cs deleted file mode 100644 index 76403f9..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.Designer.cs +++ /dev/null @@ -1,2950 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240502233144_v5")] - partial class v5 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId"); - - b.ToTable("IgnoredVoicePresenceCHannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", null) - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId"); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany() - .HasForeignKey("LogSettingId"); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs deleted file mode 100644 index da4fdd7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs +++ /dev/null @@ -1,325 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class v5 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "NsfwBlacklistedTags"); - - migrationBuilder.DropTable( - name: "PollAnswer"); - - migrationBuilder.DropTable( - name: "PollVote"); - - migrationBuilder.DropTable( - name: "Poll"); - - migrationBuilder.DropUniqueConstraint( - name: "AK_Clubs_Name", - table: "Clubs"); - - migrationBuilder.AddColumn( - name: "Command", - table: "ShopEntry", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "Type", - table: "Reminders", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "StickyRoles", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "Name", - table: "Clubs", - type: "TEXT", - maxLength: 20, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 20); - - migrationBuilder.CreateTable( - name: "GiveawayModel", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - MessageId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - Message = table.Column(type: "TEXT", nullable: true), - EndsAt = table.Column(type: "TEXT", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_GiveawayModel", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "StickyRoles", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - RoleIds = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_StickyRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "TodosArchive", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_TodosArchive", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "GiveawayUser", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GiveawayId = table.Column(type: "INTEGER", nullable: false), - UserId = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GiveawayUser", x => x.Id); - table.ForeignKey( - name: "FK_GiveawayUser_GiveawayModel_GiveawayId", - column: x => x.GiveawayId, - principalTable: "GiveawayModel", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Todos", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "INTEGER", nullable: false), - Todo = table.Column(type: "TEXT", nullable: true), - DateAdded = table.Column(type: "TEXT", nullable: false), - IsDone = table.Column(type: "INTEGER", nullable: false), - ArchiveId = table.Column(type: "INTEGER", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Todos", x => x.Id); - table.ForeignKey( - name: "FK_Todos_TodosArchive_ArchiveId", - column: x => x.ArchiveId, - principalTable: "TodosArchive", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Clubs_Name", - table: "Clubs", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_GiveawayUser_GiveawayId_UserId", - table: "GiveawayUser", - columns: new[] { "GiveawayId", "UserId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_StickyRoles_GuildId_UserId", - table: "StickyRoles", - columns: new[] { "GuildId", "UserId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Todos_ArchiveId", - table: "Todos", - column: "ArchiveId"); - - migrationBuilder.CreateIndex( - name: "IX_Todos_UserId", - table: "Todos", - column: "UserId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "GiveawayUser"); - - migrationBuilder.DropTable( - name: "StickyRoles"); - - migrationBuilder.DropTable( - name: "Todos"); - - migrationBuilder.DropTable( - name: "GiveawayModel"); - - migrationBuilder.DropTable( - name: "TodosArchive"); - - migrationBuilder.DropIndex( - name: "IX_Clubs_Name", - table: "Clubs"); - - migrationBuilder.DropColumn( - name: "Command", - table: "ShopEntry"); - - migrationBuilder.DropColumn( - name: "Type", - table: "Reminders"); - - migrationBuilder.DropColumn( - name: "StickyRoles", - table: "GuildConfigs"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "Clubs", - type: "TEXT", - maxLength: 20, - nullable: false, - defaultValue: "", - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 20, - oldNullable: true); - - migrationBuilder.AddUniqueConstraint( - name: "AK_Clubs_Name", - table: "Clubs", - column: "Name"); - - migrationBuilder.CreateTable( - name: "NsfwBlacklistedTags", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Tag = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_NsfwBlacklistedTags", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Poll", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true), - GuildId = table.Column(type: "INTEGER", nullable: false), - Question = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Poll", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PollAnswer", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - Index = table.Column(type: "INTEGER", nullable: false), - PollId = table.Column(type: "INTEGER", nullable: true), - Text = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PollAnswer", x => x.Id); - table.ForeignKey( - name: "FK_PollAnswer_Poll_PollId", - column: x => x.PollId, - principalTable: "Poll", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "PollVote", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - DateAdded = table.Column(type: "TEXT", nullable: true), - PollId = table.Column(type: "INTEGER", nullable: true), - UserId = table.Column(type: "INTEGER", nullable: false), - VoteIndex = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PollVote", x => x.Id); - table.ForeignKey( - name: "FK_PollVote_Poll_PollId", - column: x => x.PollId, - principalTable: "Poll", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_NsfwBlacklistedTags_GuildId", - table: "NsfwBlacklistedTags", - column: "GuildId"); - - migrationBuilder.CreateIndex( - name: "IX_Poll_GuildId", - table: "Poll", - column: "GuildId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_PollAnswer_PollId", - table: "PollAnswer", - column: "PollId"); - - migrationBuilder.CreateIndex( - name: "IX_PollVote_PollId", - table: "PollVote", - column: "PollId"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.Designer.cs deleted file mode 100644 index 4a601c2..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.Designer.cs +++ /dev/null @@ -1,2948 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240518221424_guidlconfig-cleanup")] - partial class guidlconfigcleanup - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => - { - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("FeatureType") - .HasColumnType("INTEGER"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("DailyCount") - .HasColumnType("INTEGER"); - - b.Property("HourlyCount") - .HasColumnType("INTEGER"); - - b.Property("MonthlyCount") - .HasColumnType("INTEGER"); - - b.HasKey("UserId", "FeatureType", "Feature"); - - b.HasIndex("UserId"); - - b.ToTable("PatronQuotas"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs deleted file mode 100644 index 33418e2..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs +++ /dev/null @@ -1,702 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class guidlconfigcleanup : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - MigrationQueries.GuildConfigCleanup(migrationBuilder); - - migrationBuilder.DropForeignKey( - name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId", - table: "AntiRaidSetting"); - - migrationBuilder.DropForeignKey( - name: "FK_AntiSpamIgnore_AntiSpamSetting_AntiSpamSettingId", - table: "AntiSpamIgnore"); - - migrationBuilder.DropForeignKey( - name: "FK_AntiSpamSetting_GuildConfigs_GuildConfigId", - table: "AntiSpamSetting"); - - migrationBuilder.DropForeignKey( - name: "FK_CommandAlias_GuildConfigs_GuildConfigId", - table: "CommandAlias"); - - migrationBuilder.DropForeignKey( - name: "FK_CommandCooldown_GuildConfigs_GuildConfigId", - table: "CommandCooldown"); - - migrationBuilder.DropForeignKey( - name: "FK_DelMsgOnCmdChannel_GuildConfigs_GuildConfigId", - table: "DelMsgOnCmdChannel"); - - migrationBuilder.DropForeignKey( - name: "FK_ExcludedItem_XpSettings_XpSettingsId", - table: "ExcludedItem"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId", - table: "FilterChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FilteredWord_GuildConfigs_GuildConfigId", - table: "FilteredWord"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterLinksChannelId_GuildConfigs_GuildConfigId", - table: "FilterLinksChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId", - table: "FilterWordsChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FollowedStream_GuildConfigs_GuildConfigId", - table: "FollowedStream"); - - migrationBuilder.DropForeignKey( - name: "FK_GCChannelId_GuildConfigs_GuildConfigId", - table: "GCChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_MutedUserId_GuildConfigs_GuildConfigId", - table: "MutedUserId"); - - migrationBuilder.DropForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions"); - - migrationBuilder.DropForeignKey( - name: "FK_ShopEntry_GuildConfigs_GuildConfigId", - table: "ShopEntry"); - - migrationBuilder.DropForeignKey( - name: "FK_ShopEntryItem_ShopEntry_ShopEntryId", - table: "ShopEntryItem"); - - migrationBuilder.DropForeignKey( - name: "FK_SlowmodeIgnoredRole_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredRole"); - - migrationBuilder.DropForeignKey( - name: "FK_SlowmodeIgnoredUser_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredUser"); - - migrationBuilder.DropForeignKey( - name: "FK_StreamRoleBlacklistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser"); - - migrationBuilder.DropForeignKey( - name: "FK_StreamRoleWhitelistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser"); - - migrationBuilder.DropForeignKey( - name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", - table: "UnbanTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_UnmuteTimer_GuildConfigs_GuildConfigId", - table: "UnmuteTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_UnroleTimer_GuildConfigs_GuildConfigId", - table: "UnroleTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_VcRoleInfo_GuildConfigs_GuildConfigId", - table: "VcRoleInfo"); - - migrationBuilder.DropForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment"); - - migrationBuilder.DropTable( - name: "IgnoredVoicePresenceCHannels"); - - migrationBuilder.AlterColumn( - name: "StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "GuildConfigId", - table: "DelMsgOnCmdChannel", - type: "INTEGER", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "INTEGER", - oldNullable: true); - - migrationBuilder.AddForeignKey( - name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId", - table: "AntiRaidSetting", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_AntiSpamIgnore_AntiSpamSetting_AntiSpamSettingId", - table: "AntiSpamIgnore", - column: "AntiSpamSettingId", - principalTable: "AntiSpamSetting", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_AntiSpamSetting_GuildConfigs_GuildConfigId", - table: "AntiSpamSetting", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_CommandAlias_GuildConfigs_GuildConfigId", - table: "CommandAlias", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_CommandCooldown_GuildConfigs_GuildConfigId", - table: "CommandCooldown", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_DelMsgOnCmdChannel_GuildConfigs_GuildConfigId", - table: "DelMsgOnCmdChannel", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ExcludedItem_XpSettings_XpSettingsId", - table: "ExcludedItem", - column: "XpSettingsId", - principalTable: "XpSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId", - table: "FilterChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_FilteredWord_GuildConfigs_GuildConfigId", - table: "FilteredWord", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_FilterLinksChannelId_GuildConfigs_GuildConfigId", - table: "FilterLinksChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId", - table: "FilterWordsChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_FollowedStream_GuildConfigs_GuildConfigId", - table: "FollowedStream", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_GCChannelId_GuildConfigs_GuildConfigId", - table: "GCChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_MutedUserId_GuildConfigs_GuildConfigId", - table: "MutedUserId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ShopEntry_GuildConfigs_GuildConfigId", - table: "ShopEntry", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_ShopEntryItem_ShopEntry_ShopEntryId", - table: "ShopEntryItem", - column: "ShopEntryId", - principalTable: "ShopEntry", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_SlowmodeIgnoredRole_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredRole", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_SlowmodeIgnoredUser_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredUser", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_StreamRoleBlacklistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser", - column: "StreamRoleSettingsId", - principalTable: "StreamRoleSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_StreamRoleWhitelistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser", - column: "StreamRoleSettingsId", - principalTable: "StreamRoleSettings", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", - table: "UnbanTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_UnmuteTimer_GuildConfigs_GuildConfigId", - table: "UnmuteTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_UnroleTimer_GuildConfigs_GuildConfigId", - table: "UnroleTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_VcRoleInfo_GuildConfigs_GuildConfigId", - table: "VcRoleInfo", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId", - table: "AntiRaidSetting"); - - migrationBuilder.DropForeignKey( - name: "FK_AntiSpamIgnore_AntiSpamSetting_AntiSpamSettingId", - table: "AntiSpamIgnore"); - - migrationBuilder.DropForeignKey( - name: "FK_AntiSpamSetting_GuildConfigs_GuildConfigId", - table: "AntiSpamSetting"); - - migrationBuilder.DropForeignKey( - name: "FK_CommandAlias_GuildConfigs_GuildConfigId", - table: "CommandAlias"); - - migrationBuilder.DropForeignKey( - name: "FK_CommandCooldown_GuildConfigs_GuildConfigId", - table: "CommandCooldown"); - - migrationBuilder.DropForeignKey( - name: "FK_DelMsgOnCmdChannel_GuildConfigs_GuildConfigId", - table: "DelMsgOnCmdChannel"); - - migrationBuilder.DropForeignKey( - name: "FK_ExcludedItem_XpSettings_XpSettingsId", - table: "ExcludedItem"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId", - table: "FilterChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FilteredWord_GuildConfigs_GuildConfigId", - table: "FilteredWord"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterLinksChannelId_GuildConfigs_GuildConfigId", - table: "FilterLinksChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId", - table: "FilterWordsChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_FollowedStream_GuildConfigs_GuildConfigId", - table: "FollowedStream"); - - migrationBuilder.DropForeignKey( - name: "FK_GCChannelId_GuildConfigs_GuildConfigId", - table: "GCChannelId"); - - migrationBuilder.DropForeignKey( - name: "FK_MutedUserId_GuildConfigs_GuildConfigId", - table: "MutedUserId"); - - migrationBuilder.DropForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions"); - - migrationBuilder.DropForeignKey( - name: "FK_ShopEntry_GuildConfigs_GuildConfigId", - table: "ShopEntry"); - - migrationBuilder.DropForeignKey( - name: "FK_ShopEntryItem_ShopEntry_ShopEntryId", - table: "ShopEntryItem"); - - migrationBuilder.DropForeignKey( - name: "FK_SlowmodeIgnoredRole_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredRole"); - - migrationBuilder.DropForeignKey( - name: "FK_SlowmodeIgnoredUser_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredUser"); - - migrationBuilder.DropForeignKey( - name: "FK_StreamRoleBlacklistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser"); - - migrationBuilder.DropForeignKey( - name: "FK_StreamRoleWhitelistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser"); - - migrationBuilder.DropForeignKey( - name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", - table: "UnbanTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_UnmuteTimer_GuildConfigs_GuildConfigId", - table: "UnmuteTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_UnroleTimer_GuildConfigs_GuildConfigId", - table: "UnroleTimer"); - - migrationBuilder.DropForeignKey( - name: "FK_VcRoleInfo_GuildConfigs_GuildConfigId", - table: "VcRoleInfo"); - - migrationBuilder.DropForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment"); - - migrationBuilder.AlterColumn( - name: "StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser", - type: "INTEGER", - nullable: true, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser", - type: "INTEGER", - nullable: true, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "GuildConfigId", - table: "DelMsgOnCmdChannel", - type: "INTEGER", - nullable: true, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.CreateTable( - name: "IgnoredVoicePresenceCHannels", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - LogSettingId = table.Column(type: "INTEGER", nullable: true), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IgnoredVoicePresenceCHannels", x => x.Id); - table.ForeignKey( - name: "FK_IgnoredVoicePresenceCHannels_LogSettings_LogSettingId", - column: x => x.LogSettingId, - principalTable: "LogSettings", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_IgnoredVoicePresenceCHannels_LogSettingId", - table: "IgnoredVoicePresenceCHannels", - column: "LogSettingId"); - - migrationBuilder.AddForeignKey( - name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId", - table: "AntiRaidSetting", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_AntiSpamIgnore_AntiSpamSetting_AntiSpamSettingId", - table: "AntiSpamIgnore", - column: "AntiSpamSettingId", - principalTable: "AntiSpamSetting", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_AntiSpamSetting_GuildConfigs_GuildConfigId", - table: "AntiSpamSetting", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_CommandAlias_GuildConfigs_GuildConfigId", - table: "CommandAlias", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_CommandCooldown_GuildConfigs_GuildConfigId", - table: "CommandCooldown", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_DelMsgOnCmdChannel_GuildConfigs_GuildConfigId", - table: "DelMsgOnCmdChannel", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_ExcludedItem_XpSettings_XpSettingsId", - table: "ExcludedItem", - column: "XpSettingsId", - principalTable: "XpSettings", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_FilterChannelId_GuildConfigs_GuildConfigId", - table: "FilterChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_FilteredWord_GuildConfigs_GuildConfigId", - table: "FilteredWord", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_FilterLinksChannelId_GuildConfigs_GuildConfigId", - table: "FilterLinksChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId", - table: "FilterWordsChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_FollowedStream_GuildConfigs_GuildConfigId", - table: "FollowedStream", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_GCChannelId_GuildConfigs_GuildConfigId", - table: "GCChannelId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_MutedUserId_GuildConfigs_GuildConfigId", - table: "MutedUserId", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_Permissions_GuildConfigs_GuildConfigId", - table: "Permissions", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_ShopEntry_GuildConfigs_GuildConfigId", - table: "ShopEntry", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_ShopEntryItem_ShopEntry_ShopEntryId", - table: "ShopEntryItem", - column: "ShopEntryId", - principalTable: "ShopEntry", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_SlowmodeIgnoredRole_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredRole", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_SlowmodeIgnoredUser_GuildConfigs_GuildConfigId", - table: "SlowmodeIgnoredUser", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_StreamRoleBlacklistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleBlacklistedUser", - column: "StreamRoleSettingsId", - principalTable: "StreamRoleSettings", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_StreamRoleWhitelistedUser_StreamRoleSettings_StreamRoleSettingsId", - table: "StreamRoleWhitelistedUser", - column: "StreamRoleSettingsId", - principalTable: "StreamRoleSettings", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_UnbanTimer_GuildConfigs_GuildConfigId", - table: "UnbanTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_UnmuteTimer_GuildConfigs_GuildConfigId", - table: "UnmuteTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_UnroleTimer_GuildConfigs_GuildConfigId", - table: "UnroleTimer", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_VcRoleInfo_GuildConfigs_GuildConfigId", - table: "VcRoleInfo", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.Designer.cs deleted file mode 100644 index c0d277c..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.Designer.cs +++ /dev/null @@ -1,2921 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240611180456_remove-patron-limits")] - partial class removepatronlimits - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.cs b/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.cs deleted file mode 100644 index 1091268..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240611180456_remove-patron-limits.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class removepatronlimits : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "PatronQuotas"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "PatronQuotas", - columns: table => new - { - UserId = table.Column(type: "INTEGER", nullable: false), - FeatureType = table.Column(type: "INTEGER", nullable: false), - Feature = table.Column(type: "TEXT", nullable: false), - DailyCount = table.Column(type: "INTEGER", nullable: false), - HourlyCount = table.Column(type: "INTEGER", nullable: false), - MonthlyCount = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PatronQuotas", x => new { x.UserId, x.FeatureType, x.Feature }); - }); - - migrationBuilder.CreateIndex( - name: "IX_PatronQuotas_UserId", - table: "PatronQuotas", - column: "UserId"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs deleted file mode 100644 index c9ab166..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.Designer.cs +++ /dev/null @@ -1,2935 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240627033508_honeypot")] - partial class honeypot - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteByeMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteGreetMessagesTimer") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("BoostMessage") - .HasColumnType("TEXT"); - - b.Property("BoostMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("BoostMessageDeleteAfter") - .HasColumnType("INTEGER"); - - b.Property("ByeMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelByeMessageText") - .HasColumnType("TEXT"); - - b.Property("ChannelGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("DmGreetMessageText") - .HasColumnType("TEXT"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GreetMessageChannelId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("SendBoostMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelByeMessage") - .HasColumnType("INTEGER"); - - b.Property("SendChannelGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("SendDmGreetMessage") - .HasColumnType("INTEGER"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("GuildId"); - - b.ToTable("HoneyPotChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.cs b/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.cs deleted file mode 100644 index de5819a..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240627033508_honeypot.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class honeypot : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "HoneyPotChannels", - columns: table => new - { - GuildId = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ChannelId = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_HoneyPotChannels", x => x.GuildId); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "HoneyPotChannels"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs deleted file mode 100644 index 54ccb84..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.Designer.cs +++ /dev/null @@ -1,2925 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240911104847_greet-settings")] - partial class greetsettings - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("GuildId"); - - b.ToTable("HoneyPotChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTimer") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("GreetType") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("IsEnabled") - .HasColumnType("INTEGER"); - - b.Property("MessageText") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique(); - - b.ToTable("GreetSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs b/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs deleted file mode 100644 index 12448ba..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240911104847_greet-settings.cs +++ /dev/null @@ -1,219 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class greetsettings : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "GreetSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - GreetType = table.Column(type: "INTEGER", nullable: false), - MessageText = table.Column(type: "TEXT", nullable: true), - IsEnabled = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: true), - AutoDeleteTimer = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_GreetSettings", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_GreetSettings_GuildId_GreetType", - table: "GreetSettings", - columns: new[] { "GuildId", "GreetType" }, - unique: true); - - - migrationBuilder.Sql(""" - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer - FROM GuildConfigs - WHERE SendChannelGreetMessage = 1; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0 - FROM GuildConfigs - WHERE SendDmGreetMessage = 1; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer - FROM GuildConfigs - WHERE SendChannelByeMessage = 1; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter - FROM GuildConfigs - WHERE SendBoostMessage = 1; - """); - - - migrationBuilder.DropColumn( - name: "AutoDeleteByeMessagesTimer", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "AutoDeleteGreetMessagesTimer", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ByeMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ChannelByeMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ChannelGreetMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "DmGreetMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "GreetMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendBoostMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendChannelByeMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendChannelGreetMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendDmGreetMessage", - table: "GuildConfigs"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "GreetSettings"); - - migrationBuilder.AddColumn( - name: "AutoDeleteByeMessagesTimer", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "AutoDeleteGreetMessagesTimer", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "BoostMessage", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "ByeMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "ChannelByeMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "ChannelGreetMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "DmGreetMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "GreetMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "SendBoostMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendChannelByeMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendChannelGreetMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendDmGreetMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs deleted file mode 100644 index 0891194..0000000 --- a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs +++ /dev/null @@ -1,2922 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - partial class EllieSqliteContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("GuildId"); - - b.ToTable("HoneyPotChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTimer") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("GreetType") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("IsEnabled") - .HasColumnType("INTEGER"); - - b.Property("MessageText") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "GreetType") - .IsUnique(); - - b.ToTable("GreetSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiAltSetting") - .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiRaidSetting") - .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) - .WithMany("IgnoredChannels") - .HasForeignKey("AntiSpamSettingId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithOne("AntiSpamSetting") - .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") - .WithMany("Users") - .HasForeignKey("ChannelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Channel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Applicants") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Bans") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Club"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Owner"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandAliases") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("CommandCooldowns") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("DelMsgOnCmdChannels") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") - .WithMany("Members") - .HasForeignKey("ClubId") - .OnDelete(DeleteBehavior.NoAction); - - b.Navigation("Club"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Modules/Administration/Administration.cs b/src/EllieBot/Modules/Administration/Administration.cs deleted file mode 100644 index 9e18e8b..0000000 --- a/src/EllieBot/Modules/Administration/Administration.cs +++ /dev/null @@ -1,499 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Administration._common.results; -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration : EllieModule -{ - public enum Channel - { - Channel, - Ch, - Chnl, - Chan - } - - public enum List - { - List = 0, - Ls = 0 - } - - public enum Server - { - Server - } - - public enum State - { - Enable, - Disable, - Inherit - } - - private readonly SomethingOnlyChannelService _somethingOnly; - private readonly AutoPublishService _autoPubService; - - public Administration(SomethingOnlyChannelService somethingOnly, AutoPublishService autoPubService) - { - _somethingOnly = somethingOnly; - _autoPubService = autoPubService; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageGuild)] - public async Task ImageOnlyChannel(StoopidTime time = null) - { - var newValue = await _somethingOnly.ToggleImageOnlyChannelAsync(ctx.Guild.Id, ctx.Channel.Id); - if (newValue) - await Response().Confirm(strs.imageonly_enable).SendAsync(); - else - await Response().Pending(strs.imageonly_disable).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageGuild)] - public async Task LinkOnlyChannel(StoopidTime time = null) - { - var newValue = await _somethingOnly.ToggleLinkOnlyChannelAsync(ctx.Guild.Id, ctx.Channel.Id); - if (newValue) - await Response().Confirm(strs.linkonly_enable).SendAsync(); - else - await Response().Pending(strs.linkonly_disable).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageChannels)] - [BotPerm(ChannelPerm.ManageChannels)] - public async Task Slowmode(StoopidTime time = null) - { - var seconds = (int?)time?.Time.TotalSeconds ?? 0; - if (time is not null && (time.Time < TimeSpan.FromSeconds(0) || time.Time > TimeSpan.FromHours(6))) - return; - - await ((ITextChannel)ctx.Channel).ModifyAsync(tcp => - { - tcp.SlowModeInterval = seconds; - }); - - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageMessages)] - [Priority(2)] - public async Task Delmsgoncmd(List _) - { - var guild = (SocketGuild)ctx.Guild; - var (enabled, channels) = _service.GetDelMsgOnCmdData(ctx.Guild.Id); - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.server_delmsgoncmd)) - .WithDescription(enabled ? "✅" : "❌"); - - var str = string.Join("\n", - channels.Select(x => - { - var ch = guild.GetChannel(x.ChannelId)?.ToString() ?? x.ChannelId.ToString(); - var prefixSign = x.State ? "✅ " : "❌ "; - return prefixSign + ch; - })); - - if (string.IsNullOrWhiteSpace(str)) - str = "-"; - - embed.AddField(GetText(strs.channel_delmsgoncmd), str); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageMessages)] - [Priority(1)] - public async Task Delmsgoncmd(Server _ = Server.Server) - { - if (_service.ToggleDeleteMessageOnCommand(ctx.Guild.Id)) - { - _service.DeleteMessagesOnCommand.Add(ctx.Guild.Id); - await Response().Confirm(strs.delmsg_on).SendAsync(); - } - else - { - _service.DeleteMessagesOnCommand.TryRemove(ctx.Guild.Id); - await Response().Confirm(strs.delmsg_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageMessages)] - [Priority(0)] - public Task Delmsgoncmd(Channel _, State s, ITextChannel ch) - => Delmsgoncmd(_, s, ch.Id); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageMessages)] - [Priority(1)] - public async Task Delmsgoncmd(Channel _, State s, ulong? chId = null) - { - var actualChId = chId ?? ctx.Channel.Id; - await _service.SetDelMsgOnCmdState(ctx.Guild.Id, actualChId, s); - - if (s == State.Disable) - await Response().Confirm(strs.delmsg_channel_off).SendAsync(); - else if (s == State.Enable) - await Response().Confirm(strs.delmsg_channel_on).SendAsync(); - else - await Response().Confirm(strs.delmsg_channel_inherit).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.DeafenMembers)] - [BotPerm(GuildPerm.DeafenMembers)] - public async Task Deafen(params IGuildUser[] users) - { - await _service.DeafenUsers(true, users); - await Response().Confirm(strs.deafen).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.DeafenMembers)] - [BotPerm(GuildPerm.DeafenMembers)] - public async Task UnDeafen(params IGuildUser[] users) - { - await _service.DeafenUsers(false, users); - await Response().Confirm(strs.undeafen).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task DelVoiChanl([Leftover] IVoiceChannel voiceChannel) - { - await voiceChannel.DeleteAsync(); - await Response().Confirm(strs.delvoich(Format.Bold(voiceChannel.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task CreatVoiChanl([Leftover] string channelName) - { - var ch = await ctx.Guild.CreateVoiceChannelAsync(channelName); - await Response().Confirm(strs.createvoich(Format.Bold(ch.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task DelTxtChanl([Leftover] ITextChannel toDelete) - { - await toDelete.DeleteAsync(new RequestOptions() - { - AuditLogReason = $"Deleted by {ctx.User.Username}" - }); - await Response().Confirm(strs.deltextchan(Format.Bold(toDelete.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task CreaTxtChanl([Leftover] string channelName) - { - var txtCh = await ctx.Guild.CreateTextChannelAsync(channelName); - await Response().Confirm(strs.createtextchan(Format.Bold(txtCh.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task SetTopic([Leftover] string topic = null) - { - var channel = (ITextChannel)ctx.Channel; - topic ??= ""; - await channel.ModifyAsync(c => c.Topic = topic); - await Response().Confirm(strs.set_topic).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task SetChanlName([Leftover] string name) - { - var channel = (ITextChannel)ctx.Channel; - await channel.ModifyAsync(c => c.Name = name); - await Response().Confirm(strs.set_channel_name).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageChannels)] - [BotPerm(GuildPerm.ManageChannels)] - public async Task AgeRestrictToggle() - { - var channel = (ITextChannel)ctx.Channel; - var isEnabled = channel.IsNsfw; - - await channel.ModifyAsync(c => c.IsNsfw = !isEnabled); - - if (isEnabled) - await Response().Confirm(strs.nsfw_set_false).SendAsync(); - else - await Response().Confirm(strs.nsfw_set_true).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [Priority(0)] - public Task Edit(ulong messageId, [Leftover] string text) - => Edit((ITextChannel)ctx.Channel, messageId, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task Edit(ITextChannel channel, ulong messageId, [Leftover] string text) - { - var userPerms = ((SocketGuildUser)ctx.User).GetPermissions(channel); - var botPerms = ((SocketGuild)ctx.Guild).CurrentUser.GetPermissions(channel); - if (!userPerms.Has(ChannelPermission.ManageMessages)) - { - await Response().Error(strs.insuf_perms_u).SendAsync(); - return; - } - - if (!botPerms.Has(ChannelPermission.ViewChannel)) - { - await Response().Error(strs.insuf_perms_i).SendAsync(); - return; - } - - await _service.EditMessage(ctx, channel, messageId, text); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [BotPerm(ChannelPerm.ManageMessages)] - public Task Delete(ulong messageId, StoopidTime time = null) - => Delete((ITextChannel)ctx.Channel, messageId, time); - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Delete(ITextChannel channel, ulong messageId, StoopidTime time = null) - => await InternalMessageAction(channel, messageId, time, msg => msg.DeleteAsync()); - - private async Task InternalMessageAction( - ITextChannel channel, - ulong messageId, - StoopidTime time, - Func func) - { - var userPerms = ((SocketGuildUser)ctx.User).GetPermissions(channel); - var botPerms = ((SocketGuild)ctx.Guild).CurrentUser.GetPermissions(channel); - if (!userPerms.Has(ChannelPermission.ManageMessages)) - { - await Response().Error(strs.insuf_perms_u).SendAsync(); - return; - } - - if (!botPerms.Has(ChannelPermission.ManageMessages)) - { - await Response().Error(strs.insuf_perms_i).SendAsync(); - return; - } - - - var msg = await channel.GetMessageAsync(messageId); - if (msg is null) - { - await Response().Error(strs.msg_not_found).SendAsync(); - return; - } - - if (time is null) - await msg.DeleteAsync(); - else if (time.Time <= TimeSpan.FromDays(7)) - { - _ = Task.Run(async () => - { - await Task.Delay(time.Time); - await msg.DeleteAsync(); - }); - } - else - { - await Response().Error(strs.time_too_long).SendAsync(); - return; - } - - await ctx.OkAsync(); - } - - [Cmd] - [BotPerm(ChannelPermission.CreatePublicThreads)] - [UserPerm(ChannelPermission.CreatePublicThreads)] - public async Task ThreadCreate([Leftover] string name) - { - if (ctx.Channel is not SocketTextChannel stc) - return; - - await stc.CreateThreadAsync(name, message: ctx.Message.ReferencedMessage); - await ctx.OkAsync(); - } - - [Cmd] - [BotPerm(ChannelPermission.ManageThreads)] - [UserPerm(ChannelPermission.ManageThreads)] - public async Task ThreadDelete([Leftover] string name) - { - if (ctx.Channel is not SocketTextChannel stc) - return; - - var t = stc.Threads.FirstOrDefault(x => string.Equals(x.Name, name, StringComparison.InvariantCultureIgnoreCase)); - - if (t is null) - { - await Response().Error(strs.not_found).SendAsync(); - return; - } - - await t.DeleteAsync(); - await ctx.OkAsync(); - } - - [Cmd] - [UserPerm(ChannelPerm.ManageMessages)] - public async Task AutoPublish() - { - if (ctx.Channel.GetChannelType() != ChannelType.News) - { - await Response().Error(strs.req_announcement_channel).SendAsync(); - return; - } - - var newState = await _autoPubService.ToggleAutoPublish(ctx.Guild.Id, ctx.Channel.Id); - - if (newState) - { - await Response().Confirm(strs.autopublish_enable).SendAsync(); - } - else - { - await Response().Confirm(strs.autopublish_disable).SendAsync(); - } - } - - [Cmd] - [UserPerm(GuildPerm.ManageNicknames)] - [BotPerm(GuildPerm.ChangeNickname)] - [Priority(0)] - public async Task SetNick([Leftover] string newNick = null) - { - if (string.IsNullOrWhiteSpace(newNick)) - return; - var curUser = await ctx.Guild.GetCurrentUserAsync(); - await curUser.ModifyAsync(u => u.Nickname = newNick); - - await Response().Confirm(strs.bot_nick(Format.Bold(newNick) ?? "-")).SendAsync(); - } - - [Cmd] - [BotPerm(GuildPerm.ManageNicknames)] - [UserPerm(GuildPerm.ManageNicknames)] - [Priority(1)] - public async Task SetNick(IGuildUser gu, [Leftover] string newNick = null) - { - var sg = (SocketGuild)ctx.Guild; - if (sg.OwnerId == gu.Id - || gu.GetRoles().Max(r => r.Position) >= sg.CurrentUser.GetRoles().Max(r => r.Position)) - { - await Response().Error(strs.insuf_perms_i).SendAsync(); - return; - } - - await gu.ModifyAsync(u => u.Nickname = newNick); - - await Response() - .Confirm(strs.user_nick(Format.Bold(gu.ToString()), Format.Bold(newNick) ?? "-")) - .SendAsync(); - } - - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPermission.ManageGuild)] - [BotPerm(GuildPermission.ManageGuild)] - public async Task SetServerBanner([Leftover] string img = null) - { - // Tier2 or higher is required to set a banner. - if (ctx.Guild.PremiumTier is PremiumTier.Tier1 or PremiumTier.None) return; - - var result = await _service.SetServerBannerAsync(ctx.Guild, img); - - switch (result) - { - case SetServerBannerResult.Success: - await Response().Confirm(strs.set_srvr_banner).SendAsync(); - break; - case SetServerBannerResult.InvalidFileType: - await Response().Error(strs.srvr_banner_invalid).SendAsync(); - break; - case SetServerBannerResult.Toolarge: - await Response().Error(strs.srvr_banner_too_large).SendAsync(); - break; - case SetServerBannerResult.InvalidURL: - await Response().Error(strs.srvr_banner_invalid_url).SendAsync(); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPermission.ManageGuild)] - [BotPerm(GuildPermission.ManageGuild)] - public async Task SetServerIcon([Leftover] string img = null) - { - var result = await _service.SetServerIconAsync(ctx.Guild, img); - - switch (result) - { - case SetServerIconResult.Success: - await Response().Confirm(strs.set_srvr_icon).SendAsync(); - break; - case SetServerIconResult.InvalidFileType: - await Response().Error(strs.srvr_banner_invalid).SendAsync(); - break; - case SetServerIconResult.InvalidURL: - await Response().Error(strs.srvr_banner_invalid_url).SendAsync(); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/AdministrationService.cs b/src/EllieBot/Modules/Administration/AdministrationService.cs deleted file mode 100644 index b1bec59..0000000 --- a/src/EllieBot/Modules/Administration/AdministrationService.cs +++ /dev/null @@ -1,205 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; -using EllieBot.Modules.Administration._common.results; - -namespace EllieBot.Modules.Administration.Services; - -public class AdministrationService : IEService -{ - public ConcurrentHashSet DeleteMessagesOnCommand { get; } - public ConcurrentDictionary DeleteMessagesOnCommandChannels { get; } - - private readonly DbService _db; - private readonly IReplacementService _repSvc; - private readonly ILogCommandService _logService; - private readonly IHttpClientFactory _httpFactory; - - public AdministrationService( - IBot bot, - CommandHandler cmdHandler, - DbService db, - IReplacementService repSvc, - ILogCommandService logService, - IHttpClientFactory factory) - { - _db = db; - _repSvc = repSvc; - _logService = logService; - _httpFactory = factory; - - DeleteMessagesOnCommand = new(bot.AllGuildConfigs.Where(g => g.DeleteMessageOnCommand).Select(g => g.GuildId)); - - DeleteMessagesOnCommandChannels = new(bot.AllGuildConfigs.SelectMany(x => x.DelMsgOnCmdChannels) - .ToDictionary(x => x.ChannelId, x => x.State) - .ToConcurrent()); - - cmdHandler.CommandExecuted += DelMsgOnCmd_Handler; - } - - public (bool DelMsgOnCmd, IEnumerable channels) GetDelMsgOnCmdData(ulong guildId) - { - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set.Include(x => x.DelMsgOnCmdChannels)); - - return (conf.DeleteMessageOnCommand, conf.DelMsgOnCmdChannels); - } - - private Task DelMsgOnCmd_Handler(IUserMessage msg, CommandInfo cmd) - { - if (msg.Channel is not ITextChannel channel) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - //wat ?! - if (DeleteMessagesOnCommandChannels.TryGetValue(channel.Id, out var state)) - { - if (state && cmd.Name != "prune" && cmd.Name != "pick") - { - _logService.AddDeleteIgnore(msg.Id); - try { await msg.DeleteAsync(); } - catch { } - } - //if state is false, that means do not do it - } - else if (DeleteMessagesOnCommand.Contains(channel.Guild.Id) && cmd.Name != "prune" && cmd.Name != "pick") - { - _logService.AddDeleteIgnore(msg.Id); - try { await msg.DeleteAsync(); } - catch { } - } - }); - return Task.CompletedTask; - } - - public bool ToggleDeleteMessageOnCommand(ulong guildId) - { - bool enabled; - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set); - enabled = conf.DeleteMessageOnCommand = !conf.DeleteMessageOnCommand; - - uow.SaveChanges(); - return enabled; - } - - public async Task SetDelMsgOnCmdState(ulong guildId, ulong chId, Administration.State newState) - { - await using (var uow = _db.GetDbContext()) - { - var conf = uow.GuildConfigsForId(guildId, set => set.Include(x => x.DelMsgOnCmdChannels)); - - var old = conf.DelMsgOnCmdChannels.FirstOrDefault(x => x.ChannelId == chId); - if (newState == Administration.State.Inherit) - { - if (old is not null) - { - conf.DelMsgOnCmdChannels.Remove(old); - uow.Remove(old); - } - } - else - { - if (old is null) - { - old = new() - { - ChannelId = chId - }; - conf.DelMsgOnCmdChannels.Add(old); - } - - old.State = newState == Administration.State.Enable; - DeleteMessagesOnCommandChannels[chId] = newState == Administration.State.Enable; - } - - await uow.SaveChangesAsync(); - } - - if (newState == Administration.State.Disable) - { - } - else if (newState == Administration.State.Enable) - DeleteMessagesOnCommandChannels[chId] = true; - else - DeleteMessagesOnCommandChannels.TryRemove(chId, out _); - } - - public async Task DeafenUsers(bool value, params IGuildUser[] users) - { - if (!users.Any()) - return; - foreach (var u in users) - { - try - { - await u.ModifyAsync(usr => usr.Deaf = value); - } - catch - { - // ignored - } - } - } - - public async Task EditMessage( - ICommandContext context, - ITextChannel chanl, - ulong messageId, - string input) - { - var msg = await chanl.GetMessageAsync(messageId); - - if (msg is not IUserMessage umsg || msg.Author.Id != context.Client.CurrentUser.Id) - return; - - var repCtx = new ReplacementContext(context); - - var text = SmartText.CreateFrom(input); - text = await _repSvc.ReplaceAsync(text, repCtx); - - await umsg.EditAsync(text); - } - - public async Task SetServerBannerAsync(IGuild guild, string img) - { - if (!IsValidUri(img)) return SetServerBannerResult.InvalidURL; - - var uri = new Uri(img); - - using var http = _httpFactory.CreateClient(); - using var sr = await http.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); - - if (!sr.IsImage()) return SetServerBannerResult.InvalidFileType; - - if (sr.GetContentLength() > 8.Megabytes()) - { - return SetServerBannerResult.Toolarge; - } - - await using var imageStream = await sr.Content.ReadAsStreamAsync(); - - await guild.ModifyAsync(x => x.Banner = new Image(imageStream)); - return SetServerBannerResult.Success; - } - - public async Task SetServerIconAsync(IGuild guild, string img) - { - if (!IsValidUri(img)) return SetServerIconResult.InvalidURL; - - var uri = new Uri(img); - - using var http = _httpFactory.CreateClient(); - using var sr = await http.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); - - if (!sr.IsImage()) return SetServerIconResult.InvalidFileType; - - await using var imageStream = await sr.Content.ReadAsStreamAsync(); - - await guild.ModifyAsync(x => x.Icon = new Image(imageStream)); - return SetServerIconResult.Success; - } - - private bool IsValidUri(string img) => !string.IsNullOrWhiteSpace(img) && Uri.IsWellFormedUriString(img, UriKind.Absolute); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs deleted file mode 100644 index dc687cc..0000000 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class AutoAssignRoleCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task AutoAssignRole([Leftover] IRole role) - { - var guser = (IGuildUser)ctx.User; - if (role.Id == ctx.Guild.EveryoneRole.Id) - return; - - // the user can't aar the role which is higher or equal to his highest role - if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= role.Position) - { - await Response().Error(strs.hierarchy).SendAsync(); - return; - } - - var roles = await _service.ToggleAarAsync(ctx.Guild.Id, role.Id); - if (roles.Count == 0) - await Response().Confirm(strs.aar_disabled).SendAsync(); - else if (roles.Contains(role.Id)) - await AutoAssignRole(); - else - await Response().Confirm(strs.aar_role_removed(Format.Bold(role.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task AutoAssignRole() - { - if (!_service.TryGetRoles(ctx.Guild.Id, out var roles)) - { - await Response().Confirm(strs.aar_none).SendAsync(); - return; - } - - var existing = roles.Select(rid => ctx.Guild.GetRole(rid)).Where(r => r is not null).ToList(); - - if (existing.Count != roles.Count) - await _service.SetAarRolesAsync(ctx.Guild.Id, existing.Select(x => x.Id)); - - await Response() - .Confirm(strs.aar_roles( - '\n' + existing.Select(x => Format.Bold(x.ToString())).Join(",\n"))) - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs deleted file mode 100644 index 5e232f8..0000000 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs +++ /dev/null @@ -1,158 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; -using System.Net; -using System.Threading.Channels; -using LinqToDB; -using Microsoft.EntityFrameworkCore; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class AutoAssignRoleService : IEService -{ - private readonly DiscordSocketClient _client; - private readonly DbService _db; - - //guildid/roleid - private readonly ConcurrentDictionary> _autoAssignableRoles; - - private readonly Channel _assignQueue = Channel.CreateBounded( - new BoundedChannelOptions(100) - { - FullMode = BoundedChannelFullMode.DropOldest, - SingleReader = true, - SingleWriter = false - }); - - public AutoAssignRoleService(DiscordSocketClient client, IBot bot, DbService db) - { - _client = client; - _db = db; - - _autoAssignableRoles = bot.AllGuildConfigs.Where(x => !string.IsNullOrWhiteSpace(x.AutoAssignRoleIds)) - .ToDictionary>(k => k.GuildId, - v => v.GetAutoAssignableRoles()) - .ToConcurrent(); - - _ = Task.Run(async () => - { - while (true) - { - var user = await _assignQueue.Reader.ReadAsync(); - if (!_autoAssignableRoles.TryGetValue(user.Guild.Id, out var savedRoleIds)) - continue; - - try - { - var roleIds = savedRoleIds.Select(roleId => user.Guild.GetRole(roleId)) - .Where(x => x is not null) - .ToList(); - - if (roleIds.Any()) - { - await user.AddRolesAsync(roleIds); - await Task.Delay(250); - } - else - { - Log.Warning( - "Disabled 'Auto assign role' feature on {GuildName} [{GuildId}] server the roles dont exist", - user.Guild.Name, - user.Guild.Id); - - await DisableAarAsync(user.Guild.Id); - } - } - catch (HttpException ex) when (ex.HttpCode == HttpStatusCode.Forbidden) - { - Log.Warning( - "Disabled 'Auto assign role' feature on {GuildName} [{GuildId}] server because I don't have role management permissions", - user.Guild.Name, - user.Guild.Id); - - await DisableAarAsync(user.Guild.Id); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in aar. Probably one of the roles doesn't exist"); - } - } - }); - - _client.UserJoined += OnClientOnUserJoined; - _client.RoleDeleted += OnClientRoleDeleted; - } - - private async Task OnClientRoleDeleted(SocketRole role) - { - if (_autoAssignableRoles.TryGetValue(role.Guild.Id, out var roles) && roles.Contains(role.Id)) - await ToggleAarAsync(role.Guild.Id, role.Id); - } - - private async Task OnClientOnUserJoined(SocketGuildUser user) - { - if (_autoAssignableRoles.TryGetValue(user.Guild.Id, out _)) - await _assignQueue.Writer.WriteAsync(user); - } - - public async Task> ToggleAarAsync(ulong guildId, ulong roleId) - { - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - var roles = gc.GetAutoAssignableRoles(); - if (!roles.Remove(roleId) && roles.Count < 3) - roles.Add(roleId); - - gc.SetAutoAssignableRoles(roles); - await uow.SaveChangesAsync(); - - if (roles.Count > 0) - _autoAssignableRoles[guildId] = roles; - else - _autoAssignableRoles.TryRemove(guildId, out _); - - return roles; - } - - public async Task DisableAarAsync(ulong guildId) - { - await using var uow = _db.GetDbContext(); - - await uow.Set().AsNoTracking() - .Where(x => x.GuildId == guildId) - .UpdateAsync(_ => new() - { - AutoAssignRoleIds = null - }); - - _autoAssignableRoles.TryRemove(guildId, out _); - - await uow.SaveChangesAsync(); - } - - public async Task SetAarRolesAsync(ulong guildId, IEnumerable newRoles) - { - await using var uow = _db.GetDbContext(); - - var gc = uow.GuildConfigsForId(guildId, set => set); - gc.SetAutoAssignableRoles(newRoles); - - await uow.SaveChangesAsync(); - } - - public bool TryGetRoles(ulong guildId, out IReadOnlyList roles) - => _autoAssignableRoles.TryGetValue(guildId, out roles); -} - -public static class GuildConfigExtensions -{ - public static List GetAutoAssignableRoles(this GuildConfig gc) - { - if (string.IsNullOrWhiteSpace(gc.AutoAssignRoleIds)) - return new(); - - return gc.AutoAssignRoleIds.Split(',').Select(ulong.Parse).ToList(); - } - - public static void SetAutoAssignableRoles(this GuildConfig gc, IEnumerable roles) - => gc.AutoAssignRoleIds = roles.Join(','); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/AutoPublishService.cs b/src/EllieBot/Modules/Administration/AutoPublishService.cs deleted file mode 100644 index a0983d3..0000000 --- a/src/EllieBot/Modules/Administration/AutoPublishService.cs +++ /dev/null @@ -1,89 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService -{ - private readonly DbService _db; - private readonly DiscordSocketClient _client; - private readonly IBotCredsProvider _creds; - private ConcurrentDictionary _enabled; - - public AutoPublishService(DbService db, DiscordSocketClient client, IBotCredsProvider creds) - { - _db = db; - _client = client; - _creds = creds; - } - - public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - { - if (guild is null) - return; - - if (msg.Channel.GetChannelType() != ChannelType.News) - return; - - if (!_enabled.TryGetValue(guild.Id, out var cid) || cid != msg.Channel.Id) - return; - - await msg.CrosspostAsync(new RequestOptions() - { - RetryMode = RetryMode.AlwaysFail - }); - } - - // todo GUILDS - - public async Task OnReadyAsync() - { - var creds = _creds.GetCreds(); - - await using var ctx = _db.GetDbContext(); - var items = await ctx.GetTable() - .Where(x => Linq2DbExpressions.GuildOnShard(x.GuildId, creds.TotalShards, _client.ShardId)) - .ToListAsyncLinqToDB(); - - _enabled = items - .ToDictionary(x => x.GuildId, x => x.ChannelId) - .ToConcurrent(); - } - - public async Task ToggleAutoPublish(ulong guildId, ulong channelId) - { - await using var ctx = _db.GetDbContext(); - var deleted = await ctx.GetTable() - .DeleteAsync(x => x.GuildId == guildId && x.ChannelId == channelId); - - if (deleted != 0) - { - _enabled.TryRemove(guildId, out _); - return false; - } - - await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - ChannelId = channelId, - DateAdded = DateTime.UtcNow, - }, - old => new() - { - ChannelId = channelId, - DateAdded = DateTime.UtcNow, - }, - () => new() - { - GuildId = guildId - }); - - _enabled[guildId] = channelId; - - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs deleted file mode 100644 index e6ba515..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ /dev/null @@ -1,74 +0,0 @@ -using EllieBot.Modules.Administration.DangerousCommands; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class CleanupCommands : CleanupModuleBase - { - private readonly ICleanupService _svc; - private readonly IBotCredsProvider _creds; - - public CleanupCommands(ICleanupService svc, IBotCredsProvider creds) - { - _svc = svc; - _creds = creds; - } - - [Cmd] - [OwnerOnly] - [RequireContext(ContextType.DM)] - public async Task CleanupGuildData() - { - var result = await _svc.DeleteMissingGuildDataAsync(); - - if (result is null) - { - await ctx.ErrorAsync(); - return; - } - - await Response() - .Confirm($"{result.GuildCount} guilds' data remain in the database.") - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task Keep() - { - var result = await _svc.KeepGuild(Context.Guild.Id); - - await Response().Text("This guild's bot data will be saved.").SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task LeaveUnkeptServers(int startShardId) - { - var keptGuildCount = await _svc.GetKeptGuildCount(); - - var response = await PromptUserConfirmAsync(new EmbedBuilder() - .WithDescription($""" - Do you want the bot to leave all unkept servers? - - There are currently {keptGuildCount} kept servers. - - **This is a highly destructive and irreversible action.** - """)); - - if (!response) - return; - - for (var shardId = startShardId; shardId < _creds.GetCreds().TotalShards; shardId++) - { - await _svc.StartLeavingUnkeptServers(shardId); - await Task.Delay(3000 * 1000); - } - - await ctx.OkAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs deleted file mode 100644 index ee99b49..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ /dev/null @@ -1,270 +0,0 @@ -using LinqToDB; -using LinqToDB.Data; -using LinqToDB.EntityFrameworkCore; -using LinqToDB.Mapping; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.DangerousCommands; - -public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService -{ - private TypedKey _cleanupReportKey = new("cleanup:report"); - private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); - - private TypedKey _keepTriggerKey = new("keep:trigger"); - - private readonly IPubSub _pubSub; - private readonly DiscordSocketClient _client; - private ConcurrentDictionary guildIds = new(); - private readonly IBotCredsProvider _creds; - private readonly DbService _db; - - public CleanupService( - IPubSub pubSub, - DiscordSocketClient client, - IBotCredsProvider creds, - DbService db) - { - _pubSub = pubSub; - _client = client; - _creds = creds; - _db = db; - } - - public async Task OnReadyAsync() - { - await _pubSub.Sub(_cleanupTriggerKey, OnCleanupTrigger); - await _pubSub.Sub(_keepTriggerKey, InternalTriggerKeep); - - _client.JoinedGuild += ClientOnJoinedGuild; - - if (_client.ShardId == 0) - await _pubSub.Sub(_cleanupReportKey, OnKeepReport); - } - - private bool keepTriggered = false; - - private async ValueTask InternalTriggerKeep(int shardId) - { - if (_client.ShardId != shardId) - return; - - if (keepTriggered) - return; - - keepTriggered = true; - try - { - var allGuildIds = _client.Guilds.Select(x => x.Id).ToArray(); - - HashSet dontDelete; - await using (var db = _db.GetDbContext()) - { - await using var ctx = db.CreateLinqToDBConnection(); - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - - var dontDeleteList = await table - .Where(x => allGuildIds.Contains(x.GuildId)) - .Select(x => x.GuildId) - .ToListAsyncLinqToDB(); - - dontDelete = dontDeleteList.ToHashSet(); - } - - Log.Information("Leaving {RemainingCount} guilds every, 1 seconds. {DontDeleteCount} will remain", - allGuildIds.Length - dontDelete.Count, - dontDelete.Count); - foreach (var guildId in allGuildIds) - { - if (dontDelete.Contains(guildId)) - continue; - - await Task.Delay(1016); - - SocketGuild? guild = null; - try - { - guild = _client.GetGuild(guildId); - - if (guild is null) - { - Log.Warning("Unable to find guild {GuildId}", guildId); - continue; - } - - await guild.LeaveAsync(); - } - catch (Exception ex) - { - Log.Warning("Unable to leave guild {GuildName} [{GuildId}]: {ErrorMessage}", - guild?.Name, - guildId, - ex.Message); - } - } - } - finally - { - keepTriggered = false; - } - } - - public async Task DeleteMissingGuildDataAsync() - { - guildIds = new(); - var totalShards = _creds.GetCreds().TotalShards; - await _pubSub.Pub(_cleanupTriggerKey, true); - var counter = 0; - while (guildIds.Keys.Count < totalShards) - { - await Task.Delay(1000); - counter++; - - if (counter >= 5) - break; - } - - if (guildIds.Keys.Count < totalShards) - return default; - - var allIds = guildIds.SelectMany(x => x.Value) - .ToArray(); - - await using var ctx = _db.GetDbContext(); - await using var linqCtx = ctx.CreateLinqToDBContext(); - await using var tempTable = linqCtx.CreateTempTable(); - - foreach (var chunk in allIds.Chunk(20000)) - { - await tempTable.BulkCopyAsync(chunk.Select(x => new CleanupId() - { - GuildId = x - })); - } - - // delete guild configs - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete guild xp - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete expressions - await ctx.GetTable() - .Where(x => x.GuildId != null - && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) - .DeleteAsync(); - - // delete quotes - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete planted currencies - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete image only channels - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete reaction roles - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete ignored users - await ctx.GetTable() - .Where(x => x.GuildId != null - && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) - .DeleteAsync(); - - // delete perm overrides - await ctx.GetTable() - .Where(x => x.GuildId != null - && !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId.Value)) - .DeleteAsync(); - - // delete repeaters - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - return new() - { - GuildCount = guildIds.Keys.Count, - }; - } - - public async Task KeepGuild(ulong guildId) - { - await using var db = _db.GetDbContext(); - await using var ctx = db.CreateLinqToDbContext(); - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - if (await table.AnyAsyncLinqToDB(x => x.GuildId == guildId)) - return false; - - await table.InsertAsync(() => new() - { - GuildId = guildId - }); - - return true; - } - - public async Task GetKeptGuildCount() - { - await using var db = _db.GetDbContext(); - await using var ctx = db.CreateLinqToDBContext(); - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - return await table.CountAsync(); - } - - public async Task StartLeavingUnkeptServers(int shardId) - => await _pubSub.Pub(_keepTriggerKey, shardId); - - private ValueTask OnKeepReport(KeepReport report) - { - guildIds[report.ShardId] = report.GuildIds; - return default; - } - - private async Task ClientOnJoinedGuild(SocketGuild arg) - { - await KeepGuild(arg.Id); - } - - private ValueTask OnCleanupTrigger(bool arg) - { - _pubSub.Pub(_cleanupReportKey, - new KeepReport() - { - ShardId = _client.ShardId, - GuildIds = _client.GetGuildIds(), - }); - - return default; - } -} - -public class KeptGuilds -{ - [PrimaryKey] - public ulong GuildId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs deleted file mode 100644 index 80484c3..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs +++ /dev/null @@ -1,164 +0,0 @@ -#nullable disable -using System.Globalization; -using CsvHelper; -using CsvHelper.Configuration; -using EllieBot.Modules.Gambling; -using EllieBot.Modules.Administration.Services; -using EllieBot.Modules.Xp; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - [OwnerOnly] - [NoPublicBot] - public partial class DangerousCommands : CleanupModuleBase - { - private readonly DangerousCommandsService _ds; - private readonly IGamblingCleanupService _gcs; - private readonly IXpCleanupService _xcs; - - public DangerousCommands( - DangerousCommandsService ds, - IGamblingCleanupService gcs, - IXpCleanupService xcs) - { - _ds = ds; - _gcs = gcs; - _xcs = xcs; - } - - [Cmd] - [OwnerOnly] - public Task SqlSelect([Leftover] string sql) - { - var result = _ds.SelectSql(sql); - - return Response() - .Paginated() - .Items(result.Results) - .PageSize(20) - .Page((items, _) => - { - if (!items.Any()) - return _sender.CreateEmbed().WithErrorColor().WithFooter(sql).WithDescription("-"); - - return _sender.CreateEmbed() - .WithOkColor() - .WithFooter(sql) - .WithTitle(string.Join(" ║ ", result.ColumnNames)) - .WithDescription(string.Join('\n', items.Select(x => string.Join(" ║ ", x)))); - }) - .SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task SqlSelectCsv([Leftover] string sql) - { - var result = _ds.SelectSql(sql); - - // create a file stream and write the data as csv - using var ms = new MemoryStream(); - await using var sw = new StreamWriter(ms); - await using var csv = new CsvWriter(sw, - new CsvConfiguration(CultureInfo.InvariantCulture) - { - Delimiter = "," - }); - - foreach (var cn in result.ColumnNames) - { - csv.WriteField(cn); - } - - await csv.NextRecordAsync(); - - foreach (var row in result.Results) - { - foreach (var field in row) - { - csv.WriteField(field); - } - - await csv.NextRecordAsync(); - } - - - await csv.FlushAsync(); - ms.Position = 0; - - // send the file - await ctx.Channel.SendFileAsync(ms, $"query_result_{DateTime.UtcNow.Ticks}.csv"); - } - - [Cmd] - [OwnerOnly] - public async Task SqlExec([Leftover] string sql) - { - try - { - var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.sql_confirm_exec)) - .WithDescription(Format.Code(sql)); - - if (!await PromptUserConfirmAsync(embed)) - return; - - var res = await _ds.ExecuteSql(sql); - await Response().Confirm(res.ToString()).SendAsync(); - } - catch (Exception ex) - { - await Response().Error(ex.ToString()).SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task PurgeUser(ulong userId) - { - var embed = _sender.CreateEmbed() - .WithDescription(GetText(strs.purge_user_confirm(Format.Bold(userId.ToString())))); - - if (!await PromptUserConfirmAsync(embed)) - return; - - await _ds.PurgeUserAsync(userId); - await ctx.OkAsync(); - } - - [Cmd] - [OwnerOnly] - public Task PurgeUser([Leftover] IUser user) - => PurgeUser(user.Id); - - [Cmd] - [OwnerOnly] - public Task DeleteXp() - => ConfirmActionInternalAsync("Delete Xp", () => _xcs.DeleteXp()); - - - [Cmd] - [OwnerOnly] - public Task DeleteWaifus() - => ConfirmActionInternalAsync("Delete Waifus", () => _gcs.DeleteWaifus()); - - [Cmd] - [OwnerOnly] - public async Task DeleteWaifu(IUser user) - => await DeleteWaifu(user.Id); - - [Cmd] - [OwnerOnly] - public Task DeleteWaifu(ulong userId) - => ConfirmActionInternalAsync($"Delete Waifu {userId}", () => _gcs.DeleteWaifu(userId)); - - - [Cmd] - [OwnerOnly] - public Task DeleteCurrency() - => ConfirmActionInternalAsync("Delete Currency", () => _gcs.DeleteCurrency()); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommandsService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommandsService.cs deleted file mode 100644 index bbea48b..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommandsService.cs +++ /dev/null @@ -1,103 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public class DangerousCommandsService : IEService -{ - private readonly DbService _db; - - public DangerousCommandsService(DbService db) - => _db = db; - - public async Task ExecuteSql(string sql) - { - int res; - await using var uow = _db.GetDbContext(); - res = await uow.Database.ExecuteSqlRawAsync(sql); - return res; - } - - public SelectResult SelectSql(string sql) - { - var result = new SelectResult - { - ColumnNames = new(), - Results = new() - }; - - using var uow = _db.GetDbContext(); - var conn = uow.Database.GetDbConnection(); - conn.Open(); - using var cmd = conn.CreateCommand(); - cmd.CommandText = sql; - using var reader = cmd.ExecuteReader(); - if (reader.HasRows) - { - for (var i = 0; i < reader.FieldCount; i++) - result.ColumnNames.Add(reader.GetName(i)); - while (reader.Read()) - { - var obj = new object[reader.FieldCount]; - reader.GetValues(obj); - result.Results.Add(obj.Select(x => x.ToString()).ToArray()); - } - } - - return result; - } - - public async Task PurgeUserAsync(ulong userId) - { - await using var uow = _db.GetDbContext(); - - // get waifu info - var wi = await uow.Set().FirstOrDefaultAsyncEF(x => x.Waifu.UserId == userId); - - // if it exists, delete waifu related things - if (wi is not null) - { - // remove updates which have new or old as this waifu - await uow.Set().DeleteAsync(wu => wu.New.UserId == userId || wu.Old.UserId == userId); - - // delete all items this waifu owns - await uow.Set().DeleteAsync(x => x.WaifuInfoId == wi.Id); - - // all waifus this waifu claims are released - await uow.Set() - .AsQueryable() - .Where(x => x.Claimer.UserId == userId) - .UpdateAsync(x => new() - { - ClaimerId = null - }); - - // all affinities set to this waifu are reset - await uow.Set() - .AsQueryable() - .Where(x => x.Affinity.UserId == userId) - .UpdateAsync(x => new() - { - AffinityId = null - }); - } - - // delete guild xp - await uow.Set().DeleteAsync(x => x.UserId == userId); - - // delete currency transactions - await uow.Set().DeleteAsync(x => x.UserId == userId); - - // delete user, currency, and clubs go away with it - await uow.Set().DeleteAsync(u => u.UserId == userId); - } - - public class SelectResult - { - public List ColumnNames { get; set; } - public List Results { get; set; } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/CleanupId.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/CleanupId.cs deleted file mode 100644 index cd6d742..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/CleanupId.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Modules.Administration.DangerousCommands; - -public sealed class CleanupId -{ - [Key] - public ulong GuildId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs deleted file mode 100644 index 8988f32..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Administration.DangerousCommands; - -public interface ICleanupService -{ - Task DeleteMissingGuildDataAsync(); - Task KeepGuild(ulong guildId); - Task GetKeptGuildCount(); - Task StartLeavingUnkeptServers(int shardId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepReport.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepReport.cs deleted file mode 100644 index 44ecee2..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepReport.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Administration.DangerousCommands; - -public sealed class KeepReport -{ - public required int ShardId { get; init; } - public required ulong[] GuildIds { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepResult.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepResult.cs deleted file mode 100644 index 52c8051..0000000 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/KeepResult.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Administration.DangerousCommands; - -public sealed class KeepResult -{ - public required int GuildCount { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelCommands.cs b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelCommands.cs deleted file mode 100644 index 8099573..0000000 --- a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelCommands.cs +++ /dev/null @@ -1,36 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class GameVoiceChannelCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.MoveMembers)] - public async Task GameVoiceChannel() - { - var vch = ((IGuildUser)ctx.User).VoiceChannel; - - if (vch is null) - { - await Response().Error(strs.not_in_voice).SendAsync(); - return; - } - - var id = _service.ToggleGameVoiceChannel(ctx.Guild.Id, vch.Id); - - if (id is null) - await Response().Confirm(strs.gvc_disabled).SendAsync(); - else - { - _service.GameVoiceChannels.Add(vch.Id); - await Response().Confirm(strs.gvc_enabled(Format.Bold(vch.Name))).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs deleted file mode 100644 index e83e5a3..0000000 --- a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs +++ /dev/null @@ -1,125 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Administration.Services; - -public class GameVoiceChannelService : IEService -{ - public ConcurrentHashSet GameVoiceChannels { get; } - - private readonly DbService _db; - private readonly DiscordSocketClient _client; - - public GameVoiceChannelService(DiscordSocketClient client, DbService db, IBot bot) - { - _db = db; - _client = client; - - GameVoiceChannels = new(bot.AllGuildConfigs - .Where(gc => gc.GameVoiceChannel is not null) - .Select(gc => gc.GameVoiceChannel!.Value)); - - _client.UserVoiceStateUpdated += OnUserVoiceStateUpdated; - _client.PresenceUpdated += OnPresenceUpdate; - } - - private Task OnPresenceUpdate(SocketUser socketUser, SocketPresence before, SocketPresence after) - { - _ = Task.Run(async () => - { - try - { - if (socketUser is not SocketGuildUser newUser) - return; - // if the user is in the voice channel and that voice channel is gvc - - if (newUser.VoiceChannel is not { } vc - || !GameVoiceChannels.Contains(vc.Id)) - return; - - //if the activity has changed, and is a playi1ng activity - foreach (var activity in after.Activities) - { - if (activity is { Type: ActivityType.Playing }) - //trigger gvc - { - if (await TriggerGvc(newUser, activity.Name)) - return; - } - } - } - catch (Exception ex) - { - Log.Warning(ex, "Error running GuildMemberUpdated in gvc"); - } - }); - return Task.CompletedTask; - } - - public ulong? ToggleGameVoiceChannel(ulong guildId, ulong vchId) - { - ulong? id; - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - - if (gc.GameVoiceChannel == vchId) - { - GameVoiceChannels.TryRemove(vchId); - id = gc.GameVoiceChannel = null; - } - else - { - if (gc.GameVoiceChannel is not null) - GameVoiceChannels.TryRemove(gc.GameVoiceChannel.Value); - GameVoiceChannels.Add(vchId); - id = gc.GameVoiceChannel = vchId; - } - - uow.SaveChanges(); - return id; - } - - private Task OnUserVoiceStateUpdated(SocketUser usr, SocketVoiceState oldState, SocketVoiceState newState) - { - _ = Task.Run(async () => - { - try - { - if (usr is not SocketGuildUser gUser) - return; - - if (newState.VoiceChannel is null) - return; - - if (!GameVoiceChannels.Contains(newState.VoiceChannel.Id)) - return; - - foreach (var game in gUser.Activities.Select(x => x.Name)) - { - if (await TriggerGvc(gUser, game)) - return; - } - } - catch (Exception ex) - { - Log.Warning(ex, "Error running VoiceStateUpdate in gvc"); - } - }); - - return Task.CompletedTask; - } - - private async Task TriggerGvc(SocketGuildUser gUser, string game) - { - if (string.IsNullOrWhiteSpace(game)) - return false; - - game = game.TrimTo(50)!.ToLowerInvariant(); - var vch = gUser.Guild.VoiceChannels.FirstOrDefault(x => x.Name.ToLowerInvariant() == game); - - if (vch is null) - return false; - - await Task.Delay(1000); - await gUser.ModifyAsync(gu => gu.Channel = vch); - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs deleted file mode 100644 index c7ee52a..0000000 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs +++ /dev/null @@ -1,226 +0,0 @@ -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class GreetCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Boost() - => Toggle(GreetType.Boost); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostDel(int timer = 30) - => SetDel(GreetType.Boost, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostMsg([Leftover] string? text = null) - => SetMsg(GreetType.Boost, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Greet() - => Toggle(GreetType.Greet); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDel(int timer = 30) - => SetDel(GreetType.Greet, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetMsg([Leftover] string? text = null) - => SetMsg(GreetType.Greet, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDm() - => Toggle(GreetType.GreetDm); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDmMsg([Leftover] string? text = null) - => SetMsg(GreetType.GreetDm, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Bye() - => Toggle(GreetType.Bye); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeDel(int timer = 30) - => SetDel(GreetType.Bye, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeMsg([Leftover] string? text = null) - => SetMsg(GreetType.Bye, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Greet, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDmTest([Leftover] IGuildUser? user = null) - => Test(GreetType.GreetDm, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task ByeTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Bye, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task BoostTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Boost, user); - - - public async Task Toggle(GreetType type) - { - var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id, type); - - if (enabled) - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boost_on, - GreetType.Greet => strs.greet_on, - GreetType.Bye => strs.bye_on, - GreetType.GreetDm => strs.greetdm_on, - _ => strs.error - } - ) - .SendAsync(); - else - await Response() - .Pending( - type switch - { - GreetType.Boost => strs.boost_off, - GreetType.Greet => strs.greet_off, - GreetType.Bye => strs.bye_off, - GreetType.GreetDm => strs.greetdm_off, - _ => strs.error - } - ) - .SendAsync(); - } - - - public async Task SetDel(GreetType type, int timer) - { - if (timer is < 0 or > 600) - return; - - await _service.SetDeleteTimer(ctx.Guild.Id, type, timer); - - if (timer > 0) - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boostdel_on(timer), - GreetType.Greet => strs.greetdel_on(timer), - GreetType.Bye => strs.byedel_on(timer), - _ => strs.error - } - ) - .SendAsync(); - else - await Response() - .Pending( - type switch - { - GreetType.Boost => strs.boostdel_off, - GreetType.Greet => strs.greetdel_off, - GreetType.Bye => strs.byedel_off, - _ => strs.error - }) - .SendAsync(); - } - - - public async Task SetMsg(GreetType type, string? text = null) - { - if (string.IsNullOrWhiteSpace(text)) - { - var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); - var msg = conf?.MessageText ?? GreetService.GetDefaultGreet(type); - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boostmsg_cur(msg), - GreetType.Greet => strs.greetmsg_cur(msg), - GreetType.Bye => strs.byemsg_cur(msg), - GreetType.GreetDm => strs.greetdmmsg_cur(msg), - _ => strs.error - }) - .SendAsync(); - return; - } - - var isEnabled = await _service.SetMessage(ctx.Guild.Id, type, text); - - await Response() - .Confirm(type switch - { - GreetType.Boost => strs.boostmsg_new, - GreetType.Greet => strs.greetmsg_new, - GreetType.Bye => strs.byemsg_new, - GreetType.GreetDm => strs.greetdmmsg_new, - _ => strs.error - }) - .SendAsync(); - - - if (!isEnabled) - { - var cmdName = type switch - { - GreetType.Greet => "greet", - GreetType.Bye => "bye", - GreetType.Boost => "boost", - GreetType.GreetDm => "greetdm", - _ => "unknown_command" - }; - - await Response().Pending(strs.boostmsg_enable($"`{prefix}{cmdName}`")).SendAsync(); - } - } - - public async Task Test(GreetType type, IGuildUser? user = null) - { - user ??= (IGuildUser)ctx.User; - - await _service.Test(ctx.Guild.Id, type, (ITextChannel)ctx.Channel, user); - var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); - if (conf?.IsEnabled is not true) - await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs deleted file mode 100644 index e47f743..0000000 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ /dev/null @@ -1,480 +0,0 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using LinqToDB.Tools; -using EllieBot.Common.ModuleBehaviors; -using System.Threading.Channels; - -namespace EllieBot.Services; - -public class GreetService : IEService, IReadyExecutor -{ - private readonly DbService _db; - - private ConcurrentDictionary> _enabled = new(); - - private readonly DiscordSocketClient _client; - - private readonly IReplacementService _repSvc; - private readonly IBotCache _cache; - private readonly IMessageSenderService _sender; - - private readonly Channel<(GreetSettings, IUser, ITextChannel?)> _greetQueue = - Channel.CreateBounded<(GreetSettings, IUser, ITextChannel?)>( - new BoundedChannelOptions(60) - { - FullMode = BoundedChannelFullMode.DropOldest - }); - - public GreetService( - DiscordSocketClient client, - DbService db, - IMessageSenderService sender, - IReplacementService repSvc, - IBotCache cache - ) - { - _db = db; - _client = client; - _repSvc = repSvc; - _cache = cache; - _sender = sender; - - - foreach (var type in Enum.GetValues()) - { - _enabled[type] = new(); - } - } - - public async Task OnReadyAsync() - { - // cache all enabled guilds - await using (var uow = _db.GetDbContext()) - { - var guilds = _client.Guilds.Select(x => x.Id).ToList(); - var enabled = await uow.GetTable() - .Where(x => x.GuildId.In(guilds)) - .Where(x => x.IsEnabled) - .Select(x => new - { - x.GuildId, - x.GreetType - }) - .ToListAsync(); - - foreach (var e in enabled) - { - _enabled[e.GreetType].Add(e.GuildId); - } - } - - _client.UserJoined += OnUserJoined; - _client.UserLeft += OnUserLeft; - - _client.LeftGuild += OnClientLeftGuild; - - _client.GuildMemberUpdated += ClientOnGuildMemberUpdated; - - var timer = new PeriodicTimer(TimeSpan.FromSeconds(2)); - while (await timer.WaitForNextTickAsync()) - { - var (conf, user, ch) = await _greetQueue.Reader.ReadAsync(); - await GreetUsers(conf, ch, user); - } - } - - private Task ClientOnGuildMemberUpdated(Cacheable optOldUser, SocketGuildUser newUser) - { - // if user is a new booster - // or boosted again the same server - if ((optOldUser.Value is { PremiumSince: null } && newUser is { PremiumSince: not null }) - || (optOldUser.Value?.PremiumSince is { } oldDate - && newUser.PremiumSince is { } newDate - && newDate > oldDate)) - { - _ = Task.Run(async () => - { - var conf = await GetGreetSettingsAsync(newUser.Guild.Id, GreetType.Boost); - - if (conf is null || !conf.IsEnabled) - return; - - ITextChannel? channel = null; - if (conf.ChannelId is { } cid) - channel = newUser.Guild.GetTextChannel(cid); - - if (channel is null) - return; - - await GreetUsers(conf, channel, newUser); - }); - } - - return Task.CompletedTask; - } - - private async Task OnClientLeftGuild(SocketGuild guild) - { - foreach (var gt in Enum.GetValues()) - { - _enabled[gt].TryRemove(guild.Id); - } - - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.GuildId == guild.Id) - .DeleteAsync(); - } - - private Task OnUserLeft(SocketGuild guild, SocketUser user) - { - _ = Task.Run(async () => - { - try - { - var conf = await GetGreetSettingsAsync(guild.Id, GreetType.Bye); - - if (conf is null) - return; - - var channel = guild.TextChannels.FirstOrDefault(c => c.Id == conf.ChannelId); - - if (channel is null) //maybe warn the server owner that the channel is missing - { - await SetGreet(guild.Id, null, GreetType.Bye, false); - return; - } - - await _greetQueue.Writer.WriteAsync((conf, user, channel)); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private readonly TypedKey _greetSettingsKey = new("greet_settings"); - - public async Task GetGreetSettingsAsync(ulong gid, GreetType type) - => await _cache.GetOrAddAsync(_greetSettingsKey, - () => InternalGetGreetSettingsAsync(gid, type), - TimeSpan.FromSeconds(3)); - - private async Task InternalGetGreetSettingsAsync(ulong gid, GreetType type) - { - await using var uow = _db.GetDbContext(); - var res = await uow.GetTable() - .Where(x => x.GuildId == gid && x.GreetType == type) - .FirstOrDefaultAsync(); - - if (res is not null) - res.MessageText ??= GetDefaultGreet(type); - - return res; - } - - private async Task GreetUsers(GreetSettings conf, ITextChannel? channel, IUser user) - { - if (conf.GreetType == GreetType.GreetDm) - { - if (user is not IGuildUser gu) - return; - - await GreetDmUserInternal(conf, gu); - return; - } - - if (channel is null) - return; - - var repCtx = new ReplacementContext(client: _client, - guild: channel.Guild, - channel: channel, - user: user); - - var text = SmartText.CreateFrom(conf.MessageText); - text = await _repSvc.ReplaceAsync(text, repCtx); - try - { - var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - if (conf.AutoDeleteTimer > 0) - toDelete.DeleteAfter(conf.AutoDeleteTimer); - } - catch (HttpException ex) when (ex.DiscordCode is DiscordErrorCode.InsufficientPermissions - or DiscordErrorCode.MissingPermissions - or DiscordErrorCode.UnknownChannel) - { - Log.Warning(ex, - "Missing permissions to send a bye message, the greet message will be disabled on server: {GuildId}", - channel.GuildId); - await SetGreet(channel.GuildId, channel.Id, GreetType.Greet, false); - } - catch (Exception ex) - { - Log.Warning(ex, "Error embeding greet message"); - } - } - - - private async Task GreetDmUser(GreetSettings conf, IGuildUser user) - { - var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - await _greetQueue.Writer.WriteAsync((conf, user, null)); - return await completionSource.Task; - } - - private async Task GreetDmUserInternal(GreetSettings conf, IGuildUser user) - { - try - { - var repCtx = new ReplacementContext(client: _client, guild: user.Guild, user: user); - var smartText = SmartText.CreateFrom(conf.MessageText); - smartText = await _repSvc.ReplaceAsync(smartText, repCtx); - - if (smartText is SmartPlainText pt) - { - smartText = new SmartEmbedText() - { - Description = pt.Text - }; - } - - if (smartText is SmartEmbedText set) - { - smartText = set with - { - Footer = CreateFooterSource(user) - }; - } - else if (smartText is SmartEmbedTextArray seta) - { - // if the greet dm message is a text array - var ebElem = seta.Embeds.LastOrDefault(); - if (ebElem is null) - { - // if there are no embeds, add an embed with the footer - smartText = seta with - { - Embeds = - [ - new SmartEmbedArrayElementText() - { - Footer = CreateFooterSource(user) - } - ] - }; - } - else - { - // if the maximum amount of embeds is reached, edit the last embed - if (seta.Embeds.Length >= 10) - { - seta.Embeds[^1] = seta.Embeds[^1] with - { - Footer = CreateFooterSource(user) - }; - } - else - { - // if there is less than 10 embeds, add an embed with footer only - seta.Embeds = seta.Embeds.Append(new SmartEmbedArrayElementText() - { - Footer = CreateFooterSource(user) - }) - .ToArray(); - } - } - } - - await _sender.Response(user).Text(smartText).Sanitize(false).SendAsync(); - } - catch - { - return false; - } - - return true; - } - - private static SmartTextEmbedFooter CreateFooterSource(IGuildUser user) - => new() - { - Text = $"This message was sent from {user.Guild} server.", - IconUrl = user.Guild.IconUrl - }; - - private Task OnUserJoined(IGuildUser user) - { - _ = Task.Run(async () => - { - try - { - var conf = await GetGreetSettingsAsync(user.GuildId, GreetType.Greet); - - if (conf is not null && conf.IsEnabled && conf.ChannelId is { } channelId) - { - var channel = await user.Guild.GetTextChannelAsync(channelId); - if (channel is not null) - { - await _greetQueue.Writer.WriteAsync((conf, user, channel)); - } - } - - var confDm = await GetGreetSettingsAsync(user.GuildId, GreetType.GreetDm); - - if (confDm?.IsEnabled ?? false) - await GreetDmUser(confDm, user); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - - public static string GetDefaultGreet(GreetType greetType) - => greetType switch - { - GreetType.Boost => "%user.mention% has boosted the server!", - GreetType.Greet => "%user.mention% has joined the server!", - GreetType.Bye => "%user.name% has left the server!", - GreetType.GreetDm => "Welcome to the server %user.name%", - _ => "%user.name% did something new!" - }; - - public async Task SetGreet( - ulong guildId, - ulong? channelId, - GreetType greetType, - bool? value = null) - { - await using var uow = _db.GetDbContext(); - var q = uow.GetTable(); - - if (value is null) - value = !_enabled[greetType].Contains(guildId); - - if (value is { } v) - { - await q - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - IsEnabled = v, - ChannelId = channelId, - }, - (old) => new() - { - IsEnabled = v, - ChannelId = channelId, - }, - () => new() - { - GuildId = guildId, - GreetType = greetType, - }); - } - - if (value is true) - { - _enabled[greetType].Add(guildId); - return true; - } - - _enabled[greetType].TryRemove(guildId); - return false; - } - - - public async Task SetMessage(ulong guildId, GreetType greetType, string? message) - { - await using (var uow = _db.GetDbContext()) - { - await uow.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - MessageText = message - }, - x => new() - { - MessageText = message - }, - () => new() - { - GuildId = guildId, - GreetType = greetType - }); - } - - var conf = await GetGreetSettingsAsync(guildId, greetType); - - return conf?.IsEnabled ?? false; - } - - public async Task SetDeleteTimer(ulong guildId, GreetType greetType, int timer) - { - if (timer < 0 || timer > 3600) - throw new ArgumentOutOfRangeException(nameof(timer)); - - await using (var uow = _db.GetDbContext()) - { - await uow.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - AutoDeleteTimer = timer, - }, - x => new() - { - AutoDeleteTimer = timer - }, - () => new() - { - GuildId = guildId, - GreetType = greetType - }); - } - - var conf = await GetGreetSettingsAsync(guildId, greetType); - - return conf?.IsEnabled ?? false; - } - - - public async Task Test( - ulong guildId, - GreetType type, - IMessageChannel channel, - IGuildUser user) - { - var conf = await GetGreetSettingsAsync(guildId, type); - if (conf is null) - return false; - - await SendMessage(conf, channel, user); - return true; - } - - public async Task SendMessage(GreetSettings conf, IMessageChannel channel, IGuildUser user) - { - if (conf.GreetType == GreetType.GreetDm) - { - await _greetQueue.Writer.WriteAsync((conf, user, channel as ITextChannel)); - return await GreetDmUser(conf, user); - } - - if (channel is not ITextChannel ch) - return false; - - await GreetUsers(conf, ch, user); - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs deleted file mode 100644 index 76579e6..0000000 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs +++ /dev/null @@ -1,44 +0,0 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Services; - -public enum GreetType -{ - Greet, - GreetDm, - Bye, - Boost, -} - -public class GreetSettings -{ - public int Id { get; set; } - - public ulong GuildId { get; set; } - public GreetType GreetType { get; set; } - public string? MessageText { get; set; } - public bool IsEnabled { get; set; } - public ulong? ChannelId { get; set; } - - public int AutoDeleteTimer { get; set; } - - // public int AutoDeleteGreetMessagesTimer { get; set; } - // public int AutoDeleteByeMessagesTimer { get; set; } - // - // public ulong GreetMessageChannelId { get; set; } - // public ulong ByeMessageChannelId { get; set; } - // - // public bool SendDmGreetMessage { get; set; } - // public string? DmGreetMessageText { get; set; } - // - // public bool SendChannelGreetMessage { get; set; } - // public string? ChannelGreetMessageText { get; set; } - // - // public bool SendChannelByeMessage { get; set; } - // public string? ChannelByeMessageText { get; set; } - // - // public bool SendBoostMessage { get; set; } - // public string? BoostMessage { get; set; } - // public int BoostMessageDeleteAfter { get; set; } - // public ulong BoostMessageChannelId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs deleted file mode 100644 index 8ff20ac..0000000 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneyPotService.cs +++ /dev/null @@ -1,95 +0,0 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using System.Threading.Channels; - -namespace EllieBot.Modules.Administration.Honeypot; - -public sealed class HoneyPotService : IHoneyPotService, IReadyExecutor, IExecNoCommand, IEService -{ - private readonly DbService _db; - private readonly CommandHandler _handler; - - private ConcurrentHashSet _channels = new(); - - private Channel _punishments = Channel.CreateBounded( - new BoundedChannelOptions(100) - { - FullMode = BoundedChannelFullMode.DropOldest, - SingleReader = true, - SingleWriter = false, - }); - - public HoneyPotService(DbService db, CommandHandler handler) - { - _db = db; - _handler = handler; - } - - public async Task ToggleHoneypotChannel(ulong guildId, ulong channelId) - { - await using var uow = _db.GetDbContext(); - - var deleted = await uow.HoneyPotChannels - .Where(x => x.GuildId == guildId) - .DeleteWithOutputAsync(); - - if (deleted.Length > 0) - { - _channels.TryRemove(deleted[0].ChannelId); - return false; - } - - await uow.HoneyPotChannels - .ToLinqToDBTable() - .InsertAsync(() => new HoneypotChannel - { - GuildId = guildId, - ChannelId = channelId - }); - - _channels.Add(channelId); - - return true; - } - - public async Task OnReadyAsync() - { - await using var uow = _db.GetDbContext(); - - var channels = await uow.HoneyPotChannels - .Select(x => x.ChannelId) - .ToListAsyncLinqToDB(); - - _channels = new(channels); - - while (await _punishments.Reader.WaitToReadAsync()) - { - while (_punishments.Reader.TryRead(out var user)) - { - try - { - Log.Information("Honeypot caught user {User} [{UserId}]", user, user.Id); - await user.BanAsync(pruneDays: 1); - await user.Guild.RemoveBanAsync(user.Id); - } - catch (Exception e) - { - Log.Warning(e, "Failed banning {User} due to {Error}", user, e.Message); - } - - await Task.Delay(1000); - } - } - } - - public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - { - if (_channels.Contains(msg.Channel.Id) && msg.Author is SocketGuildUser sgu) - { - if (!sgu.GuildPermissions.BanMembers) - await _punishments.Writer.WriteAsync(sgu); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs b/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs deleted file mode 100644 index 897d019..0000000 --- a/src/EllieBot/Modules/Administration/Honeypot/HoneypotCommands.cs +++ /dev/null @@ -1,29 +0,0 @@ -using EllieBot.Modules.Administration.Honeypot; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class HoneypotCommands : EllieModule - { - private readonly IHoneyPotService _service; - - public HoneypotCommands(IHoneyPotService service) - => _service = service; - - [Cmd] - [RequireContext(ContextType.Guild)] - [RequireUserPermission(GuildPermission.Administrator)] - [RequireBotPermission(GuildPermission.BanMembers)] - public async Task Honeypot() - { - var enabled = await _service.ToggleHoneypotChannel(ctx.Guild.Id, ctx.Channel.Id); - - if (enabled) - await Response().Confirm(strs.honeypot_on).SendAsync(); - else - await Response().Confirm(strs.honeypot_off).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs b/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs deleted file mode 100644 index 1483590..0000000 --- a/src/EllieBot/Modules/Administration/Honeypot/IHoneyPotService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Administration.Honeypot; - -public interface IHoneyPotService -{ - public Task ToggleHoneypotChannel(ulong guildId, ulong channelId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/ImageOnlyChannelService.cs b/src/EllieBot/Modules/Administration/ImageOnlyChannelService.cs deleted file mode 100644 index 1b45cc6..0000000 --- a/src/EllieBot/Modules/Administration/ImageOnlyChannelService.cs +++ /dev/null @@ -1,235 +0,0 @@ -#nullable disable -using LinqToDB; -using Microsoft.Extensions.Caching.Memory; -using EllieBot.Common.ModuleBehaviors; -using System.Net; -using System.Threading.Channels; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class SomethingOnlyChannelService : IExecOnMessage -{ - public int Priority { get; } = 0; - private readonly IMemoryCache _ticketCache; - private readonly DiscordSocketClient _client; - private readonly DbService _db; - private readonly ConcurrentDictionary> _imageOnly; - private readonly ConcurrentDictionary> _linkOnly; - - private readonly Channel _deleteQueue = Channel.CreateBounded( - new BoundedChannelOptions(100) - { - FullMode = BoundedChannelFullMode.DropOldest, - SingleReader = true, - SingleWriter = false - }); - - - public SomethingOnlyChannelService(IMemoryCache ticketCache, DiscordSocketClient client, DbService db) - { - _ticketCache = ticketCache; - _client = client; - _db = db; - - using var uow = _db.GetDbContext(); - _imageOnly = uow.Set() - .Where(x => x.Type == OnlyChannelType.Image) - .ToList() - .GroupBy(x => x.GuildId) - .ToDictionary(x => x.Key, x => new ConcurrentHashSet(x.Select(y => y.ChannelId))) - .ToConcurrent(); - - _linkOnly = uow.Set() - .Where(x => x.Type == OnlyChannelType.Link) - .ToList() - .GroupBy(x => x.GuildId) - .ToDictionary(x => x.Key, x => new ConcurrentHashSet(x.Select(y => y.ChannelId))) - .ToConcurrent(); - - _ = Task.Run(DeleteQueueRunner); - - _client.ChannelDestroyed += ClientOnChannelDestroyed; - } - - private async Task ClientOnChannelDestroyed(SocketChannel ch) - { - if (ch is not IGuildChannel gch) - return; - - if (_imageOnly.TryGetValue(gch.GuildId, out var channels) && channels.TryRemove(ch.Id)) - await ToggleImageOnlyChannelAsync(gch.GuildId, ch.Id, true); - } - - private async Task DeleteQueueRunner() - { - while (true) - { - var toDelete = await _deleteQueue.Reader.ReadAsync(); - try - { - await toDelete.DeleteAsync(); - await Task.Delay(1000); - } - catch (HttpException ex) when (ex.HttpCode == HttpStatusCode.Forbidden) - { - // disable if bot can't delete messages in the channel - await ToggleImageOnlyChannelAsync(((ITextChannel)toDelete.Channel).GuildId, toDelete.Channel.Id, true); - } - } - } - - public async Task ToggleImageOnlyChannelAsync(ulong guildId, ulong channelId, bool forceDisable = false) - { - var newState = false; - await using var uow = _db.GetDbContext(); - if (forceDisable || (_imageOnly.TryGetValue(guildId, out var channels) && channels.TryRemove(channelId))) - { - await uow.Set().DeleteAsync(x => x.ChannelId == channelId && x.Type == OnlyChannelType.Image); - } - else - { - await uow.Set().DeleteAsync(x => x.ChannelId == channelId); - uow.Set().Add(new() - { - GuildId = guildId, - ChannelId = channelId, - Type = OnlyChannelType.Image - }); - - if (_linkOnly.TryGetValue(guildId, out var chs)) - chs.TryRemove(channelId); - - channels = _imageOnly.GetOrAdd(guildId, new ConcurrentHashSet()); - channels.Add(channelId); - newState = true; - } - - await uow.SaveChangesAsync(); - return newState; - } - - public async Task ToggleLinkOnlyChannelAsync(ulong guildId, ulong channelId, bool forceDisable = false) - { - var newState = false; - await using var uow = _db.GetDbContext(); - if (forceDisable || (_linkOnly.TryGetValue(guildId, out var channels) && channels.TryRemove(channelId))) - { - await uow.Set().DeleteAsync(x => x.ChannelId == channelId && x.Type == OnlyChannelType.Link); - } - else - { - await uow.Set().DeleteAsync(x => x.ChannelId == channelId); - uow.Set().Add(new() - { - GuildId = guildId, - ChannelId = channelId, - Type = OnlyChannelType.Link - }); - - if (_imageOnly.TryGetValue(guildId, out var chs)) - chs.TryRemove(channelId); - - channels = _linkOnly.GetOrAdd(guildId, new ConcurrentHashSet()); - channels.Add(channelId); - newState = true; - } - - await uow.SaveChangesAsync(); - return newState; - } - - public async Task ExecOnMessageAsync(IGuild guild, IUserMessage msg) - { - if (msg.Channel is not ITextChannel tch) - return false; - - if (_imageOnly.TryGetValue(tch.GuildId, out var chs) && chs.Contains(msg.Channel.Id)) - return await HandleOnlyChannel(tch, msg, OnlyChannelType.Image); - - if (_linkOnly.TryGetValue(tch.GuildId, out chs) && chs.Contains(msg.Channel.Id)) - return await HandleOnlyChannel(tch, msg, OnlyChannelType.Link); - - return false; - } - - private async Task HandleOnlyChannel(ITextChannel tch, IUserMessage msg, OnlyChannelType type) - { - if (type == OnlyChannelType.Image) - { - if (msg.Attachments.Any(x => x is { Height: > 0, Width: > 0 })) - return false; - } - else - { - if (msg.Content.TryGetUrlPath(out _)) - return false; - } - - var user = await tch.Guild.GetUserAsync(msg.Author.Id) - ?? await _client.Rest.GetGuildUserAsync(tch.GuildId, msg.Author.Id); - - if (user is null) - return false; - - // ignore owner and admin - if (user.Id == tch.Guild.OwnerId || user.GuildPermissions.Administrator) - { - Log.Information("{Type}-Only Channel: Ignoring owner or admin ({ChannelId})", type, msg.Channel.Id); - return false; - } - - // ignore users higher in hierarchy - var botUser = await tch.Guild.GetCurrentUserAsync(); - if (user.GetRoles().Max(x => x.Position) >= botUser.GetRoles().Max(x => x.Position)) - return false; - - if (!botUser.GetPermissions(tch).ManageChannel) - { - if(type == OnlyChannelType.Image) - await ToggleImageOnlyChannelAsync(tch.GuildId, tch.Id, true); - else - await ToggleImageOnlyChannelAsync(tch.GuildId, tch.Id, true); - - return false; - } - - var shouldLock = AddUserTicket(tch.GuildId, msg.Author.Id); - if (shouldLock) - { - await tch.AddPermissionOverwriteAsync(msg.Author, new(sendMessages: PermValue.Deny)); - Log.Warning("{Type}-Only Channel: User {User} [{UserId}] has been banned from typing in the channel [{ChannelId}]", - type, - msg.Author, - msg.Author.Id, - msg.Channel.Id); - } - - try - { - await _deleteQueue.Writer.WriteAsync(msg); - } - catch (Exception ex) - { - Log.Error(ex, "Error deleting message {MessageId} in image-only channel {ChannelId}", msg.Id, tch.Id); - } - - return true; - } - - private bool AddUserTicket(ulong guildId, ulong userId) - { - var old = _ticketCache.GetOrCreate($"{guildId}_{userId}", - entry => - { - entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(1); - return 0; - }); - - _ticketCache.Set($"{guildId}_{userId}", ++old); - - // if this is the third time that the user posts a - // non image in an image-only channel on this server - return old > 2; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/LocalizationCommands.cs b/src/EllieBot/Modules/Administration/LocalizationCommands.cs deleted file mode 100644 index 9715d0b..0000000 --- a/src/EllieBot/Modules/Administration/LocalizationCommands.cs +++ /dev/null @@ -1,264 +0,0 @@ -#nullable disable -using System.Globalization; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class LocalizationCommands : EllieModule - { - private static readonly IReadOnlyDictionary _supportedLocales = new Dictionary - { - { "ar", "العربية" }, - { "zh-TW", "繁體中文, 台灣" }, - { "zh-CN", "简体中文, 中华人民共和国" }, - { "nl-NL", "Nederlands, Nederland" }, - { "en-US", "English, United States" }, - { "fr-FR", "Français, France" }, - { "cs-CZ", "Čeština, Česká republika" }, - { "da-DK", "Dansk, Danmark" }, - { "de-DE", "Deutsch, Deutschland" }, - { "he-IL", "עברית, ישראל" }, - { "hu-HU", "Magyar, Magyarország" }, - { "id-ID", "Bahasa Indonesia, Indonesia" }, - { "it-IT", "Italiano, Italia" }, - { "ja-JP", "日本語, 日本" }, - { "ko-KR", "한국어, 대한민국" }, - { "nb-NO", "Norsk, Norge" }, - { "pl-PL", "Polski, Polska" }, - { "pt-BR", "Português Brasileiro, Brasil" }, - { "ro-RO", "Română, România" }, - { "ru-RU", "Русский, Россия" }, - { "sr-Cyrl-RS", "Српски, Србија" }, - { "es-ES", "Español, España" }, - { "sv-SE", "Svenska, Sverige" }, - { "tr-TR", "Türkçe, Türkiye" }, - { "ts-TS", "Tsundere, You Baka" }, - { "uk-UA", "Українська, Україна" } - }; - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public async Task LanguageSet() - => await Response().Confirm(strs.lang_set_show(Format.Bold(Culture.ToString()), - Format.Bold(Culture.NativeName))).SendAsync(); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(1)] - public async Task LanguageSet(string name) - { - try - { - CultureInfo ci; - if (name.Trim().ToLowerInvariant() == "default") - { - _localization.RemoveGuildCulture(ctx.Guild); - ci = _localization.DefaultCultureInfo; - } - else - { - ci = new CultureInfo(name); - if (!_supportedLocales.ContainsKey(ci.Name)) - { - await LanguagesList(); - return; - } - - _localization.SetGuildCulture(ctx.Guild, ci); - } - - var nativeName = ci.NativeName; - if (ci.Name == "ts-TS") - nativeName = _supportedLocales[ci.Name]; - await Response().Confirm(strs.lang_set(Format.Bold(ci.ToString()), Format.Bold(nativeName))).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.lang_set_fail).SendAsync(); - } - } - - [Cmd] - public async Task LanguageSetDefault() - { - var cul = _localization.DefaultCultureInfo; - await Response().Error(strs.lang_set_bot_show(cul, cul.NativeName)).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task LanguageSetDefault(string name) - { - try - { - CultureInfo ci; - if (name.Trim().ToLowerInvariant() == "default") - { - _localization.ResetDefaultCulture(); - ci = _localization.DefaultCultureInfo; - } - else - { - ci = new CultureInfo(name); - if (!_supportedLocales.ContainsKey(ci.Name)) - { - await LanguagesList(); - return; - } - _localization.SetDefaultCulture(ci); - } - - await Response().Confirm(strs.lang_set_bot(Format.Bold(ci.ToString()), - Format.Bold(ci.NativeName))).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.lang_set_fail).SendAsync(); - } - } - - [Cmd] - public async Task LanguagesList() - => await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.lang_list)) - .WithDescription(string.Join("\n", - _supportedLocales.Select( - x => $"{Format.Code(x.Key),-10} => {x.Value}")))).SendAsync(); - } -} -/* list of language codes for reference. - * taken from https://github.com/dotnet/coreclr/blob/ee5862c6a257e60e263537d975ab6c513179d47f/src/mscorlib/src/System/Globalization/CultureData.cs#L192 - { "029", "en-029" }, - { "AE", "ar-AE" }, - { "AF", "prs-AF" }, - { "AL", "sq-AL" }, - { "AM", "hy-AM" }, - { "AR", "es-AR" }, - { "AT", "de-AT" }, - { "AU", "en-AU" }, - { "AZ", "az-Cyrl-AZ" }, - { "BA", "bs-Latn-BA" }, - { "BD", "bn-BD" }, - { "BE", "nl-BE" }, - { "BG", "bg-BG" }, - { "BH", "ar-BH" }, - { "BN", "ms-BN" }, - { "BO", "es-BO" }, - { "BR", "pt-BR" }, - { "BY", "be-BY" }, - { "BZ", "en-BZ" }, - { "CA", "en-CA" }, - { "CH", "it-CH" }, - { "CL", "es-CL" }, - { "CN", "zh-CN" }, - { "CO", "es-CO" }, - { "CR", "es-CR" }, - { "CS", "sr-Cyrl-CS" }, - { "CZ", "cs-CZ" }, - { "DE", "de-DE" }, - { "DK", "da-DK" }, - { "DO", "es-DO" }, - { "DZ", "ar-DZ" }, - { "EC", "es-EC" }, - { "EE", "et-EE" }, - { "EG", "ar-EG" }, - { "ES", "es-ES" }, - { "ET", "am-ET" }, - { "FI", "fi-FI" }, - { "FO", "fo-FO" }, - { "FR", "fr-FR" }, - { "GB", "en-GB" }, - { "GE", "ka-GE" }, - { "GL", "kl-GL" }, - { "GR", "el-GR" }, - { "GT", "es-GT" }, - { "HK", "zh-HK" }, - { "HN", "es-HN" }, - { "HR", "hr-HR" }, - { "HU", "hu-HU" }, - { "ID", "id-ID" }, - { "IE", "en-IE" }, - { "IL", "he-IL" }, - { "IN", "hi-IN" }, - { "IQ", "ar-IQ" }, - { "IR", "fa-IR" }, - { "IS", "is-IS" }, - { "IT", "it-IT" }, - { "IV", "" }, - { "JM", "en-JM" }, - { "JO", "ar-JO" }, - { "JP", "ja-JP" }, - { "KE", "sw-KE" }, - { "KG", "ky-KG" }, - { "KH", "km-KH" }, - { "KR", "ko-KR" }, - { "KW", "ar-KW" }, - { "KZ", "kk-KZ" }, - { "LA", "lo-LA" }, - { "LB", "ar-LB" }, - { "LI", "de-LI" }, - { "LK", "si-LK" }, - { "LT", "lt-LT" }, - { "LU", "lb-LU" }, - { "LV", "lv-LV" }, - { "LY", "ar-LY" }, - { "MA", "ar-MA" }, - { "MC", "fr-MC" }, - { "ME", "sr-Latn-ME" }, - { "MK", "mk-MK" }, - { "MN", "mn-MN" }, - { "MO", "zh-MO" }, - { "MT", "mt-MT" }, - { "MV", "dv-MV" }, - { "MX", "es-MX" }, - { "MY", "ms-MY" }, - { "NG", "ig-NG" }, - { "NI", "es-NI" }, - { "NL", "nl-NL" }, - { "NO", "nn-NO" }, - { "NP", "ne-NP" }, - { "NZ", "en-NZ" }, - { "OM", "ar-OM" }, - { "PA", "es-PA" }, - { "PE", "es-PE" }, - { "PH", "en-PH" }, - { "PK", "ur-PK" }, - { "PL", "pl-PL" }, - { "PR", "es-PR" }, - { "PT", "pt-PT" }, - { "PY", "es-PY" }, - { "QA", "ar-QA" }, - { "RO", "ro-RO" }, - { "RS", "sr-Latn-RS" }, - { "RU", "ru-RU" }, - { "RW", "rw-RW" }, - { "SA", "ar-SA" }, - { "SE", "sv-SE" }, - { "SG", "zh-SG" }, - { "SI", "sl-SI" }, - { "SK", "sk-SK" }, - { "SN", "wo-SN" }, - { "SV", "es-SV" }, - { "SY", "ar-SY" }, - { "TH", "th-TH" }, - { "TJ", "tg-Cyrl-TJ" }, - { "TM", "tk-TM" }, - { "TN", "ar-TN" }, - { "TR", "tr-TR" }, - { "TT", "en-TT" }, - { "TW", "zh-TW" }, - { "UA", "uk-UA" }, - { "US", "en-US" }, - { "UY", "es-UY" }, - { "UZ", "uz-Cyrl-UZ" }, - { "VE", "es-VE" }, - { "VN", "vi-VN" }, - { "YE", "ar-YE" }, - { "ZA", "af-ZA" }, - { "ZW", "en-ZW" } - */ \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Mute/MuteCommands.cs b/src/EllieBot/Modules/Administration/Mute/MuteCommands.cs deleted file mode 100644 index 94e797a..0000000 --- a/src/EllieBot/Modules/Administration/Mute/MuteCommands.cs +++ /dev/null @@ -1,231 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class MuteCommands : EllieModule - { - private async Task VerifyMutePermissions(IGuildUser runnerUser, IGuildUser targetUser) - { - var runnerUserRoles = runnerUser.GetRoles(); - var targetUserRoles = targetUser.GetRoles(); - if (runnerUser.Id != ctx.Guild.OwnerId - && runnerUserRoles.Max(x => x.Position) <= targetUserRoles.Max(x => x.Position)) - { - await Response().Error(strs.mute_perms).SendAsync(); - return false; - } - - return true; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - public async Task MuteRole([Leftover] IRole role = null) - { - if (role is null) - { - var muteRole = await _service.GetMuteRole(ctx.Guild); - await Response().Confirm(strs.mute_role(Format.Code(muteRole.Name))).SendAsync(); - return; - } - - if (ctx.User.Id != ctx.Guild.OwnerId - && role.Position >= ((SocketGuildUser)ctx.User).Roles.Max(x => x.Position)) - { - await Response().Error(strs.insuf_perms_u).SendAsync(); - return; - } - - await _service.SetMuteRoleAsync(ctx.Guild.Id, role.Name); - - await Response().Confirm(strs.mute_role_set).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)] - [Priority(0)] - public async Task Mute(IGuildUser target, [Leftover] string reason = "") - { - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, target)) - return; - - await _service.MuteUser(target, ctx.User, reason: reason); - await Response().Confirm(strs.user_muted(Format.Bold(target.ToString()))).SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Exception in the mute command"); - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)] - [Priority(1)] - public async Task Mute(StoopidTime time, IGuildUser user, [Leftover] string reason = "") - { - if (time.Time < TimeSpan.FromMinutes(1) || time.Time > TimeSpan.FromDays(49)) - return; - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, user)) - return; - - await _service.TimedMute(user, ctx.User, time.Time, reason: reason); - await Response().Confirm(strs.user_muted_time(Format.Bold(user.ToString()), - (int)time.Time.TotalMinutes)).SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in mute command"); - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles | GuildPerm.MuteMembers)] - public async Task Unmute(IGuildUser user, [Leftover] string reason = "") - { - try - { - await _service.UnmuteUser(user.GuildId, user.Id, ctx.User, reason: reason); - await Response().Confirm(strs.user_unmuted(Format.Bold(user.ToString()))).SendAsync(); - } - catch - { - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [Priority(0)] - public async Task ChatMute(IGuildUser user, [Leftover] string reason = "") - { - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, user)) - return; - - await _service.MuteUser(user, ctx.User, MuteType.Chat, reason); - await Response().Confirm(strs.user_chat_mute(Format.Bold(user.ToString()))).SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Exception in the chatmute command"); - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [Priority(1)] - public async Task ChatMute(StoopidTime time, IGuildUser user, [Leftover] string reason = "") - { - if (time.Time < TimeSpan.FromMinutes(1) || time.Time > TimeSpan.FromDays(49)) - return; - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, user)) - return; - - await _service.TimedMute(user, ctx.User, time.Time, MuteType.Chat, reason); - await Response().Confirm(strs.user_chat_mute_time(Format.Bold(user.ToString()), - (int)time.Time.TotalMinutes)).SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in chatmute command"); - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - public async Task ChatUnmute(IGuildUser user, [Leftover] string reason = "") - { - try - { - await _service.UnmuteUser(user.Guild.Id, user.Id, ctx.User, MuteType.Chat, reason); - await Response().Confirm(strs.user_chat_unmute(Format.Bold(user.ToString()))).SendAsync(); - } - catch - { - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.MuteMembers)] - [Priority(0)] - public async Task VoiceMute(IGuildUser user, [Leftover] string reason = "") - { - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, user)) - return; - - await _service.MuteUser(user, ctx.User, MuteType.Voice, reason); - await Response().Confirm(strs.user_voice_mute(Format.Bold(user.ToString()))).SendAsync(); - } - catch - { - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.MuteMembers)] - [Priority(1)] - public async Task VoiceMute(StoopidTime time, IGuildUser user, [Leftover] string reason = "") - { - if (time.Time < TimeSpan.FromMinutes(1) || time.Time > TimeSpan.FromDays(49)) - return; - try - { - if (!await VerifyMutePermissions((IGuildUser)ctx.User, user)) - return; - - await _service.TimedMute(user, ctx.User, time.Time, MuteType.Voice, reason); - await Response().Confirm(strs.user_voice_mute_time(Format.Bold(user.ToString()), - (int)time.Time.TotalMinutes)).SendAsync(); - } - catch - { - await Response().Error(strs.mute_error).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.MuteMembers)] - public async Task VoiceUnmute(IGuildUser user, [Leftover] string reason = "") - { - try - { - await _service.UnmuteUser(user.GuildId, user.Id, ctx.User, MuteType.Voice, reason); - await Response().Confirm(strs.user_voice_unmute(Format.Bold(user.ToString()))).SendAsync(); - } - catch - { - await Response().Error(strs.mute_error).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Mute/MuteService.cs b/src/EllieBot/Modules/Administration/Mute/MuteService.cs deleted file mode 100644 index a67610d..0000000 --- a/src/EllieBot/Modules/Administration/Mute/MuteService.cs +++ /dev/null @@ -1,503 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public enum MuteType -{ - Voice, - Chat, - All -} - -public class MuteService : IEService -{ - public enum TimerType { Mute, Ban, AddRole } - - private static readonly OverwritePermissions _denyOverwrite = new(addReactions: PermValue.Deny, - sendMessages: PermValue.Deny, - sendMessagesInThreads: PermValue.Deny, - attachFiles: PermValue.Deny); - - public event Action UserMuted = delegate { }; - public event Action UserUnmuted = delegate { }; - - public ConcurrentDictionary GuildMuteRoles { get; } - public ConcurrentDictionary> MutedUsers { get; } - - public ConcurrentDictionary> UnTimers { get; } = new(); - - private readonly DiscordSocketClient _client; - private readonly DbService _db; - private readonly IMessageSenderService _sender; - - public MuteService(DiscordSocketClient client, DbService db, IMessageSenderService sender) - { - _client = client; - _db = db; - _sender = sender; - - using (var uow = db.GetDbContext()) - { - var guildIds = client.Guilds.Select(x => x.Id).ToList(); - var configs = uow.Set() - .AsNoTracking() - .AsSplitQuery() - .Include(x => x.MutedUsers) - .Include(x => x.UnbanTimer) - .Include(x => x.UnmuteTimers) - .Include(x => x.UnroleTimer) - .Where(x => guildIds.Contains(x.GuildId)) - .ToList(); - - GuildMuteRoles = configs.Where(c => !string.IsNullOrWhiteSpace(c.MuteRoleName)) - .ToDictionary(c => c.GuildId, c => c.MuteRoleName) - .ToConcurrent(); - - MutedUsers = new(configs.ToDictionary(k => k.GuildId, - v => new ConcurrentHashSet(v.MutedUsers.Select(m => m.UserId)))); - - var max = TimeSpan.FromDays(49); - - foreach (var conf in configs) - { - foreach (var x in conf.UnmuteTimers) - { - TimeSpan after; - if (x.UnmuteAt - TimeSpan.FromMinutes(2) <= DateTime.UtcNow) - after = TimeSpan.FromMinutes(2); - else - { - var unmute = x.UnmuteAt - DateTime.UtcNow; - after = unmute > max ? max : unmute; - } - - StartUn_Timer(conf.GuildId, x.UserId, after, TimerType.Mute); - } - - foreach (var x in conf.UnbanTimer) - { - TimeSpan after; - if (x.UnbanAt - TimeSpan.FromMinutes(2) <= DateTime.UtcNow) - after = TimeSpan.FromMinutes(2); - else - { - var unban = x.UnbanAt - DateTime.UtcNow; - after = unban > max ? max : unban; - } - - StartUn_Timer(conf.GuildId, x.UserId, after, TimerType.Ban); - } - - foreach (var x in conf.UnroleTimer) - { - TimeSpan after; - if (x.UnbanAt - TimeSpan.FromMinutes(2) <= DateTime.UtcNow) - after = TimeSpan.FromMinutes(2); - else - { - var unban = x.UnbanAt - DateTime.UtcNow; - after = unban > max ? max : unban; - } - - StartUn_Timer(conf.GuildId, x.UserId, after, TimerType.AddRole, x.RoleId); - } - } - - _client.UserJoined += Client_UserJoined; - } - - UserMuted += OnUserMuted; - UserUnmuted += OnUserUnmuted; - } - - private void OnUserMuted( - IGuildUser user, - IUser mod, - MuteType type, - string reason) - { - if (string.IsNullOrWhiteSpace(reason)) - return; - - _ = Task.Run(() => _sender.Response(user) - .Embed(_sender.CreateEmbed() - .WithDescription($"You've been muted in {user.Guild} server") - .AddField("Mute Type", type.ToString()) - .AddField("Moderator", mod.ToString()) - .AddField("Reason", reason)) - .SendAsync()); - } - - private void OnUserUnmuted( - IGuildUser user, - IUser mod, - MuteType type, - string reason) - { - if (string.IsNullOrWhiteSpace(reason)) - return; - - _ = Task.Run(() => _sender.Response(user) - .Embed(_sender.CreateEmbed() - .WithDescription($"You've been unmuted in {user.Guild} server") - .AddField("Unmute Type", type.ToString()) - .AddField("Moderator", mod.ToString()) - .AddField("Reason", reason)) - .SendAsync()); - } - - private Task Client_UserJoined(IGuildUser usr) - { - try - { - MutedUsers.TryGetValue(usr.Guild.Id, out var muted); - - if (muted is null || !muted.Contains(usr.Id)) - return Task.CompletedTask; - _ = Task.Run(() => MuteUser(usr, _client.CurrentUser, reason: "Sticky mute")); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in MuteService UserJoined event"); - } - - return Task.CompletedTask; - } - - public async Task SetMuteRoleAsync(ulong guildId, string name) - { - await using var uow = _db.GetDbContext(); - var config = uow.GuildConfigsForId(guildId, set => set); - config.MuteRoleName = name; - GuildMuteRoles.AddOrUpdate(guildId, name, (_, _) => name); - await uow.SaveChangesAsync(); - } - - public async Task MuteUser( - IGuildUser usr, - IUser mod, - MuteType type = MuteType.All, - string reason = "") - { - if (type == MuteType.All) - { - try { await usr.ModifyAsync(x => x.Mute = true); } - catch { } - - var muteRole = await GetMuteRole(usr.Guild); - if (!usr.RoleIds.Contains(muteRole.Id)) - await usr.AddRoleAsync(muteRole); - StopTimer(usr.GuildId, usr.Id, TimerType.Mute); - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(usr.Guild.Id, - set => set.Include(gc => gc.MutedUsers).Include(gc => gc.UnmuteTimers)); - config.MutedUsers.Add(new() - { - UserId = usr.Id - }); - if (MutedUsers.TryGetValue(usr.Guild.Id, out var muted)) - muted.Add(usr.Id); - - config.UnmuteTimers.RemoveWhere(x => x.UserId == usr.Id); - - await uow.SaveChangesAsync(); - } - - UserMuted(usr, mod, MuteType.All, reason); - } - else if (type == MuteType.Voice) - { - try - { - await usr.ModifyAsync(x => x.Mute = true); - UserMuted(usr, mod, MuteType.Voice, reason); - } - catch { } - } - else if (type == MuteType.Chat) - { - await usr.AddRoleAsync(await GetMuteRole(usr.Guild)); - UserMuted(usr, mod, MuteType.Chat, reason); - } - } - - public async Task UnmuteUser( - ulong guildId, - ulong usrId, - IUser mod, - MuteType type = MuteType.All, - string reason = "") - { - var usr = _client.GetGuild(guildId)?.GetUser(usrId); - if (type == MuteType.All) - { - StopTimer(guildId, usrId, TimerType.Mute); - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(guildId, - set => set.Include(gc => gc.MutedUsers).Include(gc => gc.UnmuteTimers)); - var match = new MutedUserId - { - UserId = usrId - }; - var toRemove = config.MutedUsers.FirstOrDefault(x => x.Equals(match)); - if (toRemove is not null) - uow.Remove(toRemove); - if (MutedUsers.TryGetValue(guildId, out var muted)) - muted.TryRemove(usrId); - - config.UnmuteTimers.RemoveWhere(x => x.UserId == usrId); - - await uow.SaveChangesAsync(); - } - - if (usr is not null) - { - try { await usr.ModifyAsync(x => x.Mute = false); } - catch { } - - try { await usr.RemoveRoleAsync(await GetMuteRole(usr.Guild)); } - catch - { - /*ignore*/ - } - - UserUnmuted(usr, mod, MuteType.All, reason); - } - } - else if (type == MuteType.Voice) - { - if (usr is null) - return; - try - { - await usr.ModifyAsync(x => x.Mute = false); - UserUnmuted(usr, mod, MuteType.Voice, reason); - } - catch { } - } - else if (type == MuteType.Chat) - { - if (usr is null) - return; - await usr.RemoveRoleAsync(await GetMuteRole(usr.Guild)); - UserUnmuted(usr, mod, MuteType.Chat, reason); - } - } - - public async Task GetMuteRole(IGuild guild) - { - ArgumentNullException.ThrowIfNull(guild); - - const string defaultMuteRoleName = "ellie-mute"; - - var muteRoleName = GuildMuteRoles.GetOrAdd(guild.Id, defaultMuteRoleName); - - var muteRole = guild.Roles.FirstOrDefault(r => r.Name == muteRoleName); - if (muteRole is null) - //if it doesn't exist, create it - { - try { muteRole = await guild.CreateRoleAsync(muteRoleName, isMentionable: false); } - catch - { - //if creations fails, maybe the name is not correct, find default one, if doesn't work, create default one - muteRole = guild.Roles.FirstOrDefault(r => r.Name == muteRoleName) - ?? await guild.CreateRoleAsync(defaultMuteRoleName, isMentionable: false); - } - } - - foreach (var toOverwrite in await guild.GetTextChannelsAsync()) - { - try - { - if (!toOverwrite.PermissionOverwrites.Any(x => x.TargetId == muteRole.Id - && x.TargetType == PermissionTarget.Role)) - { - await toOverwrite.AddPermissionOverwriteAsync(muteRole, _denyOverwrite); - - await Task.Delay(200); - } - } - catch - { - // ignored - } - } - - return muteRole; - } - - public async Task TimedMute( - IGuildUser user, - IUser mod, - TimeSpan after, - MuteType muteType = MuteType.All, - string reason = "") - { - await MuteUser(user, mod, muteType, reason); // mute the user. This will also remove any previous unmute timers - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(user.GuildId, set => set.Include(x => x.UnmuteTimers)); - config.UnmuteTimers.Add(new() - { - UserId = user.Id, - UnmuteAt = DateTime.UtcNow + after - }); // add teh unmute timer to the database - uow.SaveChanges(); - } - - StartUn_Timer(user.GuildId, user.Id, after, TimerType.Mute); // start the timer - } - - public async Task TimedBan( - IGuild guild, - ulong userId, - TimeSpan after, - string reason, - int pruneDays) - { - await guild.AddBanAsync(userId, pruneDays, reason); - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(guild.Id, set => set.Include(x => x.UnbanTimer)); - config.UnbanTimer.Add(new() - { - UserId = userId, - UnbanAt = DateTime.UtcNow + after - }); // add teh unmute timer to the database - await uow.SaveChangesAsync(); - } - - StartUn_Timer(guild.Id, userId, after, TimerType.Ban); // start the timer - } - - public async Task TimedRole( - IGuildUser user, - TimeSpan after, - string reason, - IRole role) - { - await user.AddRoleAsync(role); - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(user.GuildId, set => set.Include(x => x.UnroleTimer)); - config.UnroleTimer.Add(new() - { - UserId = user.Id, - UnbanAt = DateTime.UtcNow + after, - RoleId = role.Id - }); // add teh unmute timer to the database - uow.SaveChanges(); - } - - StartUn_Timer(user.GuildId, user.Id, after, TimerType.AddRole, role.Id); // start the timer - } - - public void StartUn_Timer( - ulong guildId, - ulong userId, - TimeSpan after, - TimerType type, - ulong? roleId = null) - { - //load the unmute timers for this guild - var userUnTimers = UnTimers.GetOrAdd(guildId, new ConcurrentDictionary<(ulong, TimerType), Timer>()); - - //unmute timer to be added - var toAdd = new Timer(async _ => - { - if (type == TimerType.Ban) - { - try - { - RemoveTimerFromDb(guildId, userId, type); - StopTimer(guildId, userId, type); - var guild = _client.GetGuild(guildId); // load the guild - if (guild is not null) - await guild.RemoveBanAsync(userId); - } - catch (Exception ex) - { - Log.Warning(ex, "Couldn't unban user {UserId} in guild {GuildId}", userId, guildId); - } - } - else if (type == TimerType.AddRole) - { - try - { - if (roleId is null) - return; - - RemoveTimerFromDb(guildId, userId, type); - StopTimer(guildId, userId, type); - var guild = _client.GetGuild(guildId); - var user = guild?.GetUser(userId); - var role = guild?.GetRole(roleId.Value); - if (guild is not null && user is not null && user.Roles.Contains(role)) - await user.RemoveRoleAsync(role); - } - catch (Exception ex) - { - Log.Warning(ex, "Couldn't remove role from user {UserId} in guild {GuildId}", userId, guildId); - } - } - else - { - try - { - // unmute the user, this will also remove the timer from the db - await UnmuteUser(guildId, userId, _client.CurrentUser, reason: "Timed mute expired"); - } - catch (Exception ex) - { - RemoveTimerFromDb(guildId, userId, type); // if unmute errored, just remove unmute from db - Log.Warning(ex, "Couldn't unmute user {UserId} in guild {GuildId}", userId, guildId); - } - } - }, - null, - after, - Timeout.InfiniteTimeSpan); - - //add it, or stop the old one and add this one - userUnTimers.AddOrUpdate((userId, type), - _ => toAdd, - (_, old) => - { - old.Change(Timeout.Infinite, Timeout.Infinite); - return toAdd; - }); - } - - public void StopTimer(ulong guildId, ulong userId, TimerType type) - { - if (!UnTimers.TryGetValue(guildId, out var userTimer)) - return; - - if (userTimer.TryRemove((userId, type), out var removed)) - removed.Change(Timeout.Infinite, Timeout.Infinite); - } - - private void RemoveTimerFromDb(ulong guildId, ulong userId, TimerType type) - { - using var uow = _db.GetDbContext(); - object toDelete; - if (type == TimerType.Mute) - { - var config = uow.GuildConfigsForId(guildId, set => set.Include(x => x.UnmuteTimers)); - toDelete = config.UnmuteTimers.FirstOrDefault(x => x.UserId == userId); - } - else - { - var config = uow.GuildConfigsForId(guildId, set => set.Include(x => x.UnbanTimer)); - toDelete = config.UnbanTimer.FirstOrDefault(x => x.UserId == userId); - } - - if (toDelete is not null) - uow.Remove(toDelete); - uow.SaveChanges(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/PermOverrides/DiscordPermOverrideCommands.cs b/src/EllieBot/Modules/Administration/PermOverrides/DiscordPermOverrideCommands.cs deleted file mode 100644 index cc43b31..0000000 --- a/src/EllieBot/Modules/Administration/PermOverrides/DiscordPermOverrideCommands.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class DiscordPermOverrideCommands : EllieModule - { - // override stats, it should require that the user has managessages guild permission - // .po 'stats' add user guild managemessages - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task DiscordPermOverride(CommandOrExprInfo cmd, params GuildPerm[] perms) - { - if (perms is null || perms.Length == 0) - { - await _service.RemoveOverride(ctx.Guild.Id, cmd.Name); - await Response().Confirm(strs.perm_override_reset).SendAsync(); - return; - } - - var aggregatePerms = perms.Aggregate((acc, seed) => seed | acc); - await _service.AddOverride(ctx.Guild.Id, cmd.Name, aggregatePerms); - - await Response() - .Confirm(strs.perm_override(Format.Bold(aggregatePerms.ToString()), - Format.Code(cmd.Name))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task DiscordPermOverrideReset() - { - var result = await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithOkColor() - .WithDescription(GetText(strs.perm_override_all_confirm))); - - if (!result) - return; - - await _service.ClearAllOverrides(ctx.Guild.Id); - - await Response().Confirm(strs.perm_override_all).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task DiscordPermOverrideList(int page = 1) - { - if (--page < 0) - return; - - var allOverrides = await _service.GetAllOverrides(ctx.Guild.Id); - - await Response() - .Paginated() - .Items(allOverrides) - .PageSize(9) - .CurrentPage(page) - .Page((items, _) => - { - var eb = _sender.CreateEmbed().WithTitle(GetText(strs.perm_overrides)).WithOkColor(); - - if (items.Count == 0) - eb.WithDescription(GetText(strs.perm_override_page_none)); - else - { - eb.WithDescription(items.Select(ov => $"{ov.Command} => {ov.Perm.ToString()}") - .Join("\n")); - } - - return eb; - }) - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs deleted file mode 100644 index cb0384f..0000000 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs +++ /dev/null @@ -1,67 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class PlayingRotateCommands : EllieModule - { - [Cmd] - [OwnerOnly] - public async Task RotatePlaying() - { - if (_service.ToggleRotatePlaying()) - await Response().Confirm(strs.ropl_enabled).SendAsync(); - else - await Response().Confirm(strs.ropl_disabled).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public Task AddPlaying([Leftover] string status) - => AddPlaying(ActivityType.CustomStatus, status); - - [Cmd] - [OwnerOnly] - public async Task AddPlaying(ActivityType statusType, [Leftover] string status) - { - await _service.AddPlaying(statusType, status); - - await Response().Confirm(strs.ropl_added).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task ListPlaying() - { - var statuses = _service.GetRotatingStatuses(); - - if (!statuses.Any()) - await Response().Error(strs.ropl_not_set).SendAsync(); - else - { - var i = 1; - await Response() - .Confirm(strs.ropl_list(string.Join("\n\t", - statuses.Select(rs => $"`{i++}.` *{rs.Type}* {rs.Status}")))) - .SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task RemovePlaying(int index) - { - index -= 1; - - var msg = await _service.RemovePlayingAsync(index); - - if (msg is null) - return; - - await Response().Confirm(strs.reprm(msg)).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs deleted file mode 100644 index 0c9afff..0000000 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs +++ /dev/null @@ -1,109 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class PlayingRotateService : IEService, IReadyExecutor -{ - private readonly BotConfigService _bss; - private readonly SelfService _selfService; - private readonly IReplacementService _repService; - // private readonly Replacer _rep; - private readonly DbService _db; - private readonly DiscordSocketClient _client; - - public PlayingRotateService( - DiscordSocketClient client, - DbService db, - BotConfigService bss, - IEnumerable phProviders, - SelfService selfService, - IReplacementService repService) - { - _db = db; - _bss = bss; - _selfService = selfService; - _repService = repService; - _client = client; - - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - using var timer = new PeriodicTimer(TimeSpan.FromMinutes(1)); - var index = 0; - while (await timer.WaitForNextTickAsync()) - { - try - { - if (!_bss.Data.RotateStatuses) - continue; - - IReadOnlyList rotatingStatuses; - await using (var uow = _db.GetDbContext()) - { - rotatingStatuses = uow.Set().AsNoTracking().OrderBy(x => x.Id).ToList(); - } - - if (rotatingStatuses.Count == 0) - continue; - - var playingStatus = index >= rotatingStatuses.Count - ? rotatingStatuses[index = 0] - : rotatingStatuses[index++]; - - var statusText = await _repService.ReplaceAsync(playingStatus.Status, new (client: _client)); - await _selfService.SetActivityAsync(statusText, (ActivityType)playingStatus.Type); - } - catch (Exception ex) - { - Log.Warning(ex, "Rotating playing status errored: {ErrorMessage}", ex.Message); - } - } - } - - public async Task RemovePlayingAsync(int index) - { - ArgumentOutOfRangeException.ThrowIfNegative(index); - - await using var uow = _db.GetDbContext(); - var toRemove = await uow.Set().AsQueryable().AsNoTracking().Skip(index).FirstOrDefaultAsync(); - - if (toRemove is null) - return null; - - uow.Remove(toRemove); - await uow.SaveChangesAsync(); - return toRemove.Status; - } - - public async Task AddPlaying(ActivityType activityType, string status) - { - await using var uow = _db.GetDbContext(); - var toAdd = new RotatingPlayingStatus - { - Status = status, - Type = (EllieBot.Db.DbActivityType)activityType - }; - uow.Add(toAdd); - await uow.SaveChangesAsync(); - } - - public bool ToggleRotatePlaying() - { - var enabled = false; - _bss.ModifyConfig(bs => { enabled = bs.RotateStatuses = !bs.RotateStatuses; }); - return enabled; - } - - public IReadOnlyList GetRotatingStatuses() - { - using var uow = _db.GetDbContext(); - return uow.Set().AsNoTracking().ToList(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Prefix/PrefixCommands.cs b/src/EllieBot/Modules/Administration/Prefix/PrefixCommands.cs deleted file mode 100644 index 3b8ea72..0000000 --- a/src/EllieBot/Modules/Administration/Prefix/PrefixCommands.cs +++ /dev/null @@ -1,57 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class PrefixCommands : EllieModule - { - public enum Set - { - Set - } - - [Cmd] - [Priority(1)] - public async Task Prefix() - => await Response().Confirm(strs.prefix_current(Format.Code(_cmdHandler.GetPrefix(ctx.Guild)))).SendAsync(); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(0)] - public Task Prefix(Set _, [Leftover] string newPrefix) - => Prefix(newPrefix); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(0)] - public async Task Prefix([Leftover] string toSet) - { - if (string.IsNullOrWhiteSpace(prefix)) - return; - - var oldPrefix = prefix; - var newPrefix = _cmdHandler.SetPrefix(ctx.Guild, toSet); - - await Response().Confirm(strs.prefix_new(Format.Code(oldPrefix), Format.Code(newPrefix))).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task DefPrefix([Leftover] string toSet = null) - { - if (string.IsNullOrWhiteSpace(toSet)) - { - await Response().Confirm(strs.defprefix_current(_cmdHandler.GetPrefix())).SendAsync(); - return; - } - - var oldPrefix = _cmdHandler.GetPrefix(); - var newPrefix = _cmdHandler.SetDefaultPrefix(toSet); - - await Response().Confirm(strs.defprefix_new(Format.Code(oldPrefix), Format.Code(newPrefix))).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionCommands.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionCommands.cs deleted file mode 100644 index 64648b8..0000000 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionCommands.cs +++ /dev/null @@ -1,292 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Administration.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class ProtectionCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task AntiAlt() - { - if (await _service.TryStopAntiAlt(ctx.Guild.Id)) - { - await Response().Confirm(strs.prot_disable("Anti-Alt")).SendAsync(); - return; - } - - await Response().Confirm(strs.protection_not_running("Anti-Alt")).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task AntiAlt( - StoopidTime minAge, - PunishmentAction action, - [Leftover] StoopidTime punishTime = null) - { - var minAgeMinutes = (int)minAge.Time.TotalMinutes; - var punishTimeMinutes = (int?)punishTime?.Time.TotalMinutes ?? 0; - - if (minAgeMinutes < 1 || punishTimeMinutes < 0) - return; - - var minutes = (int?)punishTime?.Time.TotalMinutes ?? 0; - if (action is PunishmentAction.TimeOut && minutes < 1) - minutes = 1; - - await _service.StartAntiAltAsync(ctx.Guild.Id, - minAgeMinutes, - action, - minutes); - - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task AntiAlt(StoopidTime minAge, PunishmentAction action, [Leftover] IRole role) - { - var minAgeMinutes = (int)minAge.Time.TotalMinutes; - - if (minAgeMinutes < 1) - return; - - if (action == PunishmentAction.TimeOut) - return; - - await _service.StartAntiAltAsync(ctx.Guild.Id, minAgeMinutes, action, roleId: role.Id); - - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public Task AntiRaid() - { - if (_service.TryStopAntiRaid(ctx.Guild.Id)) - return Response().Confirm(strs.prot_disable("Anti-Raid")).SendAsync(); - return Response().Pending(strs.protection_not_running("Anti-Raid")).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(1)] - public Task AntiRaid( - int userThreshold, - int seconds, - PunishmentAction action, - [Leftover] StoopidTime punishTime) - => InternalAntiRaid(userThreshold, seconds, action, punishTime); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(2)] - public Task AntiRaid(int userThreshold, int seconds, PunishmentAction action) - => InternalAntiRaid(userThreshold, seconds, action); - - private async Task InternalAntiRaid( - int userThreshold, - int seconds = 10, - PunishmentAction action = PunishmentAction.Mute, - StoopidTime punishTime = null) - { - if (action == PunishmentAction.AddRole) - { - await Response().Error(strs.punishment_unsupported(action)).SendAsync(); - return; - } - - if (userThreshold is < 2 or > 30) - { - await Response().Error(strs.raid_cnt(2, 30)).SendAsync(); - return; - } - - if (seconds is < 2 or > 300) - { - await Response().Error(strs.raid_time(2, 300)).SendAsync(); - return; - } - - if (punishTime is not null) - { - if (!_service.IsDurationAllowed(action)) - await Response().Error(strs.prot_cant_use_time).SendAsync(); - } - - var time = (int?)punishTime?.Time.TotalMinutes ?? 0; - if (time is < 0 or > 60 * 24) - return; - - if (action is PunishmentAction.TimeOut && time < 1) - return; - - var stats = await _service.StartAntiRaidAsync(ctx.Guild.Id, userThreshold, seconds, action, time); - - if (stats is null) - return; - - await Response() - .Confirm(GetText(strs.prot_enable("Anti-Raid")), - $"{ctx.User.Mention} {GetAntiRaidString(stats)}") - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public Task AntiSpam() - { - if (_service.TryStopAntiSpam(ctx.Guild.Id)) - return Response().Confirm(strs.prot_disable("Anti-Spam")).SendAsync(); - return Response().Pending(strs.protection_not_running("Anti-Spam")).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(0)] - public Task AntiSpam(int messageCount, PunishmentAction action, [Leftover] IRole role) - { - if (action != PunishmentAction.AddRole) - return Task.CompletedTask; - - return InternalAntiSpam(messageCount, action, null, role); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(1)] - public Task AntiSpam(int messageCount, PunishmentAction action, [Leftover] StoopidTime punishTime) - => InternalAntiSpam(messageCount, action, punishTime); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(2)] - public Task AntiSpam(int messageCount, PunishmentAction action) - => InternalAntiSpam(messageCount, action); - - private async Task InternalAntiSpam( - int messageCount, - PunishmentAction action, - StoopidTime timeData = null, - IRole role = null) - { - if (messageCount is < 2 or > 10) - return; - - if (timeData is not null) - { - if (!_service.IsDurationAllowed(action)) - await Response().Error(strs.prot_cant_use_time).SendAsync(); - } - - var time = (int?)timeData?.Time.TotalMinutes ?? 0; - if (time is < 0 or > 60 * 24) - return; - - if (action is PunishmentAction.TimeOut && time < 1) - return; - - var stats = await _service.StartAntiSpamAsync(ctx.Guild.Id, messageCount, action, time, role?.Id); - - await Response() - .Confirm(GetText(strs.prot_enable("Anti-Spam")), - $"{ctx.User.Mention} {GetAntiSpamString(stats)}") - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task AntispamIgnore() - { - var added = await _service.AntiSpamIgnoreAsync(ctx.Guild.Id, ctx.Channel.Id); - - if (added is null) - { - await Response().Error(strs.protection_not_running("Anti-Spam")).SendAsync(); - return; - } - - if (added.Value) - await Response().Confirm(strs.spam_ignore("Anti-Spam")).SendAsync(); - else - await Response().Confirm(strs.spam_not_ignore("Anti-Spam")).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AntiList() - { - var (spam, raid, alt) = _service.GetAntiStats(ctx.Guild.Id); - - if (spam is null && raid is null && alt is null) - { - await Response().Confirm(strs.prot_none).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.prot_active)); - - if (spam is not null) - embed.AddField("Anti-Spam", GetAntiSpamString(spam).TrimTo(1024), true); - - if (raid is not null) - embed.AddField("Anti-Raid", GetAntiRaidString(raid).TrimTo(1024), true); - - if (alt is not null) - embed.AddField("Anti-Alt", GetAntiAltString(alt), true); - - await Response().Embed(embed).SendAsync(); - } - - private string GetAntiAltString(AntiAltStats alt) - => GetText(strs.anti_alt_status(Format.Bold(alt.MinAge.ToString(@"dd\d\ hh\h\ mm\m\ ")), - Format.Bold(alt.Action.ToString()), - Format.Bold(alt.Counter.ToString()))); - - private string GetAntiSpamString(AntiSpamStats stats) - { - var settings = stats.AntiSpamSettings; - var ignoredString = string.Join(", ", settings.IgnoredChannels.Select(c => $"<#{c.ChannelId}>")); - - if (string.IsNullOrWhiteSpace(ignoredString)) - ignoredString = "none"; - - var add = string.Empty; - if (settings.MuteTime > 0) - add = $" ({TimeSpan.FromMinutes(settings.MuteTime):hh\\hmm\\m})"; - - return GetText(strs.spam_stats(Format.Bold(settings.MessageThreshold.ToString()), - Format.Bold(settings.Action + add), - ignoredString)); - } - - private string GetAntiRaidString(AntiRaidStats stats) - { - var actionString = Format.Bold(stats.AntiRaidSettings.Action.ToString()); - - if (stats.AntiRaidSettings.PunishDuration > 0) - actionString += $" **({TimeSpan.FromMinutes(stats.AntiRaidSettings.PunishDuration):hh\\hmm\\m})**"; - - return GetText(strs.raid_stats(Format.Bold(stats.AntiRaidSettings.UserThreshold.ToString()), - Format.Bold(stats.AntiRaidSettings.Seconds.ToString()), - actionString)); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs deleted file mode 100644 index c72a941..0000000 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs +++ /dev/null @@ -1,498 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; -using System.Threading.Channels; - -namespace EllieBot.Modules.Administration.Services; - -public class ProtectionService : IEService -{ - public event Func OnAntiProtectionTriggered = delegate - { - return Task.CompletedTask; - }; - - private readonly ConcurrentDictionary _antiRaidGuilds = new(); - - private readonly ConcurrentDictionary _antiSpamGuilds = new(); - - private readonly ConcurrentDictionary _antiAltGuilds = new(); - - private readonly DiscordSocketClient _client; - private readonly MuteService _mute; - private readonly DbService _db; - private readonly UserPunishService _punishService; - - private readonly Channel _punishUserQueue = - Channel.CreateUnbounded(new() - { - SingleReader = true, - SingleWriter = false - }); - - public ProtectionService( - DiscordSocketClient client, - IBot bot, - MuteService mute, - DbService db, - UserPunishService punishService) - { - _client = client; - _mute = mute; - _db = db; - _punishService = punishService; - - var ids = client.GetGuildIds(); - using (var uow = db.GetDbContext()) - { - var configs = uow.Set() - .AsQueryable() - .Include(x => x.AntiRaidSetting) - .Include(x => x.AntiSpamSetting) - .ThenInclude(x => x.IgnoredChannels) - .Include(x => x.AntiAltSetting) - .Where(x => ids.Contains(x.GuildId)) - .ToList(); - - foreach (var gc in configs) - Initialize(gc); - } - - _client.MessageReceived += HandleAntiSpam; - _client.UserJoined += HandleUserJoined; - - bot.JoinedGuild += _bot_JoinedGuild; - _client.LeftGuild += _client_LeftGuild; - - _ = Task.Run(RunQueue); - } - - private async Task RunQueue() - { - while (true) - { - var item = await _punishUserQueue.Reader.ReadAsync(); - - var muteTime = item.MuteTime; - var gu = item.User; - try - { - await _punishService.ApplyPunishment(gu.Guild, - gu, - _client.CurrentUser, - item.Action, - muteTime, - item.RoleId, - $"{item.Type} Protection"); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in punish queue: {Message}", ex.Message); - } - finally - { - await Task.Delay(1000); - } - } - } - - private Task _client_LeftGuild(SocketGuild guild) - { - _ = Task.Run(async () => - { - TryStopAntiRaid(guild.Id); - TryStopAntiSpam(guild.Id); - await TryStopAntiAlt(guild.Id); - }); - return Task.CompletedTask; - } - - private Task _bot_JoinedGuild(GuildConfig gc) - { - using var uow = _db.GetDbContext(); - var gcWithData = uow.GuildConfigsForId(gc.GuildId, - set => set.Include(x => x.AntiRaidSetting) - .Include(x => x.AntiAltSetting) - .Include(x => x.AntiSpamSetting) - .ThenInclude(x => x.IgnoredChannels)); - - Initialize(gcWithData); - return Task.CompletedTask; - } - - private void Initialize(GuildConfig gc) - { - var raid = gc.AntiRaidSetting; - var spam = gc.AntiSpamSetting; - - if (raid is not null) - { - var raidStats = new AntiRaidStats - { - AntiRaidSettings = raid - }; - _antiRaidGuilds[gc.GuildId] = raidStats; - } - - if (spam is not null) - { - _antiSpamGuilds[gc.GuildId] = new() - { - AntiSpamSettings = spam - }; - } - - var alt = gc.AntiAltSetting; - if (alt is not null) - _antiAltGuilds[gc.GuildId] = new(alt); - } - - private Task HandleUserJoined(SocketGuildUser user) - { - if (user.IsBot) - return Task.CompletedTask; - - _antiRaidGuilds.TryGetValue(user.Guild.Id, out var maybeStats); - _antiAltGuilds.TryGetValue(user.Guild.Id, out var maybeAlts); - - if (maybeStats is null && maybeAlts is null) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - if (maybeAlts is { } alts) - { - if (user.CreatedAt != default) - { - var diff = DateTime.UtcNow - user.CreatedAt.UtcDateTime; - if (diff < alts.MinAge) - { - alts.Increment(); - - await PunishUsers(alts.Action, - ProtectionType.Alting, - alts.ActionDurationMinutes, - alts.RoleId, - user); - - return; - } - } - } - - try - { - if (maybeStats is not { } stats || !stats.RaidUsers.Add(user)) - return; - - ++stats.UsersCount; - - if (stats.UsersCount >= stats.AntiRaidSettings.UserThreshold) - { - var users = stats.RaidUsers.ToArray(); - stats.RaidUsers.Clear(); - var settings = stats.AntiRaidSettings; - - await PunishUsers(settings.Action, ProtectionType.Raiding, settings.PunishDuration, null, users); - } - - await Task.Delay(1000 * stats.AntiRaidSettings.Seconds); - - stats.RaidUsers.TryRemove(user); - --stats.UsersCount; - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task HandleAntiSpam(SocketMessage arg) - { - if (arg is not SocketUserMessage msg || msg.Author.IsBot) - return Task.CompletedTask; - - if (msg.Channel is not ITextChannel channel) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - try - { - if (!_antiSpamGuilds.TryGetValue(channel.Guild.Id, out var spamSettings) - || spamSettings.AntiSpamSettings.IgnoredChannels.Contains(new() - { - ChannelId = channel.Id - })) - return; - - var stats = spamSettings.UserStats.AddOrUpdate(msg.Author.Id, - _ => new(msg), - (_, old) => - { - old.ApplyNextMessage(msg); - return old; - }); - - if (stats.Count >= spamSettings.AntiSpamSettings.MessageThreshold) - { - if (spamSettings.UserStats.TryRemove(msg.Author.Id, out stats)) - { - var settings = spamSettings.AntiSpamSettings; - await PunishUsers(settings.Action, - ProtectionType.Spamming, - settings.MuteTime, - settings.RoleId, - (IGuildUser)msg.Author); - } - } - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private async Task PunishUsers( - PunishmentAction action, - ProtectionType pt, - int muteTime, - ulong? roleId, - params IGuildUser[] gus) - { - Log.Information("[{PunishType}] - Punishing [{Count}] users with [{PunishAction}] in {GuildName} guild", - pt, - gus.Length, - action, - gus[0].Guild.Name); - - foreach (var gu in gus) - { - await _punishUserQueue.Writer.WriteAsync(new() - { - Action = action, - Type = pt, - User = gu, - MuteTime = muteTime, - RoleId = roleId - }); - } - - _ = OnAntiProtectionTriggered(action, pt, gus); - } - - public async Task StartAntiRaidAsync( - ulong guildId, - int userThreshold, - int seconds, - PunishmentAction action, - int minutesDuration) - { - var g = _client.GetGuild(guildId); - await _mute.GetMuteRole(g); - - if (action == PunishmentAction.AddRole) - return null; - - if (!IsDurationAllowed(action)) - minutesDuration = 0; - - var stats = new AntiRaidStats - { - AntiRaidSettings = new() - { - Action = action, - Seconds = seconds, - UserThreshold = userThreshold, - PunishDuration = minutesDuration - } - }; - - _antiRaidGuilds.AddOrUpdate(guildId, stats, (_, _) => stats); - - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.AntiRaidSetting)); - - gc.AntiRaidSetting = stats.AntiRaidSettings; - await uow.SaveChangesAsync(); - - return stats; - } - - public bool TryStopAntiRaid(ulong guildId) - { - if (_antiRaidGuilds.TryRemove(guildId, out _)) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.AntiRaidSetting)); - - gc.AntiRaidSetting = null; - uow.SaveChanges(); - return true; - } - - return false; - } - - public bool TryStopAntiSpam(ulong guildId) - { - if (_antiSpamGuilds.TryRemove(guildId, out _)) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, - set => set.Include(x => x.AntiSpamSetting).ThenInclude(x => x.IgnoredChannels)); - - gc.AntiSpamSetting = null; - uow.SaveChanges(); - return true; - } - - return false; - } - - public async Task StartAntiSpamAsync( - ulong guildId, - int messageCount, - PunishmentAction action, - int punishDurationMinutes, - ulong? roleId) - { - var g = _client.GetGuild(guildId); - await _mute.GetMuteRole(g); - - if (!IsDurationAllowed(action)) - punishDurationMinutes = 0; - - var stats = new AntiSpamStats - { - AntiSpamSettings = new() - { - Action = action, - MessageThreshold = messageCount, - MuteTime = punishDurationMinutes, - RoleId = roleId - } - }; - - stats = _antiSpamGuilds.AddOrUpdate(guildId, - stats, - (_, old) => - { - stats.AntiSpamSettings.IgnoredChannels = old.AntiSpamSettings.IgnoredChannels; - return stats; - }); - - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.AntiSpamSetting)); - - if (gc.AntiSpamSetting is not null) - { - gc.AntiSpamSetting.Action = stats.AntiSpamSettings.Action; - gc.AntiSpamSetting.MessageThreshold = stats.AntiSpamSettings.MessageThreshold; - gc.AntiSpamSetting.MuteTime = stats.AntiSpamSettings.MuteTime; - gc.AntiSpamSetting.RoleId = stats.AntiSpamSettings.RoleId; - } - else - gc.AntiSpamSetting = stats.AntiSpamSettings; - - await uow.SaveChangesAsync(); - return stats; - } - - public async Task AntiSpamIgnoreAsync(ulong guildId, ulong channelId) - { - var obj = new AntiSpamIgnore - { - ChannelId = channelId - }; - bool added; - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, - set => set.Include(x => x.AntiSpamSetting).ThenInclude(x => x.IgnoredChannels)); - var spam = gc.AntiSpamSetting; - if (spam is null) - return null; - - if (spam.IgnoredChannels.Add(obj)) // if adding to db is successful - { - if (_antiSpamGuilds.TryGetValue(guildId, out var temp)) - temp.AntiSpamSettings.IgnoredChannels.Add(obj); // add to local cache - - added = true; - } - else - { - var toRemove = spam.IgnoredChannels.First(x => x.ChannelId == channelId); - uow.Set().Remove(toRemove); // remove from db - if (_antiSpamGuilds.TryGetValue(guildId, out var temp)) - temp.AntiSpamSettings.IgnoredChannels.Remove(toRemove); // remove from local cache - - added = false; - } - - await uow.SaveChangesAsync(); - return added; - } - - public (AntiSpamStats, AntiRaidStats, AntiAltStats) GetAntiStats(ulong guildId) - { - _antiRaidGuilds.TryGetValue(guildId, out var antiRaidStats); - _antiSpamGuilds.TryGetValue(guildId, out var antiSpamStats); - _antiAltGuilds.TryGetValue(guildId, out var antiAltStats); - - return (antiSpamStats, antiRaidStats, antiAltStats); - } - - public bool IsDurationAllowed(PunishmentAction action) - { - switch (action) - { - case PunishmentAction.Ban: - case PunishmentAction.Mute: - case PunishmentAction.ChatMute: - case PunishmentAction.VoiceMute: - case PunishmentAction.AddRole: - case PunishmentAction.TimeOut: - return true; - default: - return false; - } - } - - public async Task StartAntiAltAsync( - ulong guildId, - int minAgeMinutes, - PunishmentAction action, - int actionDurationMinutes = 0, - ulong? roleId = null) - { - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.AntiAltSetting)); - gc.AntiAltSetting = new() - { - Action = action, - ActionDurationMinutes = actionDurationMinutes, - MinAge = TimeSpan.FromMinutes(minAgeMinutes), - RoleId = roleId - }; - - await uow.SaveChangesAsync(); - _antiAltGuilds[guildId] = new(gc.AntiAltSetting); - } - - public async Task TryStopAntiAlt(ulong guildId) - { - if (!_antiAltGuilds.TryRemove(guildId, out _)) - return false; - - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.AntiAltSetting)); - gc.AntiAltSetting = null; - await uow.SaveChangesAsync(); - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionStats.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionStats.cs deleted file mode 100644 index f45db4e..0000000 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionStats.cs +++ /dev/null @@ -1,52 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public enum ProtectionType -{ - Raiding, - Spamming, - Alting -} - -public class AntiRaidStats -{ - public AntiRaidSetting AntiRaidSettings { get; set; } - public int UsersCount { get; set; } - public ConcurrentHashSet RaidUsers { get; set; } = new(); -} - -public class AntiSpamStats -{ - public AntiSpamSetting AntiSpamSettings { get; set; } - public ConcurrentDictionary UserStats { get; set; } = new(); -} - -public class AntiAltStats -{ - public PunishmentAction Action - => _setting.Action; - - public int ActionDurationMinutes - => _setting.ActionDurationMinutes; - - public ulong? RoleId - => _setting.RoleId; - - public TimeSpan MinAge - => _setting.MinAge; - - public int Counter - => counter; - - private readonly AntiAltSetting _setting; - - private int counter; - - public AntiAltStats(AntiAltSetting setting) - => _setting = setting; - - public void Increment() - => Interlocked.Increment(ref counter); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Protection/PunishQueueItem.cs b/src/EllieBot/Modules/Administration/Protection/PunishQueueItem.cs deleted file mode 100644 index 9cff02e..0000000 --- a/src/EllieBot/Modules/Administration/Protection/PunishQueueItem.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public class PunishQueueItem -{ - public PunishmentAction Action { get; set; } - public ProtectionType Type { get; set; } - public int MuteTime { get; set; } - public ulong? RoleId { get; set; } - public IGuildUser User { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Protection/UserSpamStats.cs b/src/EllieBot/Modules/Administration/Protection/UserSpamStats.cs deleted file mode 100644 index ad4a9bf..0000000 --- a/src/EllieBot/Modules/Administration/Protection/UserSpamStats.cs +++ /dev/null @@ -1,64 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Administration; - -public sealed class UserSpamStats -{ - public int Count - { - get - { - lock (_applyLock) - { - Cleanup(); - return _messageTracker.Count; - } - } - } - - private string lastMessage; - - private readonly Queue _messageTracker; - - private readonly object _applyLock = new(); - - private readonly TimeSpan _maxTime = TimeSpan.FromMinutes(30); - - public UserSpamStats(IUserMessage msg) - { - lastMessage = msg.Content.ToUpperInvariant(); - _messageTracker = new(); - - ApplyNextMessage(msg); - } - - public void ApplyNextMessage(IUserMessage message) - { - var upperMsg = message.Content.ToUpperInvariant(); - - lock (_applyLock) - { - if (upperMsg != lastMessage || (string.IsNullOrWhiteSpace(upperMsg) && message.Attachments.Any())) - { - // if it's a new message, reset spam counter - lastMessage = upperMsg; - _messageTracker.Clear(); - } - - _messageTracker.Enqueue(DateTime.UtcNow); - } - } - - private void Cleanup() - { - lock (_applyLock) - { - while (_messageTracker.TryPeek(out var dateTime)) - { - if (DateTime.UtcNow - dateTime < _maxTime) - break; - - _messageTracker.Dequeue(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs b/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs deleted file mode 100644 index 5ebafab..0000000 --- a/src/EllieBot/Modules/Administration/Prune/PruneCommands.cs +++ /dev/null @@ -1,227 +0,0 @@ -#nullable disable -using CommandLine; -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class PruneCommands : EllieModule - { - private static readonly TimeSpan _twoWeeks = TimeSpan.FromDays(14); - - public sealed class PruneOptions : IEllieCommandOptions - { - [Option(shortName: 's', - longName: "safe", - Default = false, - HelpText = "Whether pinned messages should be deleted.", - Required = false)] - public bool Safe { get; set; } - - [Option(shortName: 'a', - longName: "after", - Default = null, - HelpText = "Prune only messages after the specified message ID.", - Required = false)] - public ulong? After { get; set; } - - public void NormalizeOptions() - { - } - } - - //deletes her own messages, no perm required - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public async Task Prune(params string[] args) - { - var (opts, _) = OptionsParser.ParseFrom(new PruneOptions(), args); - - var user = await ctx.Guild.GetCurrentUserAsync(); - - var progressMsg = await Response().Pending(strs.prune_progress(0, 100)).SendAsync(); - var progress = GetProgressTracker(progressMsg); - - PruneResult result; - if (opts.Safe) - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - 100, - x => x.Author.Id == user.Id && !x.IsPinned, - progress, - opts.After); - else - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - 100, - x => x.Author.Id == user.Id, - progress, - opts.After); - - ctx.Message.DeleteAfter(3); - - await SendResult(result); - await progressMsg.DeleteAsync(); - } - - // prune x - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [BotPerm(ChannelPerm.ManageMessages)] - [EllieOptions] - [Priority(1)] - public async Task Prune(int count, params string[] args) - { - count++; - if (count < 1) - return; - - if (count > 1000) - count = 1000; - - var (opts, _) = OptionsParser.ParseFrom(new PruneOptions(), args); - - var progressMsg = await Response().Pending(strs.prune_progress(0, count)).SendAsync(); - var progress = GetProgressTracker(progressMsg); - - PruneResult result; - if (opts.Safe) - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - count, - x => !x.IsPinned && x.Id != progressMsg.Id, - progress, - opts.After); - else - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - count, - x => x.Id != progressMsg.Id, - progress, - opts.After); - - await SendResult(result); - await progressMsg.DeleteAsync(); - } - - private IProgress<(int, int)> GetProgressTracker(IUserMessage progressMsg) - { - var progress = new Progress<(int, int)>(async (x) => - { - var (deleted, total) = x; - try - { - await progressMsg.ModifyAsync(props => - { - props.Embed = _sender.CreateEmbed() - .WithPendingColor() - .WithDescription(GetText(strs.prune_progress(deleted, total))) - .Build(); - }); - } - catch - { - } - }); - - return progress; - } - - //prune @user [x] - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [BotPerm(ChannelPerm.ManageMessages)] - [EllieOptions] - [Priority(0)] - public Task Prune(IGuildUser user, int count = 100, params string[] args) - => Prune(user.Id, count, args); - - //prune userid [x] - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [BotPerm(ChannelPerm.ManageMessages)] - [EllieOptions] - [Priority(0)] - public async Task Prune(ulong userId, int count = 100, params string[] args) - { - if (userId == ctx.User.Id) - count++; - - if (count < 1) - return; - - if (count > 1000) - count = 1000; - - var (opts, _) = OptionsParser.ParseFrom(new PruneOptions(), args); - - var progressMsg = await Response().Pending(strs.prune_progress(0, count)).SendAsync(); - var progress = GetProgressTracker(progressMsg); - - PruneResult result; - if (opts.Safe) - { - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - count, - m => m.Author.Id == userId && DateTime.UtcNow - m.CreatedAt < _twoWeeks && !m.IsPinned, - progress, - opts.After - ); - } - else - { - result = await _service.PruneWhere((ITextChannel)ctx.Channel, - count, - m => m.Author.Id == userId && DateTime.UtcNow - m.CreatedAt < _twoWeeks, - progress, - opts.After - ); - } - - await SendResult(result); - await progressMsg.DeleteAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPerm.ManageMessages)] - [BotPerm(ChannelPerm.ManageMessages)] - public async Task PruneCancel() - { - var ok = await _service.CancelAsync(ctx.Guild.Id); - - if (!ok) - { - await Response().Error(strs.prune_not_found).SendAsync(); - return; - } - - - await Response().Confirm(strs.prune_cancelled).SendAsync(); - } - - - private async Task SendResult(PruneResult result) - { - switch (result) - { - case PruneResult.Success: - break; - case PruneResult.AlreadyRunning: - var msg = await Response().Pending(strs.prune_already_running).SendAsync(); - msg.DeleteAfter(5); - break; - case PruneResult.FeatureLimit: - var msg2 = await Response().Pending(strs.feature_limit_reached_owner).SendAsync(); - msg2.DeleteAfter(10); - break; - default: - Log.Error("Unhandled result received in prune: {Result}", result); - await Response().Error(strs.error_occured).SendAsync(); - break; - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Prune/PruneResult.cs b/src/EllieBot/Modules/Administration/Prune/PruneResult.cs deleted file mode 100644 index b6ac515..0000000 --- a/src/EllieBot/Modules/Administration/Prune/PruneResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Administration.Services; - -public enum PruneResult -{ - Success, - AlreadyRunning, - FeatureLimit, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Prune/PruneService.cs b/src/EllieBot/Modules/Administration/Prune/PruneService.cs deleted file mode 100644 index cad3d01..0000000 --- a/src/EllieBot/Modules/Administration/Prune/PruneService.cs +++ /dev/null @@ -1,114 +0,0 @@ -#nullable disable -using EllieBot.Modules.Patronage; - -namespace EllieBot.Modules.Administration.Services; - -public class PruneService : IEService -{ - //channelids where prunes are currently occuring - private readonly ConcurrentDictionary _pruningGuilds = new(); - private readonly TimeSpan _twoWeeks = TimeSpan.FromDays(14); - private readonly ILogCommandService _logService; - private readonly IPatronageService _ps; - - public PruneService(ILogCommandService logService, IPatronageService ps) - { - _logService = logService; - _ps = ps; - } - - public async Task PruneWhere( - ITextChannel channel, - int amount, - Func predicate, - IProgress<(int deleted, int total)> progress, - ulong? after = null - ) - { - ArgumentNullException.ThrowIfNull(channel, nameof(channel)); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); - - var originalAmount = amount; - - using var cancelSource = new CancellationTokenSource(); - if (!_pruningGuilds.TryAdd(channel.GuildId, cancelSource)) - return PruneResult.AlreadyRunning; - - try - { - if (!await _ps.LimitHitAsync(LimitedFeatureName.Prune, channel.Guild.OwnerId)) - { - return PruneResult.FeatureLimit; - } - - var now = DateTime.UtcNow; - IMessage[] msgs; - IMessage lastMessage = null; - - while (amount > 0 && !cancelSource.IsCancellationRequested) - { - var dled = lastMessage is null - ? await channel.GetMessagesAsync(50).FlattenAsync() - : await channel.GetMessagesAsync(lastMessage, Direction.Before, 50).FlattenAsync(); - - msgs = dled - .Where(predicate) - .Where(x => after is not ulong a || x.Id > a) - .Take(amount) - .ToArray(); - - if (!msgs.Any()) - return PruneResult.Success; - - lastMessage = msgs[^1]; - - var bulkDeletable = new List(); - var singleDeletable = new List(); - foreach (var x in msgs) - { - _logService.AddDeleteIgnore(x.Id); - - if (now - x.CreatedAt < _twoWeeks) - bulkDeletable.Add(x); - else - singleDeletable.Add(x); - } - - if (bulkDeletable.Count > 0) - { - await channel.DeleteMessagesAsync(bulkDeletable); - amount -= msgs.Length; - progress.Report((originalAmount - amount, originalAmount)); - await Task.Delay(2000, cancelSource.Token); - } - - foreach (var group in singleDeletable.Chunk(5)) - { - await group.Select(x => x.DeleteAsync()).WhenAll(); - amount -= 5; - progress.Report((originalAmount - amount, originalAmount)); - await Task.Delay(5000, cancelSource.Token); - } - } - } - catch - { - //ignore - } - finally - { - _pruningGuilds.TryRemove(channel.GuildId, out _); - } - - return PruneResult.Success; - } - - public async Task CancelAsync(ulong guildId) - { - if (!_pruningGuilds.TryRemove(guildId, out var source)) - return false; - - await source.CancelAsync(); - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs b/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs deleted file mode 100644 index 1f2911d..0000000 --- a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs +++ /dev/null @@ -1,51 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; -using OneOf; -using OneOf.Types; - -namespace EllieBot.Modules.Administration.Services; - -public interface IReactionRoleService -{ - /// - /// Adds a single reaction role - /// - /// Guild where to add a reaction role - /// Message to which to add a reaction role - /// - /// - /// - /// - /// The result of the operation - Task> AddReactionRole( - IGuild guild, - IMessage msg, - string emote, - IRole role, - int group = 0, - int levelReq = 0); - - /// - /// Get all reaction roles on the specified server - /// - /// - /// - Task> GetReactionRolesAsync(ulong guildId); - - /// - /// Remove reaction roles on the specified message - /// - /// - /// - /// - Task RemoveReactionRoles(ulong guildId, ulong messageId); - - /// - /// Remove all reaction roles in the specified server - /// - /// - /// - Task RemoveAllReactionRoles(ulong guildId); - - Task> TransferReactionRolesAsync(ulong guildId, ulong fromMessageId, ulong toMessageId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs b/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs deleted file mode 100644 index cfcad28..0000000 --- a/src/EllieBot/Modules/Administration/Role/ReactionRoleCommands.cs +++ /dev/null @@ -1,174 +0,0 @@ -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - public partial class ReactionRoleCommands : EllieModule - { - private readonly IReactionRoleService _rero; - - public ReactionRoleCommands(IReactionRoleService rero) - { - _rero = rero; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ReRoAdd( - ulong messageId, - string emoteStr, - IRole role, - int group = 0, - int levelReq = 0) - { - if (group < 0) - return; - - if (levelReq < 0) - return; - - var msg = await ctx.Channel.GetMessageAsync(messageId); - if (msg is null) - { - await Response().Error(strs.rero_message_not_found).SendAsync(); - return; - } - - if (ctx.User.Id != ctx.Guild.OwnerId - && ((IGuildUser)ctx.User).GetRoles().Max(x => x.Position) <= role.Position) - { - await Response().Error(strs.hierarchy).SendAsync(); - return; - } - - var emote = emoteStr.ToIEmote(); - await msg.AddReactionAsync(emote); - var res = await _rero.AddReactionRole(ctx.Guild, - msg, - emoteStr, - role, - group, - levelReq); - - await res.Match( - _ => ctx.OkAsync(), - async fl => - { - _ = msg.RemoveReactionAsync(emote, ctx.Client.CurrentUser); - await Response().Pending(strs.feature_limit_reached_owner).SendAsync(); - }); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ReRoList(int page = 1) - { - if (--page < 0) - return; - - var allReros = await _rero.GetReactionRolesAsync(ctx.Guild.Id); - - await Response() - .Paginated() - .Items(allReros.OrderBy(x => x.Group).ToList()) - .PageSize(10) - .CurrentPage(page) - .Page((items, _) => - { - var embed = _sender.CreateEmbed() - .WithOkColor(); - - var content = string.Empty; - foreach (var g in items - .GroupBy(x => x.MessageId) - .OrderBy(x => x.Key)) - { - var messageId = g.Key; - content += - $"[{messageId}](https://discord.com/channels/{ctx.Guild.Id}/{g.First().ChannelId}/{g.Key})\n"; - - var groupGroups = g.GroupBy(x => x.Group); - - foreach (var ggs in groupGroups) - { - content += $"`< {(g.Key == 0 ? ("Not Exclusive (Group 0)") : ($"Group {ggs.Key}"))} >`\n"; - - foreach (var rero in ggs) - { - content += - $"\t{rero.Emote} -> {(ctx.Guild.GetRole(rero.RoleId)?.Mention ?? "")}"; - if (rero.LevelReq > 0) - content += $" (lvl {rero.LevelReq}+)"; - content += '\n'; - } - } - } - - embed.WithDescription(string.IsNullOrWhiteSpace(content) - ? "There are no reaction roles on this server" - : content); - - return embed; - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ReRoRemove(ulong messageId) - { - var succ = await _rero.RemoveReactionRoles(ctx.Guild.Id, messageId); - if (succ) - await ctx.OkAsync(); - else - await ctx.ErrorAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ReRoDeleteAll() - { - await _rero.RemoveAllReactionRoles(ctx.Guild.Id); - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [Ratelimit(60)] - public async Task ReRoTransfer(ulong fromMessageId, ulong toMessageId) - { - var msg = await ctx.Channel.GetMessageAsync(toMessageId); - - if (msg is null) - { - await ctx.ErrorAsync(); - return; - } - - var reactions = await _rero.TransferReactionRolesAsync(ctx.Guild.Id, fromMessageId, toMessageId); - - if (reactions.Count == 0) - { - await ctx.ErrorAsync(); - } - else - { - foreach (var r in reactions) - { - await msg.AddReactionAsync(r); - } - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs b/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs deleted file mode 100644 index caa3e19..0000000 --- a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs +++ /dev/null @@ -1,404 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Patronage; -using EllieBot.Db.Models; -using OneOf.Types; -using OneOf; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class ReactionRolesService : IReadyExecutor, IEService, IReactionRoleService -{ - private readonly DbService _db; - private readonly DiscordSocketClient _client; - private readonly IBotCredentials _creds; - - private ConcurrentDictionary> _cache; - private readonly object _cacheLock = new(); - private readonly SemaphoreSlim _assignementLock = new(1, 1); - private readonly IPatronageService _ps; - - public ReactionRolesService( - DiscordSocketClient client, - IPatronageService ps, - DbService db, - IBotCredentials creds) - { - _db = db; - _client = client; - _creds = creds; - _ps = ps; - _cache = new(); - } - - public async Task OnReadyAsync() - { - await using var uow = _db.GetDbContext(); - var reros = await uow.GetTable() - .Where( - x => Linq2DbExpressions.GuildOnShard(x.GuildId, _creds.TotalShards, _client.ShardId)) - .ToListAsyncLinqToDB(); - - foreach (var group in reros.GroupBy(x => x.MessageId)) - { - _cache[group.Key] = group.ToList(); - } - - _client.ReactionAdded += ClientOnReactionAdded; - _client.ReactionRemoved += ClientOnReactionRemoved; - } - - private async Task<(IGuildUser, IRole)> GetUserAndRoleAsync( - ulong userId, - ReactionRoleV2 rero) - { - var guild = _client.GetGuild(rero.GuildId); - var role = guild?.GetRole(rero.RoleId); - - if (role is null) - return default; - - var user = guild.GetUser(userId) as IGuildUser - ?? await _client.Rest.GetGuildUserAsync(guild.Id, userId); - - if (user is null) - return default; - - return (user, role); - } - - private Task ClientOnReactionRemoved( - Cacheable cmsg, - Cacheable ch, - SocketReaction r) - { - if (!_cache.TryGetValue(cmsg.Id, out var reros)) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - var emote = await GetFixedEmoteAsync(cmsg, r.Emote); - - var rero = reros.FirstOrDefault(x => x.Emote == emote.Name - || x.Emote == emote.ToString()); - if (rero is null) - return; - - var (user, role) = await GetUserAndRoleAsync(r.UserId, rero); - - if (user.IsBot) - return; - - await _assignementLock.WaitAsync(); - try - { - if (user.RoleIds.Contains(role.Id)) - { - await user.RemoveRoleAsync(role.Id, new RequestOptions() - { - AuditLogReason = $"Reaction role" - }); - } - } - finally - { - _assignementLock.Release(); - } - }); - - return Task.CompletedTask; - } - - - // had to add this because for some reason, reactionremoved event's reaction doesn't have IsAnimated set, - // causing the .ToString() to be wrong on animated custom emotes - private async Task GetFixedEmoteAsync( - Cacheable cmsg, - IEmote inputEmote) - { - // this should only run for emote - if (inputEmote is not Emote e) - return inputEmote; - - // try to get the message and pull - var msg = await cmsg.GetOrDownloadAsync(); - - var emote = msg.Reactions.Keys.FirstOrDefault(x => e.Equals(x)); - return emote ?? inputEmote; - } - - private Task ClientOnReactionAdded( - Cacheable msg, - Cacheable ch, - SocketReaction r) - { - if (!_cache.TryGetValue(msg.Id, out var reros)) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - var rero = reros.FirstOrDefault(x => x.Emote == r.Emote.Name || x.Emote == r.Emote.ToString()); - if (rero is null) - return; - - var (user, role) = await GetUserAndRoleAsync(r.UserId, rero); - - if (user.IsBot) - return; - - await _assignementLock.WaitAsync(); - try - { - if (!user.RoleIds.Contains(role.Id)) - { - // first check if there is a level requirement - // and if there is, make sure user satisfies it - if (rero.LevelReq > 0) - { - await using var ctx = _db.GetDbContext(); - var levelData = await ctx.GetTable() - .GetLevelDataFor(user.GuildId, user.Id); - - if (levelData.Level < rero.LevelReq) - return; - } - - // remove all other roles from the same group from the user - // execept in group 0, which is a special, non-exclusive group - if (rero.Group != 0) - { - var exclusive = reros - .Where(x => x.Group == rero.Group && x.RoleId != role.Id) - .Select(x => x.RoleId) - .Distinct() - .ToArray(); - - - if (exclusive.Any()) - { - try - { - await user.RemoveRolesAsync(exclusive, - new RequestOptions() - { - AuditLogReason = "Reaction role exclusive group" - }); - } - catch { } - } - - // remove user's previous reaction - try - { - var m = await msg.GetOrDownloadAsync(); - if (m is not null) - { - var reactToRemove = m.Reactions - .FirstOrDefault(x => x.Key.ToString() != r.Emote.ToString()) - .Key; - - if (reactToRemove is not null) - { - await m.RemoveReactionAsync(reactToRemove, user); - } - } - } - catch - { - } - } - - await user.AddRoleAsync(role.Id, new() - { - AuditLogReason = "Reaction role" - }); - } - } - finally - { - _assignementLock.Release(); - } - }); - - return Task.CompletedTask; - } - - /// - /// Adds a single reaction role - /// - /// Guild where to add a reaction role - /// Message to which to add a reaction role - /// - /// - /// - /// - /// The result of the operation - public async Task> AddReactionRole( - IGuild guild, - IMessage msg, - string emote, - IRole role, - int group = 0, - int levelReq = 0) - { - ArgumentOutOfRangeException.ThrowIfNegative(group); - - ArgumentOutOfRangeException.ThrowIfNegative(levelReq); - - await using var ctx = _db.GetDbContext(); - - await using var tran = await ctx.Database.BeginTransactionAsync(); - var activeReactionRoles = await ctx.GetTable() - .Where(x => x.GuildId == guild.Id) - .CountAsync(); - - var limit = await _ps.GetUserLimit(LimitedFeatureName.ReactionRole, guild.OwnerId); - - if (!_creds.IsOwner(guild.OwnerId) && (activeReactionRoles >= limit.Quota && limit.Quota >= 0)) - { - return new Error(); - } - - await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guild.Id, - ChannelId = msg.Channel.Id, - - MessageId = msg.Id, - Emote = emote, - - RoleId = role.Id, - Group = group, - LevelReq = levelReq - }, - (old) => new() - { - RoleId = role.Id, - Group = group, - LevelReq = levelReq - }, - () => new() - { - MessageId = msg.Id, - Emote = emote, - }); - - await tran.CommitAsync(); - - var obj = new ReactionRoleV2() - { - GuildId = guild.Id, - MessageId = msg.Id, - Emote = emote, - RoleId = role.Id, - Group = group, - LevelReq = levelReq - }; - - lock (_cacheLock) - { - _cache.AddOrUpdate(msg.Id, - _ => [obj], - (_, list) => - { - list.RemoveAll(x => x.Emote == emote); - list.Add(obj); - return list; - }); - } - - return new Success(); - } - - /// - /// Get all reaction roles on the specified server - /// - /// - /// - public async Task> GetReactionRolesAsync(ulong guildId) - { - await using var ctx = _db.GetDbContext(); - return await ctx.GetTable() - .Where(x => x.GuildId == guildId) - .ToListAsync(); - } - - /// - /// Remove reaction roles on the specified message - /// - /// - /// - /// - public async Task RemoveReactionRoles(ulong guildId, ulong messageId) - { - // guildid is used for quick index lookup - await using var ctx = _db.GetDbContext(); - var changed = await ctx.GetTable() - .Where(x => x.GuildId == guildId && x.MessageId == messageId) - .DeleteAsync(); - - _cache.TryRemove(messageId, out _); - - if (changed == 0) - return false; - - return true; - } - - /// - /// Remove all reaction roles in the specified server - /// - /// - /// - public async Task RemoveAllReactionRoles(ulong guildId) - { - await using var ctx = _db.GetDbContext(); - var output = await ctx.GetTable() - .Where(x => x.GuildId == guildId) - .DeleteWithOutputAsync(x => x.MessageId); - - lock (_cacheLock) - { - foreach (var o in output) - { - _cache.TryRemove(o, out _); - } - } - - return output.Length; - } - - public async Task> TransferReactionRolesAsync( - ulong guildId, - ulong fromMessageId, - ulong toMessageId) - { - await using var ctx = _db.GetDbContext(); - var updated = ctx.GetTable() - .Where(x => x.GuildId == guildId && x.MessageId == fromMessageId) - .UpdateWithOutput(old => new() - { - MessageId = toMessageId - }, - (old, neu) => neu); - lock (_cacheLock) - { - if (_cache.TryRemove(fromMessageId, out var data)) - { - if (_cache.TryGetValue(toMessageId, out var newData)) - { - newData.AddRange(data); - } - else - { - _cache[toMessageId] = data; - } - } - } - - return updated.Select(x => x.Emote.ToIEmote()).ToList(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Role/RoleCommands.cs b/src/EllieBot/Modules/Administration/Role/RoleCommands.cs deleted file mode 100644 index 7f5daea..0000000 --- a/src/EllieBot/Modules/Administration/Role/RoleCommands.cs +++ /dev/null @@ -1,209 +0,0 @@ -#nullable disable -using SixLabors.ImageSharp.PixelFormats; -using Color = SixLabors.ImageSharp.Color; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - public partial class RoleCommands : EllieModule - { - public enum Exclude - { - Excl - } - - private readonly IServiceProvider _services; - private StickyRolesService _stickyRoleSvc; - - public RoleCommands(IServiceProvider services, StickyRolesService stickyRoleSvc) - { - _services = services; - _stickyRoleSvc = stickyRoleSvc; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task SetRole(IGuildUser targetUser, [Leftover] IRole roleToAdd) - { - var runnerUser = (IGuildUser)ctx.User; - var runnerMaxRolePosition = runnerUser.GetRoles().Max(x => x.Position); - if (ctx.User.Id != ctx.Guild.OwnerId && runnerMaxRolePosition <= roleToAdd.Position) - return; - try - { - await targetUser.AddRoleAsync(roleToAdd, new RequestOptions() - { - AuditLogReason = $"Added by [{ctx.User.Username}]" - }); - - await Response().Confirm(strs.setrole(Format.Bold(roleToAdd.Name), - Format.Bold(targetUser.ToString()))).SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in setrole command"); - await Response().Error(strs.setrole_err).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task RemoveRole(IGuildUser targetUser, [Leftover] IRole roleToRemove) - { - var runnerUser = (IGuildUser)ctx.User; - if (ctx.User.Id != runnerUser.Guild.OwnerId - && runnerUser.GetRoles().Max(x => x.Position) <= roleToRemove.Position) - return; - try - { - await targetUser.RemoveRoleAsync(roleToRemove); - await Response().Confirm(strs.remrole(Format.Bold(roleToRemove.Name), - Format.Bold(targetUser.ToString()))).SendAsync(); - } - catch - { - await Response().Error(strs.remrole_err).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task RenameRole(IRole roleToEdit, [Leftover] string newname) - { - var guser = (IGuildUser)ctx.User; - if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= roleToEdit.Position) - return; - try - { - if (roleToEdit.Position > (await ctx.Guild.GetCurrentUserAsync()).GetRoles().Max(r => r.Position)) - { - await Response().Error(strs.renrole_perms).SendAsync(); - return; - } - - await roleToEdit.ModifyAsync(g => g.Name = newname); - await Response().Confirm(strs.renrole).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.renrole_err).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task RemoveAllRoles([Leftover] IGuildUser user) - { - var guser = (IGuildUser)ctx.User; - - var userRoles = user.GetRoles().Where(x => !x.IsManaged && x != x.Guild.EveryoneRole).ToList(); - - if (user.Id == ctx.Guild.OwnerId - || (ctx.User.Id != ctx.Guild.OwnerId - && guser.GetRoles().Max(x => x.Position) <= userRoles.Max(x => x.Position))) - return; - try - { - await user.RemoveRolesAsync(userRoles); - await Response().Confirm(strs.rar(Format.Bold(user.ToString()))).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.rar_err).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task CreateRole([Leftover] string roleName = null) - { - if (string.IsNullOrWhiteSpace(roleName)) - return; - - var r = await ctx.Guild.CreateRoleAsync(roleName, isMentionable: false); - await Response().Confirm(strs.cr(Format.Bold(r.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task DeleteRole([Leftover] IRole role) - { - var guser = (IGuildUser)ctx.User; - if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= role.Position) - return; - - await role.DeleteAsync(); - await Response().Confirm(strs.dr(Format.Bold(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task RoleHoist([Leftover] IRole role) - { - var newHoisted = !role.IsHoisted; - await role.ModifyAsync(r => r.Hoist = newHoisted); - if (newHoisted) - await Response().Confirm(strs.rolehoist_enabled(Format.Bold(role.Name))).SendAsync(); - else - await Response().Confirm(strs.rolehoist_disabled(Format.Bold(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task RoleColor([Leftover] IRole role) - => await Response().Confirm("Role Color", role.Color.RawValue.ToString("x6")).SendAsync(); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [Priority(0)] - public async Task RoleColor(Color color, [Leftover] IRole role) - { - try - { - var rgba32 = color.ToPixel(); - await role.ModifyAsync(r => r.Color = new Discord.Color(rgba32.R, rgba32.G, rgba32.B)); - await Response().Confirm(strs.rc(Format.Bold(role.Name))).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.rc_perms).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task StickyRoles() - { - var newState = await _stickyRoleSvc.ToggleStickyRoles(ctx.Guild.Id); - - if (newState) - { - await Response().Confirm(strs.sticky_roles_enabled).SendAsync(); - } - else - { - await Response().Confirm(strs.sticky_roles_disabled).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs b/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs deleted file mode 100644 index ede5b63..0000000 --- a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs +++ /dev/null @@ -1,138 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Db.Models; -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.Modules.Administration; - -public sealed class StickyRolesService : IEService, IReadyExecutor -{ - private readonly DiscordSocketClient _client; - private readonly IBotCredentials _creds; - private readonly DbService _db; - private HashSet _stickyRoles = new(); - - public StickyRolesService( - DiscordSocketClient client, - IBotCredentials creds, - DbService db) - { - _client = client; - _creds = creds; - _db = db; - } - - - public async Task OnReadyAsync() - { - await using (var ctx = _db.GetDbContext()) - { - _stickyRoles = (await ctx - .Set() - .ToLinqToDBTable() - .Where(x => Linq2DbExpressions.GuildOnShard(x.GuildId, - _creds.TotalShards, - _client.ShardId)) - .Where(x => x.StickyRoles) - .Select(x => x.GuildId) - .ToListAsync()) - .ToHashSet(); - } - - _client.UserJoined += ClientOnUserJoined; - _client.UserLeft += ClientOnUserLeft; - - // cleanup old ones every hour - // 30 days retention - if (_client.ShardId == 0) - { - using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); - while (await timer.WaitForNextTickAsync()) - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .Where(x => x.DateAdded < DateTime.UtcNow - TimeSpan.FromDays(30)) - .DeleteAsync(); - } - } - } - - private Task ClientOnUserLeft(SocketGuild guild, SocketUser user) - { - if (user is not SocketGuildUser gu) - return Task.CompletedTask; - - if (!_stickyRoles.Contains(guild.Id)) - return Task.CompletedTask; - - _ = Task.Run(async () => await SaveRolesAsync(guild.Id, gu.Id, gu.Roles)); - - return Task.CompletedTask; - } - - private async Task SaveRolesAsync(ulong guildId, ulong userId, IReadOnlyCollection guRoles) - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .InsertAsync(() => new() - { - GuildId = guildId, - UserId = userId, - RoleIds = string.Join(',', - guRoles.Where(x => !x.IsEveryone && !x.IsManaged).Select(x => x.Id.ToString())), - DateAdded = DateTime.UtcNow - }); - } - - private Task ClientOnUserJoined(SocketGuildUser user) - { - if (!_stickyRoles.Contains(user.Guild.Id)) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - var roles = await GetRolesAsync(user.Guild.Id, user.Id); - - await user.AddRolesAsync(roles); - }); - - return Task.CompletedTask; - } - - private async Task GetRolesAsync(ulong guildId, ulong userId) - { - await using var ctx = _db.GetDbContext(); - var stickyRolesEntry = await ctx - .GetTable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .DeleteWithOutputAsync(); - - if (stickyRolesEntry is { Length: > 0 }) - { - return stickyRolesEntry[0].GetRoleIds(); - } - - return []; - } - - public async Task ToggleStickyRoles(ulong guildId, bool? newState = null) - { - await using var ctx = _db.GetDbContext(); - var config = ctx.GuildConfigsForId(guildId, set => set); - - config.StickyRoles = newState ?? !config.StickyRoles; - await ctx.SaveChangesAsync(); - - if (config.StickyRoles) - { - _stickyRoles.Add(guildId); - } - else - { - _stickyRoles.Remove(guildId); - } - - return config.StickyRoles; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Self/CheckForUpdatesService.cs b/src/EllieBot/Modules/Administration/Self/CheckForUpdatesService.cs deleted file mode 100644 index 66cac5b..0000000 --- a/src/EllieBot/Modules/Administration/Self/CheckForUpdatesService.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System.Net.Http.Json; -using System.Text; -using EllieBot.Common.ModuleBehaviors; -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Administration.Self; - -public sealed class ToastielabReleaseModel -{ - [JsonPropertyName("tag_name")] - public required string TagName { get; init; } -} -public sealed class CheckForUpdatesService : IEService, IReadyExecutor -{ - private readonly BotConfigService _bcs; - private readonly IBotCredsProvider _bcp; - private readonly IHttpClientFactory _httpFactory; - private readonly DiscordSocketClient _client; - private readonly IMessageSenderService _sender; - - - private const string RELEASES_URL = "https://toastielab.dev/api/v1/repos/Emotions-stuff/elliebot/releases"; - - public CheckForUpdatesService( - BotConfigService bcs, - IBotCredsProvider bcp, - IHttpClientFactory httpFactory, - DiscordSocketClient client, - IMessageSenderService sender) - { - _bcs = bcs; - _bcp = bcp; - _httpFactory = httpFactory; - _client = client; - _sender = sender; - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); - while (await timer.WaitForNextTickAsync()) - { - var conf = _bcs.Data; - - if (!conf.CheckForUpdates) - continue; - - try - { - using var http = _httpFactory.CreateClient(); - var toastielabRelease = (await http.GetFromJsonAsync(RELEASES_URL)) - ?.FirstOrDefault(); - - if (toastielabRelease?.TagName is null) - continue; - - var latest = toastielabRelease.TagName; - var latestVersion = Version.Parse(latest); - var lastKnownVersion = GetLastKnownVersion(); - - if (lastKnownVersion is null) - { - UpdateLastKnownVersion(latestVersion); - continue; - } - - if (latestVersion > lastKnownVersion) - { - UpdateLastKnownVersion(latestVersion); - - // pull changelog - var changelog = await http.GetStringAsync("https://toastielab.dev/Emotions-stuff/elliebot/raw/branch/v5/CHANGELOG.md"); - - var thisVersionChangelog = GetVersionChangelog(latestVersion, changelog); - - if (string.IsNullOrWhiteSpace(thisVersionChangelog)) - { - Log.Warning("New version {BotVersion} was found but changelog is unavailable", - thisVersionChangelog); - continue; - } - - var creds = _bcp.GetCreds(); - await creds.OwnerIds - .Select(async x => - { - var user = await _client.GetUserAsync(x); - if (user is null) - return; - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor($"EllieBot v{latest} Released!") - .WithTitle("Changelog") - .WithUrl("https://toastielab.dev/Emotions-stuff/elliebot/src/branch/v5/CHANGELOG.md") - .WithDescription(thisVersionChangelog.TrimTo(4096)) - .WithFooter( - "You may disable these messages by typing '.conf bot checkforupdates false'"); - - await _sender.Response(user).Embed(eb).SendAsync(); - }) - .WhenAll(); - } - } - catch (Exception ex) - { - Log.Error(ex, "Error while checking for new bot release: {ErrorMessage}", ex.Message); - } - } - } - - private string? GetVersionChangelog(Version latestVersion, string changelog) - { - var clSpan = changelog.AsSpan(); - - var sb = new StringBuilder(); - var started = false; - foreach (var line in clSpan.EnumerateLines()) - { - // if we're at the current version, keep reading lines and adding to the output - if (started) - { - // if we got to previous version, end - if (line.StartsWith("## [")) - break; - - // if we're reading a new segment, reformat it to print it better to discord - if (line.StartsWith("### ")) - { - sb.AppendLine(Format.Bold(line.ToString())); - } - else - { - sb.AppendLine(line.ToString()); - } - - continue; - } - - if (line.StartsWith($"## [{latestVersion.ToString()}]")) - { - started = true; - continue; - } - } - - return sb.ToString(); - } - - private const string LAST_KNOWN_VERSION_PATH = "data/last_known_version.txt"; - - private Version? GetLastKnownVersion() - { - if (!File.Exists(LAST_KNOWN_VERSION_PATH)) - return null; - - return Version.TryParse(File.ReadAllText(LAST_KNOWN_VERSION_PATH), out var ver) - ? ver - : null; - } - - private void UpdateLastKnownVersion(Version version) - { - File.WriteAllText("data/last_known_version.txt", version.ToString()); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs deleted file mode 100644 index 57f5765..0000000 --- a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs +++ /dev/null @@ -1,597 +0,0 @@ -#nullable disable -using Discord.Rest; -using EllieBot.Modules.Administration.Services; -using EllieBot.Db.Models; -using Ellie.Common.Marmalade; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class SelfCommands : EllieModule - { - public enum SettableUserStatus - { - Online, - Invisible, - Idle, - Dnd - } - - private readonly DiscordSocketClient _client; - private readonly IBotStrings _strings; - private readonly IMarmaladeLoaderService _marmaladeLoader; - private readonly ICoordinator _coord; - private readonly DbService _db; - - public SelfCommands( - DiscordSocketClient client, - DbService db, - IBotStrings strings, - ICoordinator coord, - IMarmaladeLoaderService marmaladeLoader) - { - _client = client; - _db = db; - _strings = strings; - _coord = coord; - _marmaladeLoader = marmaladeLoader; - } - - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public Task CacheUsers() - => CacheUsers(ctx.Guild); - - [Cmd] - [OwnerOnly] - public async Task CacheUsers(IGuild guild) - { - var downloadUsersTask = guild.DownloadUsersAsync(); - var message = await Response().Pending(strs.cache_users_pending).SendAsync(); - - await downloadUsersTask; - - var users = (await guild.GetUsersAsync(CacheMode.CacheOnly)) - .Cast() - .ToList(); - - var (added, updated) = await _service.RefreshUsersAsync(users); - - await message.ModifyAsync(x => - x.Embed = _sender.CreateEmbed() - .WithDescription(GetText(strs.cache_users_done(added, updated))) - .WithOkColor() - .Build() - ); - } - - [Cmd] - [OwnerOnly] - public async Task DoAs(IUser user, [Leftover] string message) - { - if (ctx.User is not IGuildUser { GuildPermissions.Administrator: true }) - return; - - if (ctx.Guild is SocketGuild sg - && ctx.Channel is ISocketMessageChannel ch - && ctx.Message is SocketUserMessage msg) - { - var fakeMessage = new DoAsUserMessage(msg, user, message); - - - await _cmdHandler.TryRunCommand(sg, ch, fakeMessage); - } - else - { - await Response().Error(strs.error_occured).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task StartupCommandAdd([Leftover] string cmdText) - { - if (cmdText.StartsWith(prefix + "die", StringComparison.InvariantCulture)) - return; - - var guser = (IGuildUser)ctx.User; - var cmd = new AutoCommand - { - CommandText = cmdText, - ChannelId = ctx.Channel.Id, - ChannelName = ctx.Channel.Name, - GuildId = ctx.Guild?.Id, - GuildName = ctx.Guild?.Name, - VoiceChannelId = guser.VoiceChannel?.Id, - VoiceChannelName = guser.VoiceChannel?.Name, - Interval = 0 - }; - _service.AddNewAutoCommand(cmd); - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.scadd)) - .AddField(GetText(strs.server), - cmd.GuildId is null ? "-" : $"{cmd.GuildName}/{cmd.GuildId}", - true) - .AddField(GetText(strs.channel), $"{cmd.ChannelName}/{cmd.ChannelId}", true) - .AddField(GetText(strs.command_text), cmdText)) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task AutoCommandAdd(int interval, [Leftover] string cmdText) - { - if (cmdText.StartsWith(prefix + "die", StringComparison.InvariantCulture)) - return; - - if (interval < 5) - return; - - var guser = (IGuildUser)ctx.User; - var cmd = new AutoCommand - { - CommandText = cmdText, - ChannelId = ctx.Channel.Id, - ChannelName = ctx.Channel.Name, - GuildId = ctx.Guild?.Id, - GuildName = ctx.Guild?.Name, - VoiceChannelId = guser.VoiceChannel?.Id, - VoiceChannelName = guser.VoiceChannel?.Name, - Interval = interval - }; - _service.AddNewAutoCommand(cmd); - - await Response().Confirm(strs.autocmd_add(Format.Code(Format.Sanitize(cmdText)), cmd.Interval)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task StartupCommandsList(int page = 1) - { - if (page-- < 1) - return; - - var scmds = _service.GetStartupCommands().Skip(page * 5).Take(5).ToList(); - - if (scmds.Count == 0) - await Response().Error(strs.startcmdlist_none).SendAsync(); - else - { - var i = 0; - await Response() - .Confirm(text: string.Join("\n", - scmds.Select(x => $@"```css -#{++i + (page * 5)} -[{GetText(strs.server)}]: {(x.GuildId.HasValue ? $"{x.GuildName} #{x.GuildId}" : "-")} -[{GetText(strs.channel)}]: {x.ChannelName} #{x.ChannelId} -[{GetText(strs.command_text)}]: {x.CommandText}```")), - title: string.Empty, - footer: GetText(strs.page(page + 1))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task AutoCommandsList(int page = 1) - { - if (page-- < 1) - return; - - var scmds = _service.GetAutoCommands().Skip(page * 5).Take(5).ToList(); - if (!scmds.Any()) - await Response().Error(strs.autocmdlist_none).SendAsync(); - else - { - var i = 0; - await Response() - .Confirm(text: string.Join("\n", - scmds.Select(x => $@"```css -#{++i + (page * 5)} -[{GetText(strs.server)}]: {(x.GuildId.HasValue ? $"{x.GuildName} #{x.GuildId}" : "-")} -[{GetText(strs.channel)}]: {x.ChannelName} #{x.ChannelId} -{GetIntervalText(x.Interval)} -[{GetText(strs.command_text)}]: {x.CommandText}```")), - title: string.Empty, - footer: GetText(strs.page(page + 1))) - .SendAsync(); - } - } - - private string GetIntervalText(int interval) - => $"[{GetText(strs.interval)}]: {interval}"; - - [Cmd] - [OwnerOnly] - public async Task Wait(int miliseconds) - { - if (miliseconds <= 0) - return; - ctx.Message.DeleteAfter(0); - try - { - var msg = await Response().Confirm($"⏲ {miliseconds}ms").SendAsync(); - msg.DeleteAfter(miliseconds / 1000); - } - catch { } - - await Task.Delay(miliseconds); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task AutoCommandRemove([Leftover] int index) - { - if (!_service.RemoveAutoCommand(--index, out _)) - { - await Response().Error(strs.acrm_fail).SendAsync(); - return; - } - - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task StartupCommandRemove([Leftover] int index) - { - if (!_service.RemoveStartupCommand(--index, out _)) - await Response().Error(strs.scrm_fail).SendAsync(); - else - await Response().Confirm(strs.scrm).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task StartupCommandsClear() - { - _service.ClearStartupCommands(); - - await Response().Confirm(strs.startcmds_cleared).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task ForwardMessages() - { - var enabled = _service.ForwardMessages(); - - if (enabled) - await Response().Confirm(strs.fwdm_start).SendAsync(); - else - await Response().Pending(strs.fwdm_stop).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task ForwardToAll() - { - var enabled = _service.ForwardToAll(); - - if (enabled) - await Response().Confirm(strs.fwall_start).SendAsync(); - else - await Response().Pending(strs.fwall_stop).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task ForwardToChannel() - { - var enabled = _service.ForwardToChannel(ctx.Channel.Id); - - if (enabled) - await Response().Confirm(strs.fwch_start).SendAsync(); - else - await Response().Pending(strs.fwch_stop).SendAsync(); - } - - [Cmd] - public async Task ShardStats(int page = 1) - { - if (--page < 0) - return; - - var statuses = _coord.GetAllShardStatuses(); - - var status = string.Join(" : ", - statuses.Select(x => (ConnectionStateToEmoji(x), x)) - .GroupBy(x => x.Item1) - .Select(x => $"`{x.Count()} {x.Key}`") - .ToArray()); - - var allShardStrings = statuses.Select(st => - { - var timeDiff = DateTime.UtcNow - st.LastUpdate; - var stateStr = ConnectionStateToEmoji(st); - var maxGuildCountLength = - statuses.Max(x => x.GuildCount).ToString().Length; - return $"`{stateStr} " - + $"| #{st.ShardId.ToString().PadBoth(3)} " - + $"| {timeDiff:mm\\:ss} " - + $"| {st.GuildCount.ToString().PadBoth(maxGuildCountLength)} `"; - }) - .ToArray(); - await Response() - .Paginated() - .Items(allShardStrings) - .PageSize(25) - .CurrentPage(page) - .Page((items, _) => - { - var str = string.Join("\n", items); - - if (string.IsNullOrWhiteSpace(str)) - str = GetText(strs.no_shards_on_page); - - return _sender.CreateEmbed().WithOkColor().WithDescription($"{status}\n\n{str}"); - }) - .SendAsync(); - } - - private static string ConnectionStateToEmoji(ShardStatus status) - { - var timeDiff = DateTime.UtcNow - status.LastUpdate; - return status.ConnectionState switch - { - ConnectionState.Disconnected => "🔻", - _ when timeDiff > TimeSpan.FromSeconds(30) => " ❗ ", - ConnectionState.Connected => "✅", - _ => " ⏳" - }; - } - - [Cmd] - [OwnerOnly] - public async Task RestartShard(int shardId) - { - var success = _coord.RestartShard(shardId); - if (success) - await Response().Confirm(strs.shard_reconnecting(Format.Bold("#" + shardId))).SendAsync(); - else - await Response().Error(strs.no_shard_id).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public Task Leave([Leftover] string guildStr) - => _service.LeaveGuild(guildStr); - - [Cmd] - [OwnerOnly] - public async Task DeleteEmptyServers() - { - await ctx.Channel.TriggerTypingAsync(); - - var toLeave = _client.Guilds - .Where(s => s.MemberCount == 1 && s.Users.Count == 1) - .ToList(); - - foreach (var server in toLeave) - { - try - { - await server.DeleteAsync(); - Log.Information("Deleted server {ServerName} [{ServerId}]", - server.Name, - server.Id); - } - catch (Exception ex) - { - Log.Warning(ex, - "Error leaving server {ServerName} [{ServerId}]", - server.Name, - server.Id); - } - } - - await Response().Confirm(strs.deleted_x_servers(toLeave.Count)).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task Die(bool graceful = false) - { - try - { - await _client.SetStatusAsync(UserStatus.Invisible); - _ = _client.StopAsync(); - await Response().Confirm(strs.shutting_down).SendAsync(); - } - catch - { - // ignored - } - - await Task.Delay(2000); - _coord.Die(graceful); - } - - [Cmd] - [OwnerOnly] - public async Task Restart() - { - var success = _coord.RestartBot(); - if (!success) - { - await Response().Error(strs.restart_fail).SendAsync(); - return; - } - - try { await Response().Confirm(strs.restarting).SendAsync(); } - catch { } - } - - [Cmd] - [OwnerOnly] - public async Task SetName([Leftover] string newName) - { - if (string.IsNullOrWhiteSpace(newName)) - return; - - try - { - await _client.CurrentUser.ModifyAsync(u => u.Username = newName); - } - catch (RateLimitedException) - { - Log.Warning("You've been ratelimited. Wait 2 hours to change your name"); - } - - await Response().Confirm(strs.bot_name(Format.Bold(newName))).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task SetStatus([Leftover] SettableUserStatus status) - { - await _client.SetStatusAsync(SettableUserStatusToUserStatus(status)); - - await Response().Confirm(strs.bot_status(Format.Bold(status.ToString()))).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task SetAvatar([Leftover] string img = null) - { - var success = await _service.SetAvatar(img); - - if (success) - await Response().Confirm(strs.set_avatar).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task SetBanner([Leftover] string img = null) - { - var success = await _service.SetBanner(img); - - if (success) - await Response().Confirm(strs.set_banner).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task SetActivity(ActivityType? type, [Leftover] string game = null) - { - // var rep = new ReplacementBuilder().WithDefault(Context).Build(); - - var repCtx = new ReplacementContext(ctx); - await _service.SetActivityAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type); - - await Response().Confirm(strs.set_activity).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public Task SetActivity([Leftover] string game = null) - => SetActivity(null, game); - - public class SetActivityOptions - { - public ActivityType? Type { get; set; } - public string Game { get; set; } - } - - [Cmd] - [OwnerOnly] - public async Task SetStream(string url, [Leftover] string name = null) - { - name ??= ""; - - await _service.SetStreamAsync(name, url); - - await Response().Confirm(strs.set_stream).SendAsync(); - } - - public enum SendWhere - { - User = 0, - U = 0, - Usr = 0, - - Channel = 1, - Ch = 1, - Chan = 1, - } - - [Cmd] - [OwnerOnly] - public async Task Send(SendWhere to, ulong id, [Leftover] SmartText text) - { - var ch = to switch - { - SendWhere.User => await ((await _client.Rest.GetUserAsync(id))?.CreateDMChannelAsync() - ?? Task.FromResult(null)), - SendWhere.Channel => await _client.Rest.GetChannelAsync(id) as IMessageChannel, - _ => null - }; - - if (ch is null) - { - await Response().Error(strs.invalid_format).SendAsync(); - return; - } - - - var repCtx = new ReplacementContext(ctx); - text = await repSvc.ReplaceAsync(text, repCtx); - await Response().Channel(ch).Text(text).SendAsync(); - - await ctx.OkAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task StringsReload() - { - _strings.Reload(); - await _marmaladeLoader.ReloadStrings(); - await Response().Confirm(strs.bot_strings_reloaded).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task CoordReload() - { - await _coord.Reload(); - await ctx.OkAsync(); - } - - private static UserStatus SettableUserStatusToUserStatus(SettableUserStatus sus) - { - switch (sus) - { - case SettableUserStatus.Online: - return UserStatus.Online; - case SettableUserStatus.Invisible: - return UserStatus.Invisible; - case SettableUserStatus.Idle: - return UserStatus.AFK; - case SettableUserStatus.Dnd: - return UserStatus.DoNotDisturb; - } - - return UserStatus.Online; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Self/SelfService.cs b/src/EllieBot/Modules/Administration/Self/SelfService.cs deleted file mode 100644 index bbed3f7..0000000 --- a/src/EllieBot/Modules/Administration/Self/SelfService.cs +++ /dev/null @@ -1,494 +0,0 @@ -#nullable disable -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using System.Collections.Immutable; -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService -{ - private readonly CommandHandler _cmdHandler; - private readonly DbService _db; - private readonly IBotStrings _strings; - private readonly DiscordSocketClient _client; - - private readonly IBotCredentials _creds; - - private ImmutableDictionary ownerChannels = - new Dictionary().ToImmutableDictionary(); - - private ConcurrentDictionary> autoCommands = new(); - - private readonly IHttpClientFactory _httpFactory; - private readonly BotConfigService _bss; - private readonly IPubSub _pubSub; - private readonly IMessageSenderService _sender; - - //keys - private readonly TypedKey _activitySetKey; - private readonly TypedKey _guildLeaveKey; - - public SelfService( - DiscordSocketClient client, - CommandHandler cmdHandler, - DbService db, - IBotStrings strings, - IBotCredentials creds, - IHttpClientFactory factory, - BotConfigService bss, - IPubSub pubSub, - IMessageSenderService sender) - { - _cmdHandler = cmdHandler; - _db = db; - _strings = strings; - _client = client; - _creds = creds; - _httpFactory = factory; - _bss = bss; - _pubSub = pubSub; - _sender = sender; - _activitySetKey = new("activity.set"); - _guildLeaveKey = new("guild.leave"); - - HandleStatusChanges(); - - _pubSub.Sub(_guildLeaveKey, - async input => - { - var guildStr = input.ToString().Trim().ToUpperInvariant(); - if (string.IsNullOrWhiteSpace(guildStr)) - return; - - var server = _client.Guilds.FirstOrDefault(g => g.Id.ToString() == guildStr - || g.Name.Trim().ToUpperInvariant() == guildStr); - if (server is null) - return; - - if (server.OwnerId != _client.CurrentUser.Id) - { - await server.LeaveAsync(); - Log.Information("Left server {Name} [{Id}]", server.Name, server.Id); - } - else - { - await server.DeleteAsync(); - Log.Information("Deleted server {Name} [{Id}]", server.Name, server.Id); - } - }); - } - - public async Task OnReadyAsync() - { - await using var uow = _db.GetDbContext(); - - autoCommands = uow.Set() - .AsNoTracking() - .Where(x => x.Interval >= 5) - .AsEnumerable() - .GroupBy(x => x.GuildId) - .ToDictionary(x => x.Key, - y => y.ToDictionary(x => x.Id, TimerFromAutoCommand).ToConcurrent()) - .ToConcurrent(); - - var startupCommands = uow.Set().AsNoTracking().Where(x => x.Interval == 0); - foreach (var cmd in startupCommands) - { - try - { - await ExecuteCommand(cmd); - } - catch - { - } - } - - if (_client.ShardId == 0) - await LoadOwnerChannels(); - } - - private Timer TimerFromAutoCommand(AutoCommand x) - => new(async obj => await ExecuteCommand((AutoCommand)obj), x, x.Interval * 1000, x.Interval * 1000); - - private async Task ExecuteCommand(AutoCommand cmd) - { - try - { - if (cmd.GuildId is null) - return; - - var guildShard = (int)((cmd.GuildId.Value >> 22) % (ulong)_creds.TotalShards); - if (guildShard != _client.ShardId) - return; - var prefix = _cmdHandler.GetPrefix(cmd.GuildId); - //if someone already has .die as their startup command, ignore it - if (cmd.CommandText.StartsWith(prefix + "die", StringComparison.InvariantCulture)) - return; - await _cmdHandler.ExecuteExternal(cmd.GuildId, cmd.ChannelId, cmd.CommandText); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in SelfService ExecuteCommand"); - } - } - - public void AddNewAutoCommand(AutoCommand cmd) - { - using (var uow = _db.GetDbContext()) - { - uow.Set().Add(cmd); - uow.SaveChanges(); - } - - if (cmd.Interval >= 5) - { - var autos = autoCommands.GetOrAdd(cmd.GuildId, new ConcurrentDictionary()); - autos.AddOrUpdate(cmd.Id, - _ => TimerFromAutoCommand(cmd), - (_, old) => - { - old.Change(Timeout.Infinite, Timeout.Infinite); - return TimerFromAutoCommand(cmd); - }); - } - } - - public IEnumerable GetStartupCommands() - { - using var uow = _db.GetDbContext(); - return uow.Set().AsNoTracking().Where(x => x.Interval == 0).OrderBy(x => x.Id).ToList(); - } - - public IEnumerable GetAutoCommands() - { - using var uow = _db.GetDbContext(); - return uow.Set().AsNoTracking().Where(x => x.Interval >= 5).OrderBy(x => x.Id).ToList(); - } - - private async Task LoadOwnerChannels() - { - var channels = await _creds.OwnerIds.Select(id => - { - var user = _client.GetUser(id); - if (user is null) - return Task.FromResult(null); - - return user.CreateDMChannelAsync(); - }) - .WhenAll(); - - ownerChannels = channels.Where(x => x is not null) - .ToDictionary(x => x.Recipient.Id, x => x) - .ToImmutableDictionary(); - - if (!ownerChannels.Any()) - { - Log.Warning( - "No owner channels created! Make sure you've specified the correct OwnerId in the creds.yml file and invited the bot to a Discord server"); - } - else - { - Log.Information("Created {OwnerChannelCount} out of {TotalOwnerChannelCount} owner message channels", - ownerChannels.Count, - _creds.OwnerIds.Count); - } - } - - public Task LeaveGuild(string guildStr) - => _pubSub.Pub(_guildLeaveKey, guildStr); - - // forwards dms - public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - { - var bs = _bss.Data; - if (msg.Channel is IDMChannel && bs.ForwardMessages && (ownerChannels.Any() || bs.ForwardToChannel is not null)) - { - var title = _strings.GetText(strs.dm_from) + $" [{msg.Author}]({msg.Author.Id})"; - - var attachamentsTxt = _strings.GetText(strs.attachments); - - var toSend = msg.Content; - - if (msg.Attachments.Count > 0) - { - toSend += $"\n\n{Format.Code(attachamentsTxt)}:\n" - + string.Join("\n", msg.Attachments.Select(a => a.ProxyUrl)); - } - - if (bs.ForwardToAllOwners) - { - var allOwnerChannels = ownerChannels.Values; - - foreach (var ownerCh in allOwnerChannels.Where(ch => ch.Recipient.Id != msg.Author.Id)) - { - try - { - await _sender.Response(ownerCh).Confirm(title, toSend).SendAsync(); - } - catch - { - Log.Warning("Can't contact owner with id {OwnerId}", ownerCh.Recipient.Id); - } - } - } - else if (bs.ForwardToChannel is ulong cid) - { - try - { - if (_client.GetChannel(cid) is ITextChannel ch) - await _sender.Response(ch).Confirm(title, toSend).SendAsync(); - } - catch - { - Log.Warning("Error forwarding message to the channel"); - } - } - else - { - var firstOwnerChannel = ownerChannels.Values.First(); - if (firstOwnerChannel.Recipient.Id != msg.Author.Id) - { - try - { - await _sender.Response(firstOwnerChannel).Confirm(title, toSend).SendAsync(); - } - catch - { - // ignored - } - } - } - } - } - - public bool RemoveStartupCommand(int index, out AutoCommand cmd) - { - using var uow = _db.GetDbContext(); - cmd = uow.Set().AsNoTracking().Where(x => x.Interval == 0).Skip(index).FirstOrDefault(); - - if (cmd is not null) - { - uow.Remove(cmd); - uow.SaveChanges(); - return true; - } - - return false; - } - - public bool RemoveAutoCommand(int index, out AutoCommand cmd) - { - using var uow = _db.GetDbContext(); - cmd = uow.Set().AsNoTracking().Where(x => x.Interval >= 5).Skip(index).FirstOrDefault(); - - if (cmd is not null) - { - uow.Remove(cmd); - if (autoCommands.TryGetValue(cmd.GuildId, out var autos)) - { - if (autos.TryRemove(cmd.Id, out var timer)) - timer.Change(Timeout.Infinite, Timeout.Infinite); - } - - uow.SaveChanges(); - return true; - } - - return false; - } - - public async Task SetAvatar(string img) - { - if (string.IsNullOrWhiteSpace(img)) - return false; - - if (!Uri.IsWellFormedUriString(img, UriKind.Absolute)) - return false; - - var uri = new Uri(img); - - using var http = _httpFactory.CreateClient(); - using var sr = await http.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); - if (!sr.IsImage()) - return false; - - // i can't just do ReadAsStreamAsync because dicord.net's image poops itself - var imgData = await sr.Content.ReadAsByteArrayAsync(); - await using var imgStream = imgData.ToStream(); - await _client.CurrentUser.ModifyAsync(u => u.Avatar = new Image(imgStream)); - - return true; - } - - public async Task SetBanner(string img) - { - if (string.IsNullOrWhiteSpace(img)) - { - return false; - } - - if (!Uri.IsWellFormedUriString(img, UriKind.Absolute)) - { - return false; - } - - var uri = new Uri(img); - - using var http = _httpFactory.CreateClient(); - using var sr = await http.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); - - if (!sr.IsImage()) - { - return false; - } - - if (sr.GetContentLength() > 8.Megabytes()) - { - return false; - } - - await using var imageStream = await sr.Content.ReadAsStreamAsync(); - - await _client.CurrentUser.ModifyAsync(x => x.Banner = new Image(imageStream)); - return true; - } - - - public void ClearStartupCommands() - { - using var uow = _db.GetDbContext(); - var toRemove = uow.Set().AsNoTracking().Where(x => x.Interval == 0); - - uow.Set().RemoveRange(toRemove); - uow.SaveChanges(); - } - - public bool ForwardMessages() - { - var isForwarding = false; - _bss.ModifyConfig(config => { isForwarding = config.ForwardMessages = !config.ForwardMessages; }); - - return isForwarding; - } - - public bool ForwardToAll() - { - var isToAll = false; - _bss.ModifyConfig(config => { isToAll = config.ForwardToAllOwners = !config.ForwardToAllOwners; }); - return isToAll; - } - - public bool ForwardToChannel(ulong? channelId) - { - using var uow = _db.GetDbContext(); - - _bss.ModifyConfig(config => - { - config.ForwardToChannel = channelId == config.ForwardToChannel - ? null - : channelId; - }); - - return channelId is not null; - } - - private void HandleStatusChanges() - => _pubSub.Sub(_activitySetKey, - async data => - { - try - { - if (data.Type is { } activityType) - await _client.SetGameAsync(data.Name, data.Link, activityType); - else - await _client.SetCustomStatusAsync(data.Name); - } - catch (Exception ex) - { - Log.Warning(ex, "Error setting activity"); - } - }); - - public Task SetActivityAsync(string game, ActivityType? type) - => _pubSub.Pub(_activitySetKey, - new() - { - Name = game, - Link = null, - Type = type - }); - - public Task SetStreamAsync(string name, string link) - => _pubSub.Pub(_activitySetKey, - new() - { - Name = name, - Link = link, - Type = ActivityType.Streaming - }); - - private sealed class ActivityPubData - { - public string Name { get; init; } - public string Link { get; init; } - public ActivityType? Type { get; init; } - } - - - /// - /// Adds the specified to the database. If a database user with placeholder name - /// and discriminator is present in , their name and discriminator get updated accordingly. - /// - /// This database context. - /// The users to add or update in the database. - /// A tuple with the amount of new users added and old users updated. - public async Task<(long UsersAdded, long UsersUpdated)> RefreshUsersAsync(List users) - { - await using var ctx = _db.GetDbContext(); - var presentDbUsers = await ctx.GetTable() - .Select(x => new - { - x.UserId, - x.Username, - x.Discriminator - }) - .Where(x => users.Select(y => y.Id).Contains(x.UserId)) - .ToArrayAsyncEF(); - - var usersToAdd = users - .Where(x => !presentDbUsers.Select(x => x.UserId).Contains(x.Id)) - .Select(x => new DiscordUser() - { - UserId = x.Id, - AvatarId = x.AvatarId, - Username = x.Username, - Discriminator = x.Discriminator - }); - - var added = (await ctx.BulkCopyAsync(usersToAdd)).RowsCopied; - var toUpdateUserIds = presentDbUsers - .Where(x => x.Username == "Unknown" && x.Discriminator == "????") - .Select(x => x.UserId) - .ToArray(); - - foreach (var user in users.Where(x => toUpdateUserIds.Contains(x.Id))) - { - await ctx.GetTable() - .Where(x => x.UserId == user.Id) - .UpdateAsync(x => new DiscordUser() - { - Username = user.Username, - Discriminator = user.Discriminator, - - // .award tends to set AvatarId and DateAdded to NULL, so account for that. - AvatarId = user.AvatarId, - DateAdded = x.DateAdded ?? DateTime.UtcNow - }); - } - - return (added, toUpdateUserIds.Length); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesCommands.cs b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesCommands.cs deleted file mode 100644 index 70581f7..0000000 --- a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesCommands.cs +++ /dev/null @@ -1,239 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; -using System.Text; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class SelfAssignedRolesCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [BotPerm(GuildPerm.ManageMessages)] - public async Task AdSarm() - { - var newVal = _service.ToggleAdSarm(ctx.Guild.Id); - - if (newVal) - await Response().Confirm(strs.adsarm_enable(prefix)).SendAsync(); - else - await Response().Confirm(strs.adsarm_disable(prefix)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [Priority(1)] - public Task Asar([Leftover] IRole role) - => Asar(0, role); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [Priority(0)] - public async Task Asar(int group, [Leftover] IRole role) - { - var guser = (IGuildUser)ctx.User; - if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= role.Position) - return; - - var succ = _service.AddNew(ctx.Guild.Id, role, group); - - if (succ) - { - await Response() - .Confirm(strs.role_added(Format.Bold(role.Name), Format.Bold(group.ToString()))) - .SendAsync(); - } - else - await Response().Error(strs.role_in_list(Format.Bold(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [Priority(0)] - public async Task Sargn(int group, [Leftover] string name = null) - { - var set = await _service.SetNameAsync(ctx.Guild.Id, group, name); - - if (set) - { - await Response() - .Confirm(strs.group_name_added(Format.Bold(group.ToString()), Format.Bold(name))) - .SendAsync(); - } - else - await Response().Confirm(strs.group_name_removed(Format.Bold(group.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - public async Task Rsar([Leftover] IRole role) - { - var guser = (IGuildUser)ctx.User; - if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= role.Position) - return; - - var success = _service.RemoveSar(role.Guild.Id, role.Id); - if (!success) - await Response().Error(strs.self_assign_not).SendAsync(); - else - await Response().Confirm(strs.self_assign_rem(Format.Bold(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Lsar(int page = 1) - { - if (--page < 0) - return; - - var (exclusive, roles, groups) = _service.GetRoles(ctx.Guild); - - await Response() - .Paginated() - .Items(roles.OrderBy(x => x.Model.Group).ToList()) - .PageSize(20) - .CurrentPage(page) - .Page((items, _) => - { - var rolesStr = new StringBuilder(); - var roleGroups = items - .GroupBy(x => x.Model.Group) - .OrderBy(x => x.Key); - - foreach (var kvp in roleGroups) - { - string groupNameText; - if (!groups.TryGetValue(kvp.Key, out var name)) - groupNameText = Format.Bold(GetText(strs.self_assign_group(kvp.Key))); - else - groupNameText = Format.Bold($"{kvp.Key} - {name.TrimTo(25, true)}"); - - rolesStr.AppendLine("\t\t\t\t ⟪" + groupNameText + "⟫"); - foreach (var (model, role) in kvp.AsEnumerable()) - { - if (role is null) - { - } - else - { - // first character is invisible space - if (model.LevelRequirement == 0) - rolesStr.AppendLine("‌‌ " + role.Name); - else - rolesStr.AppendLine("‌‌ " + role.Name + $" (lvl {model.LevelRequirement}+)"); - } - } - - rolesStr.AppendLine(); - } - - return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(Format.Bold(GetText(strs.self_assign_list(roles.Count())))) - .WithDescription(rolesStr.ToString()) - .WithFooter(exclusive - ? GetText(strs.self_assign_are_exclusive) - : GetText(strs.self_assign_are_not_exclusive)); - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task Togglexclsar() - { - var areExclusive = _service.ToggleEsar(ctx.Guild.Id); - if (areExclusive) - await Response().Confirm(strs.self_assign_excl).SendAsync(); - else - await Response().Confirm(strs.self_assign_no_excl).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task RoleLevelReq(int level, [Leftover] IRole role) - { - if (level < 0) - return; - - var succ = _service.SetLevelReq(ctx.Guild.Id, role, level); - - if (!succ) - { - await Response().Error(strs.self_assign_not).SendAsync(); - return; - } - - await Response() - .Confirm(strs.self_assign_level_req(Format.Bold(role.Name), - Format.Bold(level.ToString()))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Iam([Leftover] IRole role) - { - var guildUser = (IGuildUser)ctx.User; - - var (result, autoDelete, extra) = await _service.Assign(guildUser, role); - - IUserMessage msg; - if (result == SelfAssignedRolesService.AssignResult.ErrNotAssignable) - msg = await Response().Error(strs.self_assign_not).SendAsync(); - else if (result == SelfAssignedRolesService.AssignResult.ErrLvlReq) - msg = await Response().Error(strs.self_assign_not_level(Format.Bold(extra.ToString()))).SendAsync(); - else if (result == SelfAssignedRolesService.AssignResult.ErrAlreadyHave) - msg = await Response().Error(strs.self_assign_already(Format.Bold(role.Name))).SendAsync(); - else if (result == SelfAssignedRolesService.AssignResult.ErrNotPerms) - msg = await Response().Error(strs.self_assign_perms).SendAsync(); - else - msg = await Response().Confirm(strs.self_assign_success(Format.Bold(role.Name))).SendAsync(); - - if (autoDelete) - { - msg.DeleteAfter(3); - ctx.Message.DeleteAfter(3); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Iamnot([Leftover] IRole role) - { - var guildUser = (IGuildUser)ctx.User; - - var (result, autoDelete) = await _service.Remove(guildUser, role); - - IUserMessage msg; - if (result == SelfAssignedRolesService.RemoveResult.ErrNotAssignable) - msg = await Response().Error(strs.self_assign_not).SendAsync(); - else if (result == SelfAssignedRolesService.RemoveResult.ErrNotHave) - msg = await Response().Error(strs.self_assign_not_have(Format.Bold(role.Name))).SendAsync(); - else if (result == SelfAssignedRolesService.RemoveResult.ErrNotPerms) - msg = await Response().Error(strs.self_assign_perms).SendAsync(); - else - msg = await Response().Confirm(strs.self_assign_remove(Format.Bold(role.Name))).SendAsync(); - - if (autoDelete) - { - msg.DeleteAfter(3); - ctx.Message.DeleteAfter(3); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs deleted file mode 100644 index 505f56c..0000000 --- a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs +++ /dev/null @@ -1,233 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public class SelfAssignedRolesService : IEService -{ - public enum AssignResult - { - Assigned, // successfully removed - ErrNotAssignable, // not assignable (error) - ErrAlreadyHave, // you already have that role (error) - ErrNotPerms, // bot doesn't have perms (error) - ErrLvlReq // you are not required level (error) - } - - public enum RemoveResult - { - Removed, // successfully removed - ErrNotAssignable, // not assignable (error) - ErrNotHave, // you don't have a role you want to remove (error) - ErrNotPerms // bot doesn't have perms (error) - } - - private readonly DbService _db; - - public SelfAssignedRolesService(DbService db) - => _db = db; - - public bool AddNew(ulong guildId, IRole role, int group) - { - using var uow = _db.GetDbContext(); - var roles = uow.Set().GetFromGuild(guildId); - if (roles.Any(s => s.RoleId == role.Id && s.GuildId == role.Guild.Id)) - return false; - - uow.Set().Add(new() - { - Group = group, - RoleId = role.Id, - GuildId = role.Guild.Id - }); - uow.SaveChanges(); - return true; - } - - public bool ToggleAdSarm(ulong guildId) - { - bool newval; - using var uow = _db.GetDbContext(); - var config = uow.GuildConfigsForId(guildId, set => set); - newval = config.AutoDeleteSelfAssignedRoleMessages = !config.AutoDeleteSelfAssignedRoleMessages; - uow.SaveChanges(); - return newval; - } - - public async Task<(AssignResult Result, bool AutoDelete, object extra)> Assign(IGuildUser guildUser, IRole role) - { - LevelStats userLevelData; - await using (var uow = _db.GetDbContext()) - { - var stats = uow.GetOrCreateUserXpStats(guildUser.Guild.Id, guildUser.Id); - userLevelData = new(stats.Xp + stats.AwardedXp); - } - - var (autoDelete, exclusive, roles) = GetAdAndRoles(guildUser.Guild.Id); - - var theRoleYouWant = roles.FirstOrDefault(r => r.RoleId == role.Id); - if (theRoleYouWant is null) - return (AssignResult.ErrNotAssignable, autoDelete, null); - if (theRoleYouWant.LevelRequirement > userLevelData.Level) - return (AssignResult.ErrLvlReq, autoDelete, theRoleYouWant.LevelRequirement); - if (guildUser.RoleIds.Contains(role.Id)) - return (AssignResult.ErrAlreadyHave, autoDelete, null); - - var roleIds = roles.Where(x => x.Group == theRoleYouWant.Group).Select(x => x.RoleId).ToArray(); - if (exclusive) - { - var sameRoles = guildUser.RoleIds.Where(r => roleIds.Contains(r)); - - foreach (var roleId in sameRoles) - { - var sameRole = guildUser.Guild.GetRole(roleId); - if (sameRole is not null) - { - try - { - await guildUser.RemoveRoleAsync(sameRole); - await Task.Delay(300); - } - catch - { - // ignored - } - } - } - } - - try - { - await guildUser.AddRoleAsync(role); - } - catch (Exception ex) - { - return (AssignResult.ErrNotPerms, autoDelete, ex); - } - - return (AssignResult.Assigned, autoDelete, null); - } - - public async Task SetNameAsync(ulong guildId, int group, string name) - { - var set = false; - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, y => y.Include(x => x.SelfAssignableRoleGroupNames)); - var toUpdate = gc.SelfAssignableRoleGroupNames.FirstOrDefault(x => x.Number == group); - - if (string.IsNullOrWhiteSpace(name)) - { - if (toUpdate is not null) - gc.SelfAssignableRoleGroupNames.Remove(toUpdate); - } - else if (toUpdate is null) - { - gc.SelfAssignableRoleGroupNames.Add(new() - { - Name = name, - Number = group - }); - set = true; - } - else - { - toUpdate.Name = name; - set = true; - } - - await uow.SaveChangesAsync(); - - return set; - } - - public async Task<(RemoveResult Result, bool AutoDelete)> Remove(IGuildUser guildUser, IRole role) - { - var (autoDelete, _, roles) = GetAdAndRoles(guildUser.Guild.Id); - - if (roles.FirstOrDefault(r => r.RoleId == role.Id) is null) - return (RemoveResult.ErrNotAssignable, autoDelete); - if (!guildUser.RoleIds.Contains(role.Id)) - return (RemoveResult.ErrNotHave, autoDelete); - try - { - await guildUser.RemoveRoleAsync(role); - } - catch (Exception) - { - return (RemoveResult.ErrNotPerms, autoDelete); - } - - return (RemoveResult.Removed, autoDelete); - } - - public bool RemoveSar(ulong guildId, ulong roleId) - { - bool success; - using var uow = _db.GetDbContext(); - success = uow.Set().DeleteByGuildAndRoleId(guildId, roleId); - uow.SaveChanges(); - return success; - } - - public (bool AutoDelete, bool Exclusive, IReadOnlyCollection) GetAdAndRoles(ulong guildId) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - var autoDelete = gc.AutoDeleteSelfAssignedRoleMessages; - var exclusive = gc.ExclusiveSelfAssignedRoles; - var roles = uow.Set().GetFromGuild(guildId); - - return (autoDelete, exclusive, roles); - } - - public bool SetLevelReq(ulong guildId, IRole role, int level) - { - using var uow = _db.GetDbContext(); - var roles = uow.Set().GetFromGuild(guildId); - var sar = roles.FirstOrDefault(x => x.RoleId == role.Id); - if (sar is not null) - { - sar.LevelRequirement = level; - uow.SaveChanges(); - } - else - return false; - - return true; - } - - public bool ToggleEsar(ulong guildId) - { - bool areExclusive; - using var uow = _db.GetDbContext(); - var config = uow.GuildConfigsForId(guildId, set => set); - - areExclusive = config.ExclusiveSelfAssignedRoles = !config.ExclusiveSelfAssignedRoles; - uow.SaveChanges(); - return areExclusive; - } - - public (bool Exclusive, IReadOnlyCollection<(SelfAssignedRole Model, IRole Role)> Roles, IDictionary - GroupNames - ) GetRoles(IGuild guild) - { - var exclusive = false; - - IReadOnlyCollection<(SelfAssignedRole Model, IRole Role)> roles; - IDictionary groupNames; - using (var uow = _db.GetDbContext()) - { - var gc = uow.GuildConfigsForId(guild.Id, set => set.Include(x => x.SelfAssignableRoleGroupNames)); - exclusive = gc.ExclusiveSelfAssignedRoles; - groupNames = gc.SelfAssignableRoleGroupNames.ToDictionary(x => x.Number, x => x.Name); - var roleModels = uow.Set().GetFromGuild(guild.Id); - roles = roleModels.Select(x => (Model: x, Role: guild.GetRole(x.RoleId))) - .ToList(); - uow.Set().RemoveRange(roles.Where(x => x.Role is null).Select(x => x.Model).ToArray()); - uow.SaveChanges(); - } - - return (exclusive, roles.Where(x => x.Role is not null).ToList(), groupNames); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs deleted file mode 100644 index 00576b7..0000000 --- a/src/EllieBot/Modules/Administration/ServerLog/DummyLogCommandService.cs +++ /dev/null @@ -1,25 +0,0 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public sealed class DummyLogCommandService : ILogCommandService -#if GLOBAL_ELLIE -, IEService -#endif -{ - public void AddDeleteIgnore(ulong xId) - { - } - - public Task LogServer(ulong guildId, ulong channelId, bool actionValue) - => Task.CompletedTask; - - public bool LogIgnore(ulong guildId, ulong itemId, IgnoredItemType itemType) - => false; - - public LogSetting? GetGuildLogSettings(ulong guildId) - => default; - - public bool Log(ulong guildId, ulong? channelId, LogType type) - => false; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs deleted file mode 100644 index 3b6cd3e..0000000 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ /dev/null @@ -1,1296 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Caching.Memory; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Administration.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public sealed class LogCommandService : ILogCommandService, IReadyExecutor -#if !GLOBAL_ELLIE - , IEService // don't load this service on global ellie -#endif -{ - public ConcurrentDictionary GuildLogSettings { get; } - - private ConcurrentDictionary> PresenceUpdates { get; } = new(); - private readonly DiscordSocketClient _client; - - private readonly IBotStrings _strings; - private readonly DbService _db; - private readonly MuteService _mute; - private readonly ProtectionService _prot; - private readonly GuildTimezoneService _tz; - private readonly IMemoryCache _memoryCache; - - private readonly ConcurrentHashSet _ignoreMessageIds = []; - private readonly UserPunishService _punishService; - private readonly IMessageSenderService _sender; - - public LogCommandService( - DiscordSocketClient client, - IBotStrings strings, - DbService db, - MuteService mute, - ProtectionService prot, - GuildTimezoneService tz, - IMemoryCache memoryCache, - UserPunishService punishService, - IMessageSenderService sender) - { - _client = client; - _memoryCache = memoryCache; - _sender = sender; - _strings = strings; - _db = db; - _mute = mute; - _prot = prot; - _tz = tz; - _punishService = punishService; - - using (var uow = db.GetDbContext()) - { - var guildIds = client.Guilds.Select(x => x.Id).ToList(); - var configs = uow.Set().AsQueryable() - .AsNoTracking() - .Where(x => guildIds.Contains(x.GuildId)) - .Include(ls => ls.LogIgnores) - .ToList(); - - GuildLogSettings = configs.ToDictionary(ls => ls.GuildId).ToConcurrent(); - } - - //_client.MessageReceived += _client_MessageReceived; - _client.MessageUpdated += _client_MessageUpdated; - _client.MessageDeleted += _client_MessageDeleted; - _client.UserBanned += _client_UserBanned; - _client.UserUnbanned += _client_UserUnbanned; - _client.UserJoined += _client_UserJoined; - _client.UserLeft += _client_UserLeft; - // _client.PresenceUpdated += _client_UserPresenceUpdated; - _client.UserVoiceStateUpdated += _client_UserVoiceStateUpdated; - _client.GuildMemberUpdated += _client_GuildUserUpdated; - _client.PresenceUpdated += _client_PresenceUpdated; - _client.UserUpdated += _client_UserUpdated; - _client.ChannelCreated += _client_ChannelCreated; - _client.ChannelDestroyed += _client_ChannelDestroyed; - _client.ChannelUpdated += _client_ChannelUpdated; - _client.RoleDeleted += _client_RoleDeleted; - - _client.ThreadCreated += _client_ThreadCreated; - _client.ThreadDeleted += _client_ThreadDeleted; - - _mute.UserMuted += MuteCommands_UserMuted; - _mute.UserUnmuted += MuteCommands_UserUnmuted; - - _prot.OnAntiProtectionTriggered += TriggeredAntiProtection; - - _punishService.OnUserWarned += PunishServiceOnOnUserWarned; - } - - private async Task _client_PresenceUpdated(SocketUser user, SocketPresence? before, SocketPresence? after) - { - if (user is not SocketGuildUser gu) - return; - - if (!GuildLogSettings.TryGetValue(gu.Guild.Id, out var logSetting) - || before is null - || after is null - || logSetting.LogIgnores.Any(ilc => ilc.LogItemId == gu.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - - if (!user.IsBot - && logSetting.LogUserPresenceId is not null - && (logChannel = - await TryGetLogChannel(gu.Guild, logSetting, LogType.UserPresence)) is not null) - { - if (before.Status != after.Status) - { - var str = "🎭" - + Format.Code(PrettyCurrentTime(gu.Guild)) - + GetText(logChannel.Guild, - strs.user_status_change("👤" + Format.Bold(gu.Username), - Format.Bold(after.Status.ToString()))); - PresenceUpdates.AddOrUpdate(logChannel, - [str], - (_, list) => - { - list.Add(str); - return list; - }); - } - else if (before.Activities.FirstOrDefault()?.Name != after.Activities.FirstOrDefault()?.Name) - { - var str = - $"👾`{PrettyCurrentTime(gu.Guild)}`👤__**{gu.Username}**__ is now playing **{after.Activities.FirstOrDefault()?.Name ?? "-"}**."; - PresenceUpdates.AddOrUpdate(logChannel, - [str], - (_, list) => - { - list.Add(str); - return list; - }); - } - } - } - - private Task _client_ThreadDeleted(Cacheable sch) - { - _ = Task.Run(async () => - { - try - { - if (!sch.HasValue) - return; - - var ch = sch.Value; - - if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting) - || logSetting.ThreadDeletedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(ch.Guild, logSetting, LogType.ThreadDeleted)) is null) - return; - - var title = GetText(logChannel.Guild, strs.thread_deleted); - - await _sender.Response(logChannel).Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("🗑 " + title) - .WithDescription($"{ch.Name} | {ch.Id}") - .WithFooter(CurrentTime(ch.Guild))).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_ThreadCreated(SocketThreadChannel ch) - { - _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting) - || logSetting.ThreadCreatedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(ch.Guild, logSetting, LogType.ThreadCreated)) is null) - return; - - var title = GetText(logChannel.Guild, strs.thread_created); - - await _sender.Response(logChannel).Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("🆕 " + title) - .WithDescription($"{ch.Name} | {ch.Id}") - .WithFooter(CurrentTime(ch.Guild))).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - - return Task.CompletedTask; - } - - public async Task OnReadyAsync() - => await Task.WhenAll(PresenceUpdateTask(), IgnoreMessageIdsClearTask()); - - private async Task IgnoreMessageIdsClearTask() - { - using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); - while (await timer.WaitForNextTickAsync()) - _ignoreMessageIds.Clear(); - } - - private async Task PresenceUpdateTask() - { - using var timer = new PeriodicTimer(TimeSpan.FromSeconds(15)); - while (await timer.WaitForNextTickAsync()) - { - try - { - var keys = PresenceUpdates.Keys.ToList(); - - await keys.Select(channel => - { - if (!((SocketGuild)channel.Guild).CurrentUser.GetPermissions(channel).SendMessages) - return Task.CompletedTask; - - if (PresenceUpdates.TryRemove(channel, out var msgs)) - { - var title = GetText(channel.Guild, strs.presence_updates); - var desc = string.Join(Environment.NewLine, msgs); - return _sender.Response(channel).Confirm(title, desc.TrimTo(2048)!).SendAsync(); - } - - return Task.CompletedTask; - }) - .WhenAll(); - } - catch - { - } - } - } - - public LogSetting? GetGuildLogSettings(ulong guildId) - { - GuildLogSettings.TryGetValue(guildId, out var logSetting); - return logSetting; - } - - public void AddDeleteIgnore(ulong messageId) - => _ignoreMessageIds.Add(messageId); - - public bool LogIgnore(ulong gid, ulong itemId, IgnoredItemType itemType) - { - using var uow = _db.GetDbContext(); - var logSetting = uow.LogSettingsFor(gid); - var removed = logSetting.LogIgnores.RemoveAll(x => x.ItemType == itemType && itemId == x.LogItemId); - - if (removed == 0) - { - var toAdd = new IgnoredLogItem - { - LogItemId = itemId, - ItemType = itemType - }; - logSetting.LogIgnores.Add(toAdd); - } - - uow.SaveChanges(); - GuildLogSettings.AddOrUpdate(gid, logSetting, (_, _) => logSetting); - return removed > 0; - } - - private string GetText(IGuild guild, LocStr str) - => _strings.GetText(str, guild.Id); - - private string PrettyCurrentTime(IGuild? g) - { - var time = DateTime.UtcNow; - if (g is not null) - time = TimeZoneInfo.ConvertTime(time, _tz.GetTimeZoneOrUtc(g.Id)); - return $"【{time:HH:mm:ss}】"; - } - - private string CurrentTime(IGuild? g) - { - var time = DateTime.UtcNow; - if (g is not null) - time = TimeZoneInfo.ConvertTime(time, _tz.GetTimeZoneOrUtc(g.Id)); - - return $"{time:HH:mm:ss}"; - } - - public async Task LogServer(ulong guildId, ulong channelId, bool value) - { - await using var uow = _db.GetDbContext(); - var logSetting = uow.LogSettingsFor(guildId); - - logSetting.LogOtherId = logSetting.MessageUpdatedId = logSetting.MessageDeletedId = logSetting.UserJoinedId = - logSetting.UserLeftId = logSetting.UserBannedId = logSetting.UserUnbannedId = logSetting.UserUpdatedId = - logSetting.ChannelCreatedId = logSetting.ChannelDestroyedId = logSetting.ChannelUpdatedId = - logSetting.LogUserPresenceId = logSetting.LogVoicePresenceId = logSetting.UserMutedId = - logSetting.ThreadCreatedId = logSetting.ThreadDeletedId - = logSetting.LogWarnsId = value ? channelId : null; - await uow.SaveChangesAsync(); - GuildLogSettings.AddOrUpdate(guildId, _ => logSetting, (_, _) => logSetting); - } - - - private async Task PunishServiceOnOnUserWarned(Warning arg) - { - if (!GuildLogSettings.TryGetValue(arg.GuildId, out var logSetting) || logSetting.LogWarnsId is null) - return; - - var g = _client.GetGuild(arg.GuildId); - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(g, logSetting, LogType.UserWarned)) is null) - return; - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"⚠️ User Warned") - .WithDescription($"<@{arg.UserId}> | {arg.UserId}") - .AddField("Mod", arg.Moderator) - .AddField("Reason", string.IsNullOrWhiteSpace(arg.Reason) ? "-" : arg.Reason, true) - .WithFooter(CurrentTime(g)); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - - private Task _client_UserUpdated(SocketUser before, SocketUser uAfter) - { - _ = Task.Run(async () => - { - try - { - if (uAfter is not SocketGuildUser after) - return; - - var g = after.Guild; - - if (!GuildLogSettings.TryGetValue(g.Id, out var logSetting) || logSetting.UserUpdatedId is null || logSetting.LogIgnores.Any(ilc => ilc.LogItemId == after.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(g, logSetting, LogType.UserUpdated)) is null) - return; - - var embed = _sender.CreateEmbed(); - - if (before.Username != after.Username) - { - embed.WithTitle("👥 " + GetText(g, strs.username_changed)) - .WithDescription($"{before.Username} | {before.Id}") - .AddField("Old Name", $"{before.Username}", true) - .AddField("New Name", $"{after.Username}", true) - .WithFooter(CurrentTime(g)) - .WithOkColor(); - } - else if (before.AvatarId != after.AvatarId) - { - embed.WithTitle("👥" + GetText(g, strs.avatar_changed)) - .WithDescription($"{before.Username}#{before.Discriminator} | {before.Id}") - .WithFooter(CurrentTime(g)) - .WithOkColor(); - - var bav = before.RealAvatarUrl(); - if (bav.IsAbsoluteUri) - embed.WithThumbnailUrl(bav.ToString()); - - var aav = after.RealAvatarUrl(); - if (aav.IsAbsoluteUri) - embed.WithImageUrl(aav.ToString()); - } - else - return; - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - public bool Log(ulong gid, ulong? cid, LogType type /*, string options*/) - { - ulong? channelId = null; - using (var uow = _db.GetDbContext()) - { - var logSetting = uow.LogSettingsFor(gid); - GuildLogSettings.AddOrUpdate(gid, _ => logSetting, (_, _) => logSetting); - switch (type) - { - case LogType.Other: - channelId = logSetting.LogOtherId = logSetting.LogOtherId is null ? cid : default; - break; - case LogType.MessageUpdated: - channelId = logSetting.MessageUpdatedId = logSetting.MessageUpdatedId is null ? cid : default; - break; - case LogType.MessageDeleted: - channelId = logSetting.MessageDeletedId = logSetting.MessageDeletedId is null ? cid : default; - //logSetting.DontLogBotMessageDeleted = (options == "nobot"); - break; - case LogType.UserJoined: - channelId = logSetting.UserJoinedId = logSetting.UserJoinedId is null ? cid : default; - break; - case LogType.UserLeft: - channelId = logSetting.UserLeftId = logSetting.UserLeftId is null ? cid : default; - break; - case LogType.UserBanned: - channelId = logSetting.UserBannedId = logSetting.UserBannedId is null ? cid : default; - break; - case LogType.UserUnbanned: - channelId = logSetting.UserUnbannedId = logSetting.UserUnbannedId is null ? cid : default; - break; - case LogType.UserUpdated: - channelId = logSetting.UserUpdatedId = logSetting.UserUpdatedId is null ? cid : default; - break; - case LogType.UserMuted: - channelId = logSetting.UserMutedId = logSetting.UserMutedId is null ? cid : default; - break; - case LogType.ChannelCreated: - channelId = logSetting.ChannelCreatedId = logSetting.ChannelCreatedId is null ? cid : default; - break; - case LogType.ChannelDestroyed: - channelId = logSetting.ChannelDestroyedId = logSetting.ChannelDestroyedId is null ? cid : default; - break; - case LogType.ChannelUpdated: - channelId = logSetting.ChannelUpdatedId = logSetting.ChannelUpdatedId is null ? cid : default; - break; - case LogType.UserPresence: - channelId = logSetting.LogUserPresenceId = logSetting.LogUserPresenceId is null ? cid : default; - break; - case LogType.VoicePresence: - channelId = logSetting.LogVoicePresenceId = logSetting.LogVoicePresenceId is null ? cid : default; - break; - case LogType.UserWarned: - channelId = logSetting.LogWarnsId = logSetting.LogWarnsId is null ? cid : default; - break; - case LogType.ThreadDeleted: - channelId = logSetting.ThreadDeletedId = logSetting.ThreadDeletedId is null ? cid : default; - break; - case LogType.ThreadCreated: - channelId = logSetting.ThreadCreatedId = logSetting.ThreadCreatedId is null ? cid : default; - break; - } - - uow.SaveChanges(); - } - - return channelId is not null; - } - - private void MuteCommands_UserMuted( - IGuildUser usr, - IUser mod, - MuteType muteType, - string reason) - => _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out var logSetting) || logSetting.UserMutedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(usr.Guild, logSetting, LogType.UserMuted)) is null) - return; - var mutes = string.Empty; - var mutedLocalized = GetText(logChannel.Guild, strs.muted_sn); - switch (muteType) - { - case MuteType.Voice: - mutes = "🔇 " + GetText(logChannel.Guild, strs.xmuted_voice(mutedLocalized, mod.ToString())); - break; - case MuteType.Chat: - mutes = "🔇 " + GetText(logChannel.Guild, strs.xmuted_text(mutedLocalized, mod.ToString())); - break; - case MuteType.All: - mutes = "🔇 " - + GetText(logChannel.Guild, strs.xmuted_text_and_voice(mutedLocalized, mod.ToString())); - break; - } - - var embed = _sender.CreateEmbed() - .WithAuthor(mutes) - .WithTitle($"{usr.Username}#{usr.Discriminator} | {usr.Id}") - .WithFooter(CurrentTime(usr.Guild)) - .WithOkColor(); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - - private void MuteCommands_UserUnmuted( - IGuildUser usr, - IUser mod, - MuteType muteType, - string reason) - => _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out var logSetting) || logSetting.UserMutedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(usr.Guild, logSetting, LogType.UserMuted)) is null) - return; - - var mutes = string.Empty; - var unmutedLocalized = GetText(logChannel.Guild, strs.unmuted_sn); - switch (muteType) - { - case MuteType.Voice: - mutes = "🔊 " + GetText(logChannel.Guild, strs.xmuted_voice(unmutedLocalized, mod.ToString())); - break; - case MuteType.Chat: - mutes = "🔊 " + GetText(logChannel.Guild, strs.xmuted_text(unmutedLocalized, mod.ToString())); - break; - case MuteType.All: - mutes = "🔊 " - + GetText(logChannel.Guild, - strs.xmuted_text_and_voice(unmutedLocalized, mod.ToString())); - break; - } - - var embed = _sender.CreateEmbed() - .WithAuthor(mutes) - .WithTitle($"{usr.Username}#{usr.Discriminator} | {usr.Id}") - .WithFooter($"{CurrentTime(usr.Guild)}") - .WithOkColor(); - - if (!string.IsNullOrWhiteSpace(reason)) - embed.WithDescription(reason); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - - public Task TriggeredAntiProtection(PunishmentAction action, ProtectionType protection, params IGuildUser[] users) - { - _ = Task.Run(async () => - { - try - { - if (users.Length == 0) - return; - - if (!GuildLogSettings.TryGetValue(users.First().Guild.Id, out var logSetting) - || logSetting.LogOtherId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(users.First().Guild, logSetting, LogType.Other)) is null) - return; - - var punishment = string.Empty; - switch (action) - { - case PunishmentAction.Mute: - punishment = "🔇 " + GetText(logChannel.Guild, strs.muted_pl).ToUpperInvariant(); - break; - case PunishmentAction.Kick: - punishment = "👢 " + GetText(logChannel.Guild, strs.kicked_pl).ToUpperInvariant(); - break; - case PunishmentAction.Softban: - punishment = "☣ " + GetText(logChannel.Guild, strs.soft_banned_pl).ToUpperInvariant(); - break; - case PunishmentAction.Ban: - punishment = "⛔️ " + GetText(logChannel.Guild, strs.banned_pl).ToUpperInvariant(); - break; - case PunishmentAction.RemoveRoles: - punishment = "⛔️ " + GetText(logChannel.Guild, strs.remove_roles_pl).ToUpperInvariant(); - break; - } - - var embed = _sender.CreateEmbed() - .WithAuthor($"🛡 Anti-{protection}") - .WithTitle(GetText(logChannel.Guild, strs.users) + " " + punishment) - .WithDescription(string.Join("\n", users.Select(u => u.ToString()))) - .WithFooter(CurrentTime(logChannel.Guild)) - .WithOkColor(); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private string GetRoleDeletedKey(ulong roleId) - => $"role_deleted_{roleId}"; - - private Task _client_RoleDeleted(SocketRole socketRole) - { - Serilog.Log.Information("Role deleted {RoleId}", socketRole.Id); - _memoryCache.Set(GetRoleDeletedKey(socketRole.Id), true, TimeSpan.FromMinutes(5)); - return Task.CompletedTask; - } - - private bool IsRoleDeleted(ulong roleId) - { - var isDeleted = _memoryCache.TryGetValue(GetRoleDeletedKey(roleId), out _); - return isDeleted; - } - - private Task _client_GuildUserUpdated(Cacheable optBefore, SocketGuildUser after) - { - _ = Task.Run(async () => - { - try - { - var before = await optBefore.GetOrDownloadAsync(); - - if (before is null) - return; - - if (!GuildLogSettings.TryGetValue(before.Guild.Id, out var logSetting) - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == after.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if (logSetting.UserUpdatedId is not null - && (logChannel = await TryGetLogChannel(before.Guild, logSetting, LogType.UserUpdated)) is not null) - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithFooter(CurrentTime(before.Guild)) - .WithTitle($"{before.Username}#{before.Discriminator} | {before.Id}"); - if (before.Nickname != after.Nickname) - { - embed.WithAuthor("👥 " + GetText(logChannel.Guild, strs.nick_change)) - .AddField(GetText(logChannel.Guild, strs.old_nick), - $"{before.Nickname}#{before.Discriminator}") - .AddField(GetText(logChannel.Guild, strs.new_nick), - $"{after.Nickname}#{after.Discriminator}"); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - else if (!before.Roles.SequenceEqual(after.Roles)) - { - if (before.Roles.Count < after.Roles.Count) - { - var diffRoles = after.Roles.Where(r => !before.Roles.Contains(r)).Select(r => r.Name); - embed.WithAuthor("⚔ " + GetText(logChannel.Guild, strs.user_role_add)) - .WithDescription(string.Join(", ", diffRoles).SanitizeMentions()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - else if (before.Roles.Count > after.Roles.Count) - { - await Task.Delay(1000); - var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r) && !IsRoleDeleted(r.Id)) - .Select(r => r.Name) - .ToList(); - - if (diffRoles.Any()) - { - embed.WithAuthor("⚔ " + GetText(logChannel.Guild, strs.user_role_rem)) - .WithDescription(string.Join(", ", diffRoles).SanitizeMentions()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - } - } - } - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_ChannelUpdated(IChannel cbefore, IChannel cafter) - { - _ = Task.Run(async () => - { - try - { - if (cbefore is not IGuildChannel before) - return; - - var after = (IGuildChannel)cafter; - - if (!GuildLogSettings.TryGetValue(before.Guild.Id, out var logSetting) - || logSetting.ChannelUpdatedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == after.Id && ilc.ItemType == IgnoredItemType.Channel)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(before.Guild, logSetting, LogType.ChannelUpdated)) is null) - return; - - var embed = _sender.CreateEmbed().WithOkColor().WithFooter(CurrentTime(before.Guild)); - - var beforeTextChannel = cbefore as ITextChannel; - var afterTextChannel = cafter as ITextChannel; - - if (before.Name != after.Name) - { - embed.WithTitle("ℹ️ " + GetText(logChannel.Guild, strs.ch_name_change)) - .WithDescription($"{after} | {after.Id}") - .AddField(GetText(logChannel.Guild, strs.ch_old_name), before.Name); - } - else if (beforeTextChannel?.Topic != afterTextChannel?.Topic) - { - embed.WithTitle("ℹ️ " + GetText(logChannel.Guild, strs.ch_topic_change)) - .WithDescription($"{after} | {after.Id}") - .AddField(GetText(logChannel.Guild, strs.old_topic), beforeTextChannel?.Topic ?? "-") - .AddField(GetText(logChannel.Guild, strs.new_topic), afterTextChannel?.Topic ?? "-"); - } - else - return; - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_ChannelDestroyed(IChannel ich) - { - _ = Task.Run(async () => - { - try - { - if (ich is not IGuildChannel ch) - return; - - if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting) - || logSetting.ChannelDestroyedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == ch.Id && ilc.ItemType == IgnoredItemType.Channel)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(ch.Guild, logSetting, LogType.ChannelDestroyed)) is null) - return; - - string title; - if (ch is IVoiceChannel) - title = GetText(logChannel.Guild, strs.voice_chan_destroyed); - else - title = GetText(logChannel.Guild, strs.text_chan_destroyed); - - await _sender.Response(logChannel).Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("🆕 " + title) - .WithDescription($"{ch.Name} | {ch.Id}") - .WithFooter(CurrentTime(ch.Guild))).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_ChannelCreated(IChannel ich) - { - _ = Task.Run(async () => - { - try - { - if (ich is not IGuildChannel ch) - return; - - if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting) - || logSetting.ChannelCreatedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(ch.Guild, logSetting, LogType.ChannelCreated)) is null) - return; - string title; - if (ch is IVoiceChannel) - title = GetText(logChannel.Guild, strs.voice_chan_created); - else - title = GetText(logChannel.Guild, strs.text_chan_created); - - await _sender.Response(logChannel).Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("🆕 " + title) - .WithDescription($"{ch.Name} | {ch.Id}") - .WithFooter(CurrentTime(ch.Guild))).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_UserVoiceStateUpdated(SocketUser iusr, SocketVoiceState before, SocketVoiceState after) - { - _ = Task.Run(async () => - { - try - { - if (iusr is not IGuildUser usr || usr.IsBot) - return; - - var beforeVch = before.VoiceChannel; - var afterVch = after.VoiceChannel; - - if (beforeVch == afterVch) - return; - - if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out var logSetting) - || logSetting.LogVoicePresenceId is null - || logSetting.LogIgnores.Any( - ilc => ilc.LogItemId == iusr.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(usr.Guild, logSetting, LogType.VoicePresence)) is null) - return; - - var str = string.Empty; - if (beforeVch?.Guild == afterVch?.Guild) - { - str = "🎙" - + Format.Code(PrettyCurrentTime(usr.Guild)) - + GetText(logChannel.Guild, - strs.user_vmoved("👤" + Format.Bold(usr.Username), - Format.Bold(beforeVch?.Name ?? ""), - Format.Bold(afterVch?.Name ?? ""))); - } - else if (beforeVch is null) - { - str = "🎙" - + Format.Code(PrettyCurrentTime(usr.Guild)) - + GetText(logChannel.Guild, - strs.user_vjoined("👤" + Format.Bold(usr.Username), - Format.Bold(afterVch?.Name ?? ""))); - } - else if (afterVch is null) - { - str = "🎙" - + Format.Code(PrettyCurrentTime(usr.Guild)) - + GetText(logChannel.Guild, - strs.user_vleft("👤" + Format.Bold(usr.Username), - Format.Bold(beforeVch.Name ?? ""))); - } - - if (!string.IsNullOrWhiteSpace(str)) - { - PresenceUpdates.AddOrUpdate(logChannel, - [str], - (_, list) => - { - list.Add(str); - return list; - }); - } - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_UserLeft(SocketGuild guild, SocketUser usr) - { - _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(guild.Id, out var logSetting) - || logSetting.UserLeftId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == usr.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(guild, logSetting, LogType.UserLeft)) is null) - return; - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("❌ " + GetText(logChannel.Guild, strs.user_left)) - .WithDescription(usr.ToString()) - .AddField("Id", usr.Id.ToString()) - .WithFooter(CurrentTime(guild)); - - if (Uri.IsWellFormedUriString(usr.GetAvatarUrl(), UriKind.Absolute)) - embed.WithThumbnailUrl(usr.GetAvatarUrl()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_UserJoined(IGuildUser usr) - { - _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out var logSetting) || logSetting.UserJoinedId is null) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(usr.Guild, logSetting, LogType.UserJoined)) is null) - return; - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("✅ " + GetText(logChannel.Guild, strs.user_joined)) - .WithDescription($"{usr.Mention} `{usr}`") - .AddField("Id", usr.Id.ToString()) - .AddField(GetText(logChannel.Guild, strs.joined_server), - $"{usr.JoinedAt?.ToString("dd.MM.yyyy HH:mm") ?? "?"}", - true) - .AddField(GetText(logChannel.Guild, strs.joined_discord), - $"{usr.CreatedAt:dd.MM.yyyy HH:mm}", - true) - .WithFooter(CurrentTime(usr.Guild)); - - if (Uri.IsWellFormedUriString(usr.GetAvatarUrl(), UriKind.Absolute)) - embed.WithThumbnailUrl(usr.GetAvatarUrl()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_UserUnbanned(IUser usr, IGuild guild) - { - _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(guild.Id, out var logSetting) - || logSetting.UserUnbannedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == usr.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(guild, logSetting, LogType.UserUnbanned)) is null) - return; - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("♻️ " + GetText(logChannel.Guild, strs.user_unbanned)) - .WithDescription(usr.ToString()!) - .AddField("Id", usr.Id.ToString()) - .WithFooter(CurrentTime(guild)); - - if (Uri.IsWellFormedUriString(usr.GetAvatarUrl(), UriKind.Absolute)) - embed.WithThumbnailUrl(usr.GetAvatarUrl()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_UserBanned(IUser usr, IGuild guild) - { - _ = Task.Run(async () => - { - try - { - if (!GuildLogSettings.TryGetValue(guild.Id, out var logSetting) - || logSetting.UserBannedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == usr.Id && ilc.ItemType == IgnoredItemType.User)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(guild, logSetting, LogType.UserBanned)) == null) - return; - - - string? reason = null; - try - { - var ban = await guild.GetBanAsync(usr); - reason = ban?.Reason; - } - catch - { - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("🚫 " + GetText(logChannel.Guild, strs.user_banned)) - .WithDescription(usr.ToString()!) - .AddField("Id", usr.Id.ToString()) - .AddField("Reason", string.IsNullOrWhiteSpace(reason) ? "-" : reason) - .WithFooter(CurrentTime(guild)); - - var avatarUrl = usr.GetAvatarUrl(); - - if (Uri.IsWellFormedUriString(avatarUrl, UriKind.Absolute)) - embed.WithThumbnailUrl(usr.GetAvatarUrl()); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_MessageDeleted(Cacheable optMsg, Cacheable optCh) - { - _ = Task.Run(async () => - { - try - { - if (optMsg.Value is not IUserMessage msg || msg.IsAuthor(_client)) - return; - - if (_ignoreMessageIds.Contains(msg.Id)) - return; - - var ch = optCh.Value; - if (ch is not ITextChannel channel) - return; - - if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out var logSetting) - || logSetting.MessageDeletedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == channel.Id && ilc.ItemType == IgnoredItemType.Channel)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(channel.Guild, logSetting, LogType.MessageDeleted)) is null - || logChannel.Id == msg.Id) - return; - - var resolvedMessage = msg.Resolve(TagHandling.FullName); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("🗑 " - + GetText(logChannel.Guild, strs.msg_del(((ITextChannel)msg.Channel).Name))) - .WithDescription(msg.Author.ToString()!) - .AddField(GetText(logChannel.Guild, strs.content), - string.IsNullOrWhiteSpace(resolvedMessage) ? "-" : resolvedMessage) - .AddField("Id", msg.Id.ToString()) - .WithFooter(CurrentTime(channel.Guild)); - if (msg.Attachments.Any()) - { - embed.AddField(GetText(logChannel.Guild, strs.attachments), - string.Join(", ", msg.Attachments.Select(a => a.Url))); - } - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch (Exception) - { - // ignored - } - }); - return Task.CompletedTask; - } - - private Task _client_MessageUpdated( - Cacheable optmsg, - SocketMessage imsg2, - ISocketMessageChannel ch) - { - _ = Task.Run(async () => - { - try - { - if (imsg2 is not IUserMessage after || after.IsAuthor(_client)) - return; - - if ((optmsg.HasValue ? optmsg.Value : null) is not IUserMessage before) - return; - - if (ch is not ITextChannel channel) - return; - - if (before.Content == after.Content) - return; - - if (before.Author.IsBot) - return; - - if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out var logSetting) - || logSetting.MessageUpdatedId is null - || logSetting.LogIgnores.Any(ilc - => ilc.LogItemId == channel.Id && ilc.ItemType == IgnoredItemType.Channel)) - return; - - ITextChannel? logChannel; - if ((logChannel = await TryGetLogChannel(channel.Guild, logSetting, LogType.MessageUpdated)) is null - || logChannel.Id == after.Channel.Id) - return; - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("📝 " - + GetText(logChannel.Guild, - strs.msg_update(((ITextChannel)after.Channel).Name))) - .WithDescription(after.Author.ToString()!) - .AddField(GetText(logChannel.Guild, strs.old_msg), - string.IsNullOrWhiteSpace(before.Content) - ? "-" - : before.Resolve(TagHandling.FullName)) - .AddField(GetText(logChannel.Guild, strs.new_msg), - string.IsNullOrWhiteSpace(after.Content) ? "-" : after.Resolve(TagHandling.FullName)) - .AddField("Id", after.Id.ToString()) - .WithFooter(CurrentTime(channel.Guild)); - - await _sender.Response(logChannel).Embed(embed).SendAsync(); - } - catch - { - // ignored - } - }); - return Task.CompletedTask; - } - - private async Task TryGetLogChannel(IGuild guild, LogSetting logSetting, LogType logChannelType) - { - ulong? id = null; - switch (logChannelType) - { - case LogType.Other: - id = logSetting.LogOtherId; - break; - case LogType.MessageUpdated: - id = logSetting.MessageUpdatedId; - break; - case LogType.MessageDeleted: - id = logSetting.MessageDeletedId; - break; - case LogType.UserJoined: - id = logSetting.UserJoinedId; - break; - case LogType.UserLeft: - id = logSetting.UserLeftId; - break; - case LogType.UserBanned: - id = logSetting.UserBannedId; - break; - case LogType.UserUnbanned: - id = logSetting.UserUnbannedId; - break; - case LogType.UserUpdated: - id = logSetting.UserUpdatedId; - break; - case LogType.ChannelCreated: - id = logSetting.ChannelCreatedId; - break; - case LogType.ChannelDestroyed: - id = logSetting.ChannelDestroyedId; - break; - case LogType.ChannelUpdated: - id = logSetting.ChannelUpdatedId; - break; - case LogType.UserPresence: - id = logSetting.LogUserPresenceId; - break; - case LogType.VoicePresence: - id = logSetting.LogVoicePresenceId; - break; - case LogType.UserMuted: - id = logSetting.UserMutedId; - break; - case LogType.UserWarned: - id = logSetting.LogWarnsId; - break; - case LogType.ThreadCreated: - id = logSetting.ThreadCreatedId; - break; - case LogType.ThreadDeleted: - id = logSetting.ThreadDeletedId; - break; - } - - if (id is null or 0) - { - UnsetLogSetting(guild.Id, logChannelType); - return null; - } - - var channel = await guild.GetTextChannelAsync(id.Value); - - if (channel is null) - { - UnsetLogSetting(guild.Id, logChannelType); - return null; - } - - return channel; - } - - private void UnsetLogSetting(ulong guildId, LogType logChannelType) - { - using var uow = _db.GetDbContext(); - var newLogSetting = uow.LogSettingsFor(guildId); - switch (logChannelType) - { - case LogType.Other: - newLogSetting.LogOtherId = null; - break; - case LogType.MessageUpdated: - newLogSetting.MessageUpdatedId = null; - break; - case LogType.MessageDeleted: - newLogSetting.MessageDeletedId = null; - break; - case LogType.UserJoined: - newLogSetting.UserJoinedId = null; - break; - case LogType.UserLeft: - newLogSetting.UserLeftId = null; - break; - case LogType.UserBanned: - newLogSetting.UserBannedId = null; - break; - case LogType.UserUnbanned: - newLogSetting.UserUnbannedId = null; - break; - case LogType.UserUpdated: - newLogSetting.UserUpdatedId = null; - break; - case LogType.UserMuted: - newLogSetting.UserMutedId = null; - break; - case LogType.ChannelCreated: - newLogSetting.ChannelCreatedId = null; - break; - case LogType.ChannelDestroyed: - newLogSetting.ChannelDestroyedId = null; - break; - case LogType.ChannelUpdated: - newLogSetting.ChannelUpdatedId = null; - break; - case LogType.UserPresence: - newLogSetting.LogUserPresenceId = null; - break; - case LogType.VoicePresence: - newLogSetting.LogVoicePresenceId = null; - break; - case LogType.UserWarned: - newLogSetting.LogWarnsId = null; - break; - } - - GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting); - uow.SaveChanges(); - } -} diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommands.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommands.cs deleted file mode 100644 index 1632da5..0000000 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommands.cs +++ /dev/null @@ -1,175 +0,0 @@ -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - [NoPublicBot] - public partial class LogCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task LogServer(PermissionAction action) - { - await _service.LogServer(ctx.Guild.Id, ctx.Channel.Id, action.Value); - if (action.Value) - await Response().Confirm(strs.log_all).SendAsync(); - else - await Response().Confirm(strs.log_disabled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task LogIgnore() - { - var settings = _service.GetGuildLogSettings(ctx.Guild.Id); - - var chs = settings?.LogIgnores.Where(x => x.ItemType == IgnoredItemType.Channel).ToList() - ?? new List(); - var usrs = settings?.LogIgnores.Where(x => x.ItemType == IgnoredItemType.User).ToList() - ?? new List(); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .AddField(GetText(strs.log_ignored_channels), - chs.Count == 0 - ? "-" - : string.Join('\n', chs.Select(x => $"{x.LogItemId} | <#{x.LogItemId}>"))) - .AddField(GetText(strs.log_ignored_users), - usrs.Count == 0 - ? "-" - : string.Join('\n', usrs.Select(x => $"{x.LogItemId} | <@{x.LogItemId}>"))); - - await Response().Embed(eb).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task LogIgnore([Leftover] ITextChannel target) - { - var removed = _service.LogIgnore(ctx.Guild.Id, target.Id, IgnoredItemType.Channel); - - if (!removed) - { - await Response() - .Confirm( - strs.log_ignore_chan(Format.Bold(target.Mention + "(" + target.Id + ")"))) - .SendAsync(); - } - else - { - await Response() - .Confirm( - strs.log_not_ignore_chan(Format.Bold(target.Mention + "(" + target.Id + ")"))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task LogIgnore([Leftover] IUser target) - { - var removed = _service.LogIgnore(ctx.Guild.Id, target.Id, IgnoredItemType.User); - - if (!removed) - { - await Response() - .Confirm(strs.log_ignore_user(Format.Bold(target.Mention + "(" + target.Id + ")"))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.log_not_ignore_user(Format.Bold(target.Mention + "(" + target.Id + ")"))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task LogEvents() - { - var logSetting = _service.GetGuildLogSettings(ctx.Guild.Id); - var str = string.Join("\n", - Enum.GetNames() - .Select(x => - { - var val = logSetting is null ? null : GetLogProperty(logSetting, Enum.Parse(x)); - if (val is not null) - return $"{Format.Bold(x)} <#{val}>"; - return Format.Bold(x); - })); - - await Response().Confirm(Format.Bold(GetText(strs.log_events)) + "\n" + str).SendAsync(); - } - - private static ulong? GetLogProperty(LogSetting l, LogType type) - { - switch (type) - { - case LogType.Other: - return l.LogOtherId; - case LogType.MessageUpdated: - return l.MessageUpdatedId; - case LogType.MessageDeleted: - return l.MessageDeletedId; - case LogType.UserJoined: - return l.UserJoinedId; - case LogType.UserLeft: - return l.UserLeftId; - case LogType.UserBanned: - return l.UserBannedId; - case LogType.UserUnbanned: - return l.UserUnbannedId; - case LogType.UserUpdated: - return l.UserUpdatedId; - case LogType.ChannelCreated: - return l.ChannelCreatedId; - case LogType.ChannelDestroyed: - return l.ChannelDestroyedId; - case LogType.ChannelUpdated: - return l.ChannelUpdatedId; - case LogType.UserPresence: - return l.LogUserPresenceId; - case LogType.VoicePresence: - return l.LogVoicePresenceId; - case LogType.UserMuted: - return l.UserMutedId; - case LogType.UserWarned: - return l.LogWarnsId; - case LogType.ThreadDeleted: - return l.ThreadDeletedId; - case LogType.ThreadCreated: - return l.ThreadCreatedId; - default: - return null; - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [OwnerOnly] - public async Task Log(LogType type) - { - var val = _service.Log(ctx.Guild.Id, ctx.Channel.Id, type); - - if (val) - await Response().Confirm(strs.log(Format.Bold(type.ToString()))).SendAsync(); - else - await Response().Confirm(strs.log_stop(Format.Bold(type.ToString()))).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs b/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs deleted file mode 100644 index 67f5ca6..0000000 --- a/src/EllieBot/Modules/Administration/Ticket/TicketCommands.cs +++ /dev/null @@ -1,14 +0,0 @@ -// namespace EllieBot.Modules.Administration; -// -// public partial class Administration -// { -// [Group] -// public partial class TicketCommands : EllieModule -// { -// [Cmd] -// public async Task Ticket() -// { -// -// } -// } -// } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs b/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs deleted file mode 100644 index f36d7af..0000000 --- a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs +++ /dev/null @@ -1,94 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.Modules.Administration.Services; - -public sealed class GuildTimezoneService : ITimezoneService, IReadyExecutor, IEService -{ - private readonly ConcurrentDictionary _timezones; - private readonly DbService _db; - private readonly IReplacementPatternStore _repStore; - - public GuildTimezoneService(IBot bot, DbService db, IReplacementPatternStore repStore) - { - _timezones = bot.AllGuildConfigs.Select(GetTimzezoneTuple) - .Where(x => x.Timezone is not null) - .ToDictionary(x => x.GuildId, x => x.Timezone) - .ToConcurrent(); - - _db = db; - _repStore = repStore; - - bot.JoinedGuild += Bot_JoinedGuild; - } - - private Task Bot_JoinedGuild(GuildConfig arg) - { - var (guildId, tz) = GetTimzezoneTuple(arg); - if (tz is not null) - _timezones.TryAdd(guildId, tz); - return Task.CompletedTask; - } - - private static (ulong GuildId, TimeZoneInfo Timezone) GetTimzezoneTuple(GuildConfig x) - { - TimeZoneInfo tz; - try - { - if (x.TimeZoneId is null) - tz = null; - else - tz = TimeZoneInfo.FindSystemTimeZoneById(x.TimeZoneId); - } - catch - { - tz = null; - } - - return (x.GuildId, Timezone: tz); - } - - public TimeZoneInfo GetTimeZoneOrDefault(ulong? guildId) - { - if (guildId is ulong gid && _timezones.TryGetValue(gid, out var tz)) - return tz; - - return null; - } - - public void SetTimeZone(ulong guildId, TimeZoneInfo tz) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - - gc.TimeZoneId = tz?.Id; - uow.SaveChanges(); - - if (tz is null) - _timezones.TryRemove(guildId, out tz); - else - _timezones.AddOrUpdate(guildId, tz, (_, _) => tz); - } - - public TimeZoneInfo GetTimeZoneOrUtc(ulong? guildId) - => GetTimeZoneOrDefault(guildId) ?? TimeZoneInfo.Utc; - - public Task OnReadyAsync() - { - _repStore.Register("%server.time%", - (IGuild g) => - { - var to = TimeZoneInfo.Local; - if (g is not null) - { - to = GetTimeZoneOrDefault(g.Id) ?? TimeZoneInfo.Local; - } - - return TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.Utc, to).ToString("HH:mm ") - + to.StandardName.GetInitials(); - }); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Timezone/TimeZoneCommands.cs b/src/EllieBot/Modules/Administration/Timezone/TimeZoneCommands.cs deleted file mode 100644 index a05789d..0000000 --- a/src/EllieBot/Modules/Administration/Timezone/TimeZoneCommands.cs +++ /dev/null @@ -1,78 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class TimeZoneCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Timezones(int page = 1) - { - page--; - - if (page is < 0 or > 20) - return; - - var timezones = TimeZoneInfo.GetSystemTimeZones().OrderBy(x => x.BaseUtcOffset).ToArray(); - var timezonesPerPage = 20; - - var curTime = DateTimeOffset.UtcNow; - - var i = 0; - var timezoneStrings = timezones.Select(x => (x, ++i % 2 == 0)) - .Select(data => - { - var (tzInfo, flip) = data; - var nameStr = $"{tzInfo.Id,-30}"; - var offset = curTime.ToOffset(tzInfo.GetUtcOffset(curTime)) - .ToString("zzz"); - if (flip) - return $"{offset} {Format.Code(nameStr)}"; - return $"{Format.Code(offset)} {nameStr}"; - }) - .ToList(); - - - await Response() - .Paginated() - .Items(timezoneStrings) - .PageSize(timezonesPerPage) - .CurrentPage(page) - .Page((items, _) => _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.timezones_available)) - .WithDescription(string.Join("\n", items))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Timezone() - => await Response().Confirm(strs.timezone_guild(_service.GetTimeZoneOrUtc(ctx.Guild.Id))).SendAsync(); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task Timezone([Leftover] string id) - { - TimeZoneInfo tz; - try { tz = TimeZoneInfo.FindSystemTimeZoneById(id); } - catch { tz = null; } - - - if (tz is null) - { - await Response().Error(strs.timezone_not_found).SendAsync(); - return; - } - - _service.SetTimeZone(ctx.Guild.Id, tz); - - await Response().Confirm(tz.ToString()).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs deleted file mode 100644 index 3c43b1f..0000000 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs +++ /dev/null @@ -1,986 +0,0 @@ -#nullable disable -using CommandLine; -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Administration.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class UserPunishCommands : EllieModule - { - public enum AddRole - { - AddRole - } - - private readonly MuteService _mute; - - public UserPunishCommands(MuteService mute) - { - _mute = mute; - } - - private async Task CheckRoleHierarchy(IGuildUser target) - { - var curUser = ((SocketGuild)ctx.Guild).CurrentUser; - var ownerId = ctx.Guild.OwnerId; - var modMaxRole = ((IGuildUser)ctx.User).GetRoles().Max(r => r.Position); - var targetMaxRole = target.GetRoles().Max(r => r.Position); - var botMaxRole = curUser.GetRoles().Max(r => r.Position); - // bot can't punish a user who is higher in the hierarchy. Discord will return 403 - // moderator can be owner, in which case role hierarchy doesn't matter - // otherwise, moderator has to have a higher role - if (botMaxRole <= targetMaxRole - || (ctx.User.Id != ownerId && targetMaxRole >= modMaxRole) - || target.Id == ownerId) - { - await Response().Error(strs.hierarchy).SendAsync(); - return false; - } - - return true; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public Task Warn(IGuildUser user, [Leftover] string reason = null) - => Warn(1, user, reason); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public async Task Warn(int weight, IGuildUser user, [Leftover] string reason = null) - { - if (weight <= 0) - return; - - if (!await CheckRoleHierarchy(user)) - return; - - var dmFailed = false; - try - { - await _sender.Response(user) - .Embed(_sender.CreateEmbed() - .WithErrorColor() - .WithDescription(GetText(strs.warned_on(ctx.Guild.ToString()))) - .AddField(GetText(strs.moderator), ctx.User.ToString()) - .AddField(GetText(strs.reason), reason ?? "-")) - .SendAsync(); - } - catch - { - dmFailed = true; - } - - WarningPunishment punishment; - try - { - punishment = await _service.Warn(ctx.Guild, user.Id, ctx.User, weight, reason); - } - catch (Exception ex) - { - Log.Warning(ex, "Exception occured while warning a user"); - var errorEmbed = _sender.CreateEmbed().WithErrorColor() - .WithDescription(GetText(strs.cant_apply_punishment)); - - if (dmFailed) - errorEmbed.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(errorEmbed).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed().WithOkColor(); - if (punishment is null) - embed.WithDescription(GetText(strs.user_warned(Format.Bold(user.ToString())))); - else - { - embed.WithDescription(GetText(strs.user_warned_and_punished(Format.Bold(user.ToString()), - Format.Bold(punishment.Punishment.ToString())))); - } - - if (dmFailed) - embed.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [EllieOptions] - [Priority(1)] - public async Task WarnExpire() - { - var expireDays = await _service.GetWarnExpire(ctx.Guild.Id); - - if (expireDays == 0) - await Response().Confirm(strs.warns_dont_expire).SendAsync(); - else - await Response().Error(strs.warns_expire_in(expireDays)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [EllieOptions] - [Priority(2)] - public async Task WarnExpire(int days, params string[] args) - { - if (days is < 0 or > 366) - return; - - var opts = OptionsParser.ParseFrom(args); - - await ctx.Channel.TriggerTypingAsync(); - - await _service.WarnExpireAsync(ctx.Guild.Id, days, opts.Delete); - if (days == 0) - { - await Response().Confirm(strs.warn_expire_reset).SendAsync(); - return; - } - - if (opts.Delete) - await Response().Confirm(strs.warn_expire_set_delete(Format.Bold(days.ToString()))).SendAsync(); - else - await Response().Confirm(strs.warn_expire_set_clear(Format.Bold(days.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [Priority(2)] - public Task Warnlog(int page, [Leftover] IGuildUser user = null) - { - user ??= (IGuildUser)ctx.User; - - return Warnlog(page, user.Id); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(3)] - public Task Warnlog(IGuildUser user = null) - { - user ??= (IGuildUser)ctx.User; - - return ctx.User.Id == user.Id || ((IGuildUser)ctx.User).GuildPermissions.BanMembers - ? Warnlog(user.Id) - : Task.CompletedTask; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [Priority(0)] - public Task Warnlog(int page, ulong userId) - => InternalWarnlog(userId, page - 1); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [Priority(1)] - public Task Warnlog(ulong userId) - => InternalWarnlog(userId, 0); - - private async Task InternalWarnlog(ulong userId, int inputPage) - { - if (inputPage < 0) - return; - - var allWarnings = _service.UserWarnings(ctx.Guild.Id, userId); - - await Response() - .Paginated() - .Items(allWarnings) - .PageSize(9) - .CurrentPage(inputPage) - .Page((warnings, page) => - { - var user = (ctx.Guild as SocketGuild)?.GetUser(userId)?.ToString() ?? userId.ToString(); - var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.warnlog_for(user))); - - if (!warnings.Any()) - embed.WithDescription(GetText(strs.warnings_none)); - else - { - var descText = GetText(strs.warn_count( - Format.Bold(warnings.Where(x => !x.Forgiven).Sum(x => x.Weight).ToString()), - Format.Bold(warnings.Sum(x => x.Weight).ToString()))); - - embed.WithDescription(descText); - - var i = page * 9; - foreach (var w in warnings) - { - i++; - var name = GetText(strs.warned_on_by(w.DateAdded?.ToString("dd.MM.yyy"), - w.DateAdded?.ToString("HH:mm"), - w.Moderator)); - - if (w.Forgiven) - name = $"{Format.Strikethrough(name)} {GetText(strs.warn_cleared_by(w.ForgivenBy))}"; - - - embed.AddField($"#`{i}` " + name, - Format.Code(GetText(strs.warn_weight(w.Weight))) + '\n' + w.Reason.TrimTo(1000)); - } - } - - return embed; - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public async Task WarnlogAll(int page = 1) - { - if (--page < 0) - return; - var allWarnings = _service.WarnlogAll(ctx.Guild.Id); - - await Response() - .Paginated() - .Items(allWarnings) - .PageSize(15) - .CurrentPage(page) - .Page((warnings, _) => - { - var ws = warnings - .Select(x => - { - var all = x.Count(); - var forgiven = x.Count(y => y.Forgiven); - var total = all - forgiven; - var usr = ((SocketGuild)ctx.Guild).GetUser(x.Key); - return (usr?.ToString() ?? x.Key.ToString()) - + $" | {total} ({all} - {forgiven})"; - }); - - return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.warnings_list)) - .WithDescription(string.Join("\n", ws)); - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public Task WarnDelete(IGuildUser user, int index) - => WarnDelete(user.Id, index); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPermission.Administrator)] - public async Task WarnDelete(ulong userId, int index) - { - if (--index < 0) - return; - - var warn = await _service.WarnDelete(userId, index); - - if (warn is null) - { - await Response().Error(strs.warning_not_found).SendAsync(); - return; - } - - await Response().Confirm(strs.warning_deleted(Format.Bold(index.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public Task Warnclear(IGuildUser user, int index = 0) - => Warnclear(user.Id, index); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public async Task Warnclear(ulong userId, int index = 0) - { - if (index < 0) - return; - - var success = await _service.WarnClearAsync(ctx.Guild.Id, userId, index, ctx.User.ToString()); - var userStr = Format.Bold((ctx.Guild as SocketGuild)?.GetUser(userId)?.ToString() ?? userId.ToString()); - if (index == 0) - await Response().Error(strs.warnings_cleared(userStr)).SendAsync(); - else - { - if (success) - await Response().Confirm(strs.warning_cleared(Format.Bold(index.ToString()), userStr)).SendAsync(); - else - await Response().Error(strs.warning_clear_fail).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [Priority(1)] - public async Task WarnPunish( - int number, - AddRole _, - IRole role, - StoopidTime time = null) - { - var punish = PunishmentAction.AddRole; - - if (ctx.Guild.OwnerId != ctx.User.Id - && role.Position >= ((IGuildUser)ctx.User).GetRoles().Max(x => x.Position)) - { - await Response().Error(strs.role_too_high).SendAsync(); - return; - } - - var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time, role); - - if (!success) - return; - - if (time is null) - { - await Response() - .Confirm(strs.warn_punish_set(Format.Bold(punish.ToString()), - Format.Bold(number.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.warn_punish_set_timed(Format.Bold(punish.ToString()), - Format.Bold(number.ToString()), - Format.Bold(time.Input))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public async Task WarnPunish(int number, PunishmentAction punish, StoopidTime time = null) - { - // this should never happen. Addrole has its own method with higher priority - // also disallow warn punishment for getting warned - if (punish is PunishmentAction.AddRole or PunishmentAction.Warn) - return; - - // you must specify the time for timeout - if (punish is PunishmentAction.TimeOut && time is null) - return; - - var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time); - - if (!success) - return; - - if (time is null) - { - await Response() - .Confirm(strs.warn_punish_set(Format.Bold(punish.ToString()), - Format.Bold(number.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.warn_punish_set_timed(Format.Bold(punish.ToString()), - Format.Bold(number.ToString()), - Format.Bold(time.Input))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - public async Task WarnPunish(int number) - { - if (!_service.WarnPunishRemove(ctx.Guild.Id, number)) - return; - - await Response().Confirm(strs.warn_punish_rem(Format.Bold(number.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task WarnPunishList() - { - var ps = _service.WarnPunishList(ctx.Guild.Id); - - string list; - if (ps.Any()) - { - list = string.Join("\n", - ps.Select(x - => $"{x.Count} -> {x.Punishment} {(x.Punishment == PunishmentAction.AddRole ? $"<@&{x.RoleId}>" : "")} {(x.Time <= 0 ? "" : x.Time + "m")} ")); - } - else - list = GetText(strs.warnpl_none); - - await Response().Confirm(GetText(strs.warn_punish_list), list).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(1)] - public Task Ban(StoopidTime time, IUser user, [Leftover] string msg = null) - => Ban(time, user.Id, msg); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(0)] - public async Task Ban(StoopidTime time, ulong userId, [Leftover] string msg = null) - { - if (time.Time > TimeSpan.FromDays(49)) - return; - - var guildUser = await ((DiscordSocketClient)Context.Client).Rest.GetGuildUserAsync(ctx.Guild.Id, userId); - - - if (guildUser is not null && !await CheckRoleHierarchy(guildUser)) - return; - - var dmFailed = false; - - if (guildUser is not null) - { - try - { - var defaultMessage = GetText(strs.bandm(Format.Bold(ctx.Guild.Name), msg)); - var smartText = - await _service.GetBanUserDmEmbed(Context, guildUser, defaultMessage, msg, time.Time); - if (smartText is not null) - await Response().User(guildUser).Text(smartText).SendAsync(); - } - catch - { - dmFailed = true; - } - } - - var user = await ctx.Client.GetUserAsync(userId); - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - await _mute.TimedBan(ctx.Guild, userId, time.Time, (ctx.User + " | " + msg).TrimTo(512), banPrune); - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField(GetText(strs.username), user?.ToString() ?? userId.ToString(), true) - .AddField("ID", userId.ToString(), true) - .AddField(GetText(strs.duration), - time.Time.ToPrettyStringHm(), - true); - - if (dmFailed) - toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(0)] - public async Task Ban(ulong userId, [Leftover] string msg = null) - { - var user = await ((DiscordSocketClient)Context.Client).Rest.GetGuildUserAsync(ctx.Guild.Id, userId); - if (user is null) - { - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - await ctx.Guild.AddBanAsync(userId, banPrune, (ctx.User + " | " + msg).TrimTo(512)); - - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField("ID", userId.ToString(), true)) - .SendAsync(); - } - else - await Ban(user, msg); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(2)] - public async Task Ban(IGuildUser user, [Leftover] string msg = null) - { - if (!await CheckRoleHierarchy(user)) - return; - - var dmFailed = false; - - try - { - var defaultMessage = GetText(strs.bandm(Format.Bold(ctx.Guild.Name), msg)); - var embed = await _service.GetBanUserDmEmbed(Context, user, defaultMessage, msg, null); - if (embed is not null) - await Response().User(user).Text(embed).SendAsync(); - } - catch - { - dmFailed = true; - } - - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - await ctx.Guild.AddBanAsync(user, banPrune, (ctx.User + " | " + msg).TrimTo(512)); - - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); - - if (dmFailed) - toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - public async Task BanPrune(int days) - { - if (days < 0 || days > 7) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - await _service.SetBanPruneAsync(ctx.Guild.Id, days); - - if (days == 0) - await Response().Confirm(strs.ban_prune_disabled).SendAsync(); - else - await Response().Confirm(strs.ban_prune(days)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - public async Task BanMessage([Leftover] string message = null) - { - if (message is null) - { - var template = _service.GetBanTemplate(ctx.Guild.Id); - if (template is null) - { - await Response().Confirm(strs.banmsg_default).SendAsync(); - return; - } - - await Response().Confirm(template).SendAsync(); - return; - } - - _service.SetBanTemplate(ctx.Guild.Id, message); - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - public async Task BanMsgReset() - { - _service.SetBanTemplate(ctx.Guild.Id, null); - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(0)] - public Task BanMessageTest([Leftover] string reason = null) - => InternalBanMessageTest(reason, null); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Priority(1)] - public Task BanMessageTest(StoopidTime duration, [Leftover] string reason = null) - => InternalBanMessageTest(reason, duration.Time); - - private async Task InternalBanMessageTest(string reason, TimeSpan? duration) - { - var defaultMessage = GetText(strs.bandm(Format.Bold(ctx.Guild.Name), reason)); - var smartText = await _service.GetBanUserDmEmbed(Context, - (IGuildUser)ctx.User, - defaultMessage, - reason, - duration); - - if (smartText is null) - await Response().Confirm(strs.banmsg_disabled).SendAsync(); - else - { - try - { - await Response().User(ctx.User).Text(smartText).SendAsync(); - } - catch (Exception) - { - await Response().Error(strs.unable_to_dm_user).SendAsync(); - return; - } - - await ctx.OkAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - public async Task Unban([Leftover] string user) - { - var bans = await ctx.Guild.GetBansAsync().FlattenAsync(); - - var bun = bans.FirstOrDefault(x => x.User.ToString()!.ToLowerInvariant() == user.ToLowerInvariant()); - - if (bun is null) - { - await Response().Error(strs.user_not_found).SendAsync(); - return; - } - - await UnbanInternal(bun.User); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - public async Task Unban(ulong userId) - { - var bun = await ctx.Guild.GetBanAsync(userId); - - if (bun is null) - { - await Response().Error(strs.user_not_found).SendAsync(); - return; - } - - await UnbanInternal(bun.User); - } - - private async Task UnbanInternal(IUser user) - { - await ctx.Guild.RemoveBanAsync(user); - - await Response().Confirm(strs.unbanned_user(Format.Bold(user.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.KickMembers | GuildPerm.ManageMessages)] - [BotPerm(GuildPerm.BanMembers)] - public Task Softban(IGuildUser user, [Leftover] string msg = null) - => SoftbanInternal(user, msg); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.KickMembers | GuildPerm.ManageMessages)] - [BotPerm(GuildPerm.BanMembers)] - public async Task Softban(ulong userId, [Leftover] string msg = null) - { - var user = await ((DiscordSocketClient)Context.Client).Rest.GetGuildUserAsync(ctx.Guild.Id, userId); - if (user is null) - return; - - await SoftbanInternal(user, msg); - } - - private async Task SoftbanInternal(IGuildUser user, [Leftover] string msg = null) - { - if (!await CheckRoleHierarchy(user)) - return; - - var dmFailed = false; - - try - { - await Response() - .Channel(await user.CreateDMChannelAsync()) - .Error(strs.sbdm(Format.Bold(ctx.Guild.Name), msg)) - .SendAsync(); - } - catch - { - dmFailed = true; - } - - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - await ctx.Guild.AddBanAsync(user, banPrune, ("Softban | " + ctx.User + " | " + msg).TrimTo(512)); - try { await ctx.Guild.RemoveBanAsync(user); } - catch { await ctx.Guild.RemoveBanAsync(user); } - - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("☣ " + GetText(strs.sb_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); - - if (dmFailed) - toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.KickMembers)] - [BotPerm(GuildPerm.KickMembers)] - [Priority(1)] - public Task Kick(IGuildUser user, [Leftover] string msg = null) - => KickInternal(user, msg); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.KickMembers)] - [BotPerm(GuildPerm.KickMembers)] - [Priority(0)] - public async Task Kick(ulong userId, [Leftover] string msg = null) - { - var user = await ((DiscordSocketClient)Context.Client).Rest.GetGuildUserAsync(ctx.Guild.Id, userId); - if (user is null) - return; - - await KickInternal(user, msg); - } - - private async Task KickInternal(IGuildUser user, string msg = null) - { - if (!await CheckRoleHierarchy(user)) - return; - - var dmFailed = false; - - try - { - await Response() - .Channel(await user.CreateDMChannelAsync()) - .Error(GetText(strs.kickdm(Format.Bold(ctx.Guild.Name), msg))) - .SendAsync(); - } - catch - { - dmFailed = true; - } - - await user.KickAsync((ctx.User + " | " + msg).TrimTo(512)); - - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.kicked_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); - - if (dmFailed) - toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ModerateMembers)] - [BotPerm(GuildPerm.ModerateMembers)] - [Priority(2)] - public async Task Timeout(IUser globalUser, StoopidTime time, [Leftover] string msg = null) - { - var user = await ctx.Guild.GetUserAsync(globalUser.Id); - - if (user is null) - return; - - if (!await CheckRoleHierarchy(user)) - return; - - var dmFailed = false; - - try - { - var dmMessage = GetText(strs.timeoutdm(Format.Bold(ctx.Guild.Name), msg)); - await _sender.Response(user) - .Embed(_sender.CreateEmbed() - .WithPendingColor() - .WithDescription(dmMessage)) - .SendAsync(); - } - catch - { - dmFailed = true; - } - - await user.SetTimeOutAsync(time.Time); - - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⏳ " + GetText(strs.timedout_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); - - if (dmFailed) - toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); - - await Response().Embed(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [Ratelimit(30)] - public async Task MassBan(params string[] userStrings) - { - if (userStrings.Length == 0) - return; - - var missing = new List(); - var banning = new HashSet(); - - await ctx.Channel.TriggerTypingAsync(); - foreach (var userStr in userStrings) - { - if (ulong.TryParse(userStr, out var userId)) - { - IUser user = await ctx.Guild.GetUserAsync(userId) - ?? await ((DiscordSocketClient)Context.Client).Rest.GetGuildUserAsync(ctx.Guild.Id, - userId); - - if (user is null) - { - // if IGuildUser is null, try to get IUser - user = await ((DiscordSocketClient)Context.Client).Rest.GetUserAsync(userId); - - // only add to missing if *still* null - if (user is null) - { - missing.Add(userStr); - continue; - } - } - - //Hierachy checks only if the user is in the guild - if (user is IGuildUser gu && !await CheckRoleHierarchy(gu)) - return; - - banning.Add(user); - } - else - missing.Add(userStr); - } - - var missStr = string.Join("\n", missing); - if (string.IsNullOrWhiteSpace(missStr)) - missStr = "-"; - - var toSend = _sender.CreateEmbed() - .WithDescription(GetText(strs.mass_ban_in_progress(banning.Count))) - .AddField(GetText(strs.invalid(missing.Count)), missStr) - .WithPendingColor(); - - var banningMessage = await Response().Embed(toSend).SendAsync(); - - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - foreach (var toBan in banning) - { - try - { - await ctx.Guild.AddBanAsync(toBan.Id, banPrune, $"{ctx.User} | Massban"); - } - catch (Exception ex) - { - Log.Warning(ex, "Error banning {User} user in {GuildId} server", toBan.Id, ctx.Guild.Id); - } - } - - await banningMessage.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_ban_completed(banning.Count()))) - .AddField(GetText(strs.invalid(missing.Count)), missStr) - .WithOkColor() - .Build()); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.BanMembers)] - [BotPerm(GuildPerm.BanMembers)] - [OwnerOnly] - public async Task MassKill([Leftover] string people) - { - if (string.IsNullOrWhiteSpace(people)) - return; - - var (bans, missing) = _service.MassKill((SocketGuild)ctx.Guild, people); - - var missStr = string.Join("\n", missing); - if (string.IsNullOrWhiteSpace(missStr)) - missStr = "-"; - - //send a message but don't wait for it - var banningMessageTask = Response() - .Embed(_sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_kill_in_progress(bans.Count()))) - .AddField(GetText(strs.invalid(missing)), missStr) - .WithPendingColor()) - .SendAsync(); - - var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; - //do the banning - await Task.WhenAll(bans.Where(x => x.Id.HasValue) - .Select(x => ctx.Guild.AddBanAsync(x.Id.Value, - banPrune, - x.Reason, - new() - { - RetryMode = RetryMode.AlwaysRetry - }))); - - //wait for the message and edit it - var banningMessage = await banningMessageTask; - - await banningMessage.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_kill_completed(bans.Count()))) - .AddField(GetText(strs.invalid(missing)), missStr) - .WithOkColor() - .Build()); - } - - public class WarnExpireOptions : IEllieCommandOptions - { - [Option('d', "delete", Default = false, HelpText = "Delete warnings instead of clearing them.")] - public bool Delete { get; set; } = false; - - public void NormalizeOptions() - { - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs deleted file mode 100644 index 85dcb10..0000000 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ /dev/null @@ -1,629 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Permissions.Services; -using EllieBot.Db.Models; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Administration.Services; - -public class UserPunishService : IEService, IReadyExecutor -{ - private readonly MuteService _mute; - private readonly DbService _db; - private readonly BlacklistService _blacklistService; - private readonly BotConfigService _bcs; - private readonly DiscordSocketClient _client; - private readonly IReplacementService _repSvc; - - public event Func OnUserWarned = static delegate { return Task.CompletedTask; }; - - public UserPunishService( - MuteService mute, - DbService db, - BlacklistService blacklistService, - BotConfigService bcs, - DiscordSocketClient client, - IReplacementService repSvc) - { - _mute = mute; - _db = db; - _blacklistService = blacklistService; - _bcs = bcs; - _client = client; - _repSvc = repSvc; - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - using var expiryTimer = new PeriodicTimer(TimeSpan.FromHours(12)); - do - { - try - { - await CheckAllWarnExpiresAsync(); - } - catch (Exception ex) - { - Log.Error(ex, "Unexpected error while checking for warn expiries: {ErrorMessage}", ex.Message); - } - } while (await expiryTimer.WaitForNextTickAsync()); - } - - public async Task Warn( - IGuild guild, - ulong userId, - IUser mod, - long weight, - string reason) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(weight); - - var modName = mod.ToString(); - - if (string.IsNullOrWhiteSpace(reason)) - reason = "-"; - - var guildId = guild.Id; - - var warn = new Warning - { - UserId = userId, - GuildId = guildId, - Forgiven = false, - Reason = reason, - Moderator = modName, - Weight = weight - }; - - long previousCount; - List ps; - await using (var uow = _db.GetDbContext()) - { - ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; - - previousCount = uow.Set() - .ForId(guildId, userId) - .Where(w => !w.Forgiven && w.UserId == userId) - .Sum(x => x.Weight); - - uow.Set().Add(warn); - - await uow.SaveChangesAsync(); - } - - _ = OnUserWarned(warn); - - var totalCount = previousCount + weight; - - var p = ps.Where(x => x.Count > previousCount && x.Count <= totalCount) - .MaxBy(x => x.Count); - - if (p is not null) - { - var user = await guild.GetUserAsync(userId); - if (user is null) - return null; - - await ApplyPunishment(guild, user, mod, p.Punishment, p.Time, p.RoleId, "Warned too many times."); - return p; - } - - return null; - } - - public async Task ApplyPunishment( - IGuild guild, - IGuildUser user, - IUser mod, - PunishmentAction p, - int minutes, - ulong? roleId, - string reason) - { - if (!await CheckPermission(guild, p)) - return; - - int banPrune; - switch (p) - { - case PunishmentAction.Mute: - if (minutes == 0) - await _mute.MuteUser(user, mod, reason: reason); - else - await _mute.TimedMute(user, mod, TimeSpan.FromMinutes(minutes), reason: reason); - break; - case PunishmentAction.VoiceMute: - if (minutes == 0) - await _mute.MuteUser(user, mod, MuteType.Voice, reason); - else - await _mute.TimedMute(user, mod, TimeSpan.FromMinutes(minutes), MuteType.Voice, reason); - break; - case PunishmentAction.ChatMute: - if (minutes == 0) - await _mute.MuteUser(user, mod, MuteType.Chat, reason); - else - await _mute.TimedMute(user, mod, TimeSpan.FromMinutes(minutes), MuteType.Chat, reason); - break; - case PunishmentAction.Kick: - await user.KickAsync(reason); - break; - case PunishmentAction.Ban: - banPrune = await GetBanPruneAsync(user.GuildId) ?? 7; - if (minutes == 0) - await guild.AddBanAsync(user, reason: reason, pruneDays: banPrune); - else - await _mute.TimedBan(user.Guild, user.Id, TimeSpan.FromMinutes(minutes), reason, banPrune); - break; - case PunishmentAction.Softban: - banPrune = await GetBanPruneAsync(user.GuildId) ?? 7; - await guild.AddBanAsync(user, banPrune, $"Softban | {reason}"); - try - { - await guild.RemoveBanAsync(user); - } - catch - { - await guild.RemoveBanAsync(user); - } - - break; - case PunishmentAction.RemoveRoles: - await user.RemoveRolesAsync(user.GetRoles().Where(x => !x.IsManaged && x != x.Guild.EveryoneRole)); - break; - case PunishmentAction.AddRole: - if (roleId is null) - return; - var role = guild.GetRole(roleId.Value); - if (role is not null) - { - if (minutes == 0) - await user.AddRoleAsync(role); - else - await _mute.TimedRole(user, TimeSpan.FromMinutes(minutes), reason, role); - } - else - { - Log.Warning("Can't find role {RoleId} on server {GuildId} to apply punishment", - roleId.Value, - guild.Id); - } - - break; - case PunishmentAction.Warn: - await Warn(guild, user.Id, mod, 1, reason); - break; - case PunishmentAction.TimeOut: - await user.SetTimeOutAsync(TimeSpan.FromMinutes(minutes)); - break; - } - } - - /// - /// Used to prevent the bot from hitting 403's when it needs to - /// apply punishments with insufficient permissions - /// - /// Guild the punishment is applied in - /// Punishment to apply - /// Whether the bot has sufficient permissions - private async Task CheckPermission(IGuild guild, PunishmentAction punish) - { - var botUser = await guild.GetCurrentUserAsync(); - switch (punish) - { - case PunishmentAction.Mute: - return botUser.GuildPermissions.MuteMembers && botUser.GuildPermissions.ManageRoles; - case PunishmentAction.Kick: - return botUser.GuildPermissions.KickMembers; - case PunishmentAction.Ban: - return botUser.GuildPermissions.BanMembers; - case PunishmentAction.Softban: - return botUser.GuildPermissions.BanMembers; // ban + unban - case PunishmentAction.RemoveRoles: - return botUser.GuildPermissions.ManageRoles; - case PunishmentAction.ChatMute: - return botUser.GuildPermissions.ManageRoles; // adds ellie-mute role - case PunishmentAction.VoiceMute: - return botUser.GuildPermissions.MuteMembers; - case PunishmentAction.AddRole: - return botUser.GuildPermissions.ManageRoles; - case PunishmentAction.TimeOut: - return botUser.GuildPermissions.ModerateMembers; - default: - return true; - } - } - - public async Task CheckAllWarnExpiresAsync() - { - await using var uow = _db.GetDbContext(); - - var toClear = await uow.GetTable() - .Where(x => uow.GetTable() - .Count(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Clear) - > 0 - && x.Forgiven == false - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.GetTable() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .Select(x => x.Id) - .ToListAsyncLinqToDB(); - - var cleared = await uow.GetTable() - .Where(x => toClear.Contains(x.Id)) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = "expiry" - }); - - var toDelete = await uow.GetTable() - .Where(x => uow.GetTable() - .Count(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Delete) - > 0 - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.GetTable() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .Select(x => x.Id) - .ToListAsyncLinqToDB(); - - var deleted = await uow.GetTable() - .Where(x => toDelete.Contains(x.Id)) - .DeleteAsync(); - - if (cleared > 0 || deleted > 0) - { - Log.Information("Cleared {ClearedWarnings} warnings and deleted {DeletedWarnings} warnings due to expiry", - cleared, - toDelete.Count); - } - } - - public async Task CheckWarnExpiresAsync(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var config = uow.GuildConfigsForId(guildId, inc => inc); - - if (config.WarnExpireHours == 0) - return; - - if (config.WarnExpireAction == WarnExpireAction.Clear) - { - await uow.Set() - .Where(x => x.GuildId == guildId - && x.Forgiven == false - && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = "expiry" - }); - } - else if (config.WarnExpireAction == WarnExpireAction.Delete) - { - await uow.Set() - .Where(x => x.GuildId == guildId - && x.DateAdded < DateTime.UtcNow.AddHours(-config.WarnExpireHours)) - .DeleteAsync(); - } - - await uow.SaveChangesAsync(); - } - - public Task GetWarnExpire(ulong guildId) - { - using var uow = _db.GetDbContext(); - var config = uow.GuildConfigsForId(guildId, set => set); - return Task.FromResult(config.WarnExpireHours / 24); - } - - public async Task WarnExpireAsync(ulong guildId, int days, bool delete) - { - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(guildId, inc => inc); - - config.WarnExpireHours = days * 24; - config.WarnExpireAction = delete ? WarnExpireAction.Delete : WarnExpireAction.Clear; - await uow.SaveChangesAsync(); - - // no need to check for warn expires - if (config.WarnExpireHours == 0) - return; - } - - await CheckWarnExpiresAsync(guildId); - } - - public IGrouping[] WarnlogAll(ulong gid) - { - using var uow = _db.GetDbContext(); - return uow.Set().GetForGuild(gid).GroupBy(x => x.UserId).ToArray(); - } - - public Warning[] UserWarnings(ulong gid, ulong userId) - { - using var uow = _db.GetDbContext(); - return uow.Set().ForId(gid, userId); - } - - public async Task WarnClearAsync( - ulong guildId, - ulong userId, - int index, - string moderator) - { - var toReturn = true; - await using var uow = _db.GetDbContext(); - if (index == 0) - await uow.Set().ForgiveAll(guildId, userId, moderator); - else - toReturn = uow.Set().Forgive(guildId, userId, moderator, index - 1); - await uow.SaveChangesAsync(); - return toReturn; - } - - public bool WarnPunish( - ulong guildId, - int number, - PunishmentAction punish, - StoopidTime time, - IRole role = null) - { - // these 3 don't make sense with time - if (punish is PunishmentAction.Softban or PunishmentAction.Kick or PunishmentAction.RemoveRoles - && time is not null) - return false; - if (number <= 0 || (time is not null && time.Time > TimeSpan.FromDays(49))) - return false; - - if (punish is PunishmentAction.AddRole && role is null) - return false; - - if (punish is PunishmentAction.TimeOut && time is null) - return false; - - using var uow = _db.GetDbContext(); - var ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; - var toDelete = ps.Where(x => x.Count == number); - - uow.RemoveRange(toDelete); - - ps.Add(new() - { - Count = number, - Punishment = punish, - Time = (int?)time?.Time.TotalMinutes ?? 0, - RoleId = punish == PunishmentAction.AddRole ? role!.Id : default(ulong?) - }); - uow.SaveChanges(); - return true; - } - - public bool WarnPunishRemove(ulong guildId, int number) - { - if (number <= 0) - return false; - - using var uow = _db.GetDbContext(); - var ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; - var p = ps.FirstOrDefault(x => x.Count == number); - - if (p is not null) - { - uow.Remove(p); - uow.SaveChanges(); - } - - return true; - } - - public WarningPunishment[] WarnPunishList(ulong guildId) - { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(guildId, gc => gc.Include(x => x.WarnPunishments)) - .WarnPunishments.OrderBy(x => x.Count) - .ToArray(); - } - - public (IReadOnlyCollection<(string Original, ulong? Id, string Reason)> Bans, int Missing) MassKill( - SocketGuild guild, - string people) - { - var gusers = guild.Users; - //get user objects and reasons - var bans = people.Split("\n") - .Select(x => - { - var split = x.Trim().Split(" "); - - var reason = string.Join(" ", split.Skip(1)); - - if (ulong.TryParse(split[0], out var id)) - return (Original: split[0], Id: id, Reason: reason); - - return (Original: split[0], - gusers.FirstOrDefault(u => u.ToString().ToLowerInvariant() == x)?.Id, - Reason: reason); - }) - .ToArray(); - - //if user is null, means that person couldn't be found - var missing = bans.Count(x => !x.Id.HasValue); - - //get only data for found users - var found = bans.Where(x => x.Id.HasValue).Select(x => x.Id.Value).ToList(); - - _ = _blacklistService.BlacklistUsers(found); - - return (bans, missing); - } - - public string GetBanTemplate(ulong guildId) - { - using var uow = _db.GetDbContext(); - var template = uow.Set().AsQueryable().FirstOrDefault(x => x.GuildId == guildId); - return template?.Text; - } - - public void SetBanTemplate(ulong guildId, string text) - { - using var uow = _db.GetDbContext(); - var template = uow.Set().AsQueryable().FirstOrDefault(x => x.GuildId == guildId); - - if (text is null) - { - if (template is null) - return; - - uow.Remove(template); - } - else if (template is null) - { - uow.Set() - .Add(new() - { - GuildId = guildId, - Text = text - }); - } - else - template.Text = text; - - uow.SaveChanges(); - } - - public async Task SetBanPruneAsync(ulong guildId, int? pruneDays) - { - await using var ctx = _db.GetDbContext(); - await ctx.Set() - .ToLinqToDBTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - Text = null, - DateAdded = DateTime.UtcNow, - PruneDays = pruneDays - }, - old => new() - { - PruneDays = pruneDays - }, - () => new() - { - GuildId = guildId - }); - } - - public async Task GetBanPruneAsync(ulong guildId) - { - await using var ctx = _db.GetDbContext(); - return await ctx.Set() - .Where(x => x.GuildId == guildId) - .Select(x => x.PruneDays) - .FirstOrDefaultAsyncLinqToDB(); - } - - public Task GetBanUserDmEmbed( - ICommandContext context, - IGuildUser target, - string defaultMessage, - string banReason, - TimeSpan? duration) - => GetBanUserDmEmbed((DiscordSocketClient)context.Client, - (SocketGuild)context.Guild, - (IGuildUser)context.User, - target, - defaultMessage, - banReason, - duration); - - public async Task GetBanUserDmEmbed( - DiscordSocketClient client, - SocketGuild guild, - IGuildUser moderator, - IGuildUser target, - string defaultMessage, - string banReason, - TimeSpan? duration) - { - var template = GetBanTemplate(guild.Id); - - banReason = string.IsNullOrWhiteSpace(banReason) ? "-" : banReason; - - var repCtx = new ReplacementContext(client, guild) - .WithOverride("%ban.mod%", () => moderator.ToString()) - .WithOverride("%ban.mod.fullname%", () => moderator.ToString()) - .WithOverride("%ban.mod.name%", () => moderator.Username) - .WithOverride("%ban.mod.discrim%", () => moderator.Discriminator) - .WithOverride("%ban.user%", () => target.ToString()) - .WithOverride("%ban.user.fullname%", () => target.ToString()) - .WithOverride("%ban.user.name%", () => target.Username) - .WithOverride("%ban.user.discrim%", () => target.Discriminator) - .WithOverride("%reason%", () => banReason) - .WithOverride("%ban.reason%", () => banReason) - .WithOverride("%ban.duration%", - () => duration?.ToString(@"d\.hh\:mm") ?? "perma"); - - - // if template isn't set, use the old message style - if (string.IsNullOrWhiteSpace(template)) - { - template = JsonConvert.SerializeObject(new - { - color = _bcs.Data.Color.Error.PackedValue >> 8, - description = defaultMessage - }); - } - // if template is set to "-" do not dm the user - else if (template == "-") - return default; - // if template is an embed, send that embed with replacements - // otherwise, treat template as a regular string with replacements - else if (SmartText.CreateFrom(template) is not { IsEmbed: true } or { IsEmbedArray: true }) - { - template = JsonConvert.SerializeObject(new - { - color = _bcs.Data.Color.Error.PackedValue >> 8, - description = template - }); - } - - var output = SmartText.CreateFrom(template); - return await _repSvc.ReplaceAsync(output, repCtx); - } - - public async Task WarnDelete(ulong userId, int index) - { - await using var uow = _db.GetDbContext(); - - var warn = await uow.GetTable() - .Where(x => x.UserId == userId) - .OrderByDescending(x => x.DateAdded) - .Skip(index) - .FirstOrDefaultAsyncLinqToDB(); - - if (warn is not null) - { - await uow.GetTable() - .Where(x => x.Id == warn.Id) - .DeleteAsync(); - } - - return warn; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/VcRole/VcRoleCommands.cs b/src/EllieBot/Modules/Administration/VcRole/VcRoleCommands.cs deleted file mode 100644 index a5f547a..0000000 --- a/src/EllieBot/Modules/Administration/VcRole/VcRoleCommands.cs +++ /dev/null @@ -1,77 +0,0 @@ -#nullable disable -using EllieBot.Modules.Administration.Services; - -namespace EllieBot.Modules.Administration; - -public partial class Administration -{ - [Group] - public partial class VcRoleCommands : EllieModule - { - [Cmd] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [RequireContext(ContextType.Guild)] - public async Task VcRoleRm(ulong vcId) - { - if (_service.RemoveVcRole(ctx.Guild.Id, vcId)) - await Response().Confirm(strs.vcrole_removed(Format.Bold(vcId.ToString()))).SendAsync(); - else - await Response().Error(strs.vcrole_not_found).SendAsync(); - } - - [Cmd] - [UserPerm(GuildPerm.ManageRoles)] - [BotPerm(GuildPerm.ManageRoles)] - [RequireContext(ContextType.Guild)] - public async Task VcRole([Leftover] IRole role = null) - { - var user = (IGuildUser)ctx.User; - - var vc = user.VoiceChannel; - - if (vc is null || vc.GuildId != user.GuildId) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return; - } - - if (role is null) - { - if (_service.RemoveVcRole(ctx.Guild.Id, vc.Id)) - await Response().Confirm(strs.vcrole_removed(Format.Bold(vc.Name))).SendAsync(); - } - else - { - _service.AddVcRole(ctx.Guild.Id, role, vc.Id); - await Response().Confirm(strs.vcrole_added(Format.Bold(vc.Name), Format.Bold(role.Name))).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task VcRoleList() - { - var guild = (SocketGuild)ctx.Guild; - string text; - if (_service.VcRoles.TryGetValue(ctx.Guild.Id, out var roles)) - { - if (!roles.Any()) - text = GetText(strs.no_vcroles); - else - { - text = string.Join("\n", - roles.Select(x - => $"{Format.Bold(guild.GetVoiceChannel(x.Key)?.Name ?? x.Key.ToString())} => {x.Value}")); - } - } - else - text = GetText(strs.no_vcroles); - - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.vc_role_list)) - .WithDescription(text)).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs b/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs deleted file mode 100644 index 0ba9feb..0000000 --- a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs +++ /dev/null @@ -1,207 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Administration.Services; - -public class VcRoleService : IEService -{ - public ConcurrentDictionary> VcRoles { get; } - public ConcurrentDictionary> ToAssign { get; } - private readonly DbService _db; - private readonly DiscordSocketClient _client; - - public VcRoleService(DiscordSocketClient client, IBot bot, DbService db) - { - _db = db; - _client = client; - - _client.UserVoiceStateUpdated += ClientOnUserVoiceStateUpdated; - VcRoles = new(); - ToAssign = new(); - - using (var uow = db.GetDbContext()) - { - var guildIds = client.Guilds.Select(x => x.Id).ToList(); - uow.Set() - .AsQueryable() - .Include(x => x.VcRoleInfos) - .Where(x => guildIds.Contains(x.GuildId)) - .AsEnumerable() - .Select(InitializeVcRole) - .WhenAll(); - } - - Task.Run(async () => - { - while (true) - { - Task Selector(System.Collections.Concurrent.ConcurrentQueue<(bool, IGuildUser, IRole)> queue) - { - return Task.Run(async () => - { - while (queue.TryDequeue(out var item)) - { - var (add, user, role) = item; - - try - { - if (add) - { - if (!user.RoleIds.Contains(role.Id)) - await user.AddRoleAsync(role); - } - else - { - if (user.RoleIds.Contains(role.Id)) - await user.RemoveRoleAsync(role); - } - } - catch - { - } - - await Task.Delay(250); - } - }); - } - - await ToAssign.Values.Select(Selector).Append(Task.Delay(1000)).WhenAll(); - } - }); - - _client.LeftGuild += _client_LeftGuild; - bot.JoinedGuild += Bot_JoinedGuild; - } - - private Task Bot_JoinedGuild(GuildConfig arg) - { - // includeall no longer loads vcrole - // need to load new guildconfig with vc role included - using (var uow = _db.GetDbContext()) - { - var configWithVcRole = uow.GuildConfigsForId(arg.GuildId, set => set.Include(x => x.VcRoleInfos)); - _ = InitializeVcRole(configWithVcRole); - } - - return Task.CompletedTask; - } - - private Task _client_LeftGuild(SocketGuild arg) - { - VcRoles.TryRemove(arg.Id, out _); - ToAssign.TryRemove(arg.Id, out _); - return Task.CompletedTask; - } - - private async Task InitializeVcRole(GuildConfig gconf) - { - var g = _client.GetGuild(gconf.GuildId); - if (g is null) - return; - - var infos = new ConcurrentDictionary(); - var missingRoles = new List(); - VcRoles.AddOrUpdate(gconf.GuildId, infos, delegate { return infos; }); - foreach (var ri in gconf.VcRoleInfos) - { - var role = g.GetRole(ri.RoleId); - if (role is null) - { - missingRoles.Add(ri); - continue; - } - - infos.TryAdd(ri.VoiceChannelId, role); - } - - if (missingRoles.Any()) - { - await using var uow = _db.GetDbContext(); - uow.RemoveRange(missingRoles); - await uow.SaveChangesAsync(); - - Log.Warning("Removed {MissingRoleCount} missing roles from {ServiceName}", - missingRoles.Count, - nameof(VcRoleService)); - } - } - - public void AddVcRole(ulong guildId, IRole role, ulong vcId) - { - ArgumentNullException.ThrowIfNull(role); - - var guildVcRoles = VcRoles.GetOrAdd(guildId, new ConcurrentDictionary()); - - guildVcRoles.AddOrUpdate(vcId, role, (_, _) => role); - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set.Include(x => x.VcRoleInfos)); - var toDelete = conf.VcRoleInfos.FirstOrDefault(x => x.VoiceChannelId == vcId); // remove old one - if (toDelete is not null) - uow.Remove(toDelete); - conf.VcRoleInfos.Add(new() - { - VoiceChannelId = vcId, - RoleId = role.Id - }); // add new one - uow.SaveChanges(); - } - - public bool RemoveVcRole(ulong guildId, ulong vcId) - { - if (!VcRoles.TryGetValue(guildId, out var guildVcRoles)) - return false; - - if (!guildVcRoles.TryRemove(vcId, out _)) - return false; - - using var uow = _db.GetDbContext(); - var conf = uow.GuildConfigsForId(guildId, set => set.Include(x => x.VcRoleInfos)); - var toRemove = conf.VcRoleInfos.Where(x => x.VoiceChannelId == vcId).ToList(); - uow.RemoveRange(toRemove); - uow.SaveChanges(); - - return true; - } - - private Task ClientOnUserVoiceStateUpdated(SocketUser usr, SocketVoiceState oldState, SocketVoiceState newState) - { - if (usr is not SocketGuildUser gusr) - return Task.CompletedTask; - - var oldVc = oldState.VoiceChannel; - var newVc = newState.VoiceChannel; - _ = Task.Run(() => - { - try - { - if (oldVc != newVc) - { - ulong guildId; - guildId = newVc?.Guild.Id ?? oldVc.Guild.Id; - - if (VcRoles.TryGetValue(guildId, out var guildVcRoles)) - { - //remove old - if (oldVc is not null && guildVcRoles.TryGetValue(oldVc.Id, out var role)) - Assign(false, gusr, role); - //add new - if (newVc is not null && guildVcRoles.TryGetValue(newVc.Id, out role)) - Assign(true, gusr, role); - } - } - } - catch (Exception ex) - { - Log.Warning(ex, "Error in VcRoleService VoiceStateUpdate"); - } - }); - return Task.CompletedTask; - } - - private void Assign(bool v, SocketGuildUser gusr, IRole role) - { - var queue = ToAssign.GetOrAdd(gusr.Guild.Id, new System.Collections.Concurrent.ConcurrentQueue<(bool, IGuildUser, IRole)>()); - queue.Enqueue((v, gusr, role)); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/_common/SetServerBannerResult.cs b/src/EllieBot/Modules/Administration/_common/SetServerBannerResult.cs deleted file mode 100644 index bd3eaab..0000000 --- a/src/EllieBot/Modules/Administration/_common/SetServerBannerResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Administration._common.results; - -public enum SetServerBannerResult -{ - Success, - InvalidFileType, - Toolarge, - InvalidURL -} diff --git a/src/EllieBot/Modules/Administration/_common/SetServerIconResult.cs b/src/EllieBot/Modules/Administration/_common/SetServerIconResult.cs deleted file mode 100644 index f0d0b1a..0000000 --- a/src/EllieBot/Modules/Administration/_common/SetServerIconResult.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Administration._common.results; - -public enum SetServerIconResult -{ - Success, - InvalidFileType, - InvalidURL -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs b/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs deleted file mode 100644 index 1ed9504..0000000 --- a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs +++ /dev/null @@ -1,91 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; -using System.Runtime.CompilerServices; - -namespace EllieBot.Modules.EllieExpressions; - -public static class EllieExpressionExtensions -{ - private static string ResolveTriggerString(this string str, DiscordSocketClient client) - => str.Replace("%bot.mention%", client.CurrentUser.Mention, StringComparison.Ordinal); - - public static async Task Send( - this EllieExpression cr, - IUserMessage ctx, - IReplacementService repSvc, - DiscordSocketClient client, - IMessageSenderService sender) - { - var channel = cr.DmResponse ? await ctx.Author.CreateDMChannelAsync() : ctx.Channel; - - var trigger = cr.Trigger.ResolveTriggerString(client); - var substringIndex = trigger.Length; - if (cr.ContainsAnywhere) - { - var pos = ctx.Content.AsSpan().GetWordPosition(trigger); - if (pos == WordPosition.Start) - substringIndex += 1; - else if (pos == WordPosition.End) - substringIndex = ctx.Content.Length; - else if (pos == WordPosition.Middle) - substringIndex += ctx.Content.IndexOf(trigger, StringComparison.InvariantCulture); - } - - var canMentionEveryone = (ctx.Author as IGuildUser)?.GuildPermissions.MentionEveryone ?? true; - - var repCtx = new ReplacementContext(client: client, - guild: (ctx.Channel as ITextChannel)?.Guild as SocketGuild, - channel: ctx.Channel, - user: ctx.Author - ) - .WithOverride("%target%", - () => canMentionEveryone - ? ctx.Content[substringIndex..].Trim() - : ctx.Content[substringIndex..].Trim().SanitizeMentions(true)); - - var text = SmartText.CreateFrom(cr.Response); - text = await repSvc.ReplaceAsync(text, repCtx); - - return await sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static WordPosition GetWordPosition(this ReadOnlySpan str, in ReadOnlySpan word) - { - var wordIndex = str.IndexOf(word, StringComparison.OrdinalIgnoreCase); - if (wordIndex == -1) - return WordPosition.None; - - if (wordIndex == 0) - { - if (word.Length < str.Length && str.IsValidWordDivider(word.Length)) - return WordPosition.Start; - } - else if (wordIndex + word.Length == str.Length) - { - if (str.IsValidWordDivider(wordIndex - 1)) - return WordPosition.End; - } - else if (str.IsValidWordDivider(wordIndex - 1) && str.IsValidWordDivider(wordIndex + word.Length)) - return WordPosition.Middle; - - return WordPosition.None; - } - - private static bool IsValidWordDivider(this in ReadOnlySpan str, int index) - { - var ch = str[index]; - if (ch is >= 'a' and <= 'z' or >= 'A' and <= 'Z' or >= '1' and <= '9') - return false; - - return true; - } -} - -public enum WordPosition -{ - None, - Start, - Middle, - End -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs deleted file mode 100644 index ddb3624..0000000 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ /dev/null @@ -1,445 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.EllieExpressions; - -[Name("Expressions")] -public partial class EllieExpressions : EllieModule -{ - public enum All - { - All - } - - private readonly IBotCredentials _creds; - private readonly IHttpClientFactory _clientFactory; - - public EllieExpressions(IBotCredentials creds, IHttpClientFactory clientFactory) - { - _creds = creds; - _clientFactory = clientFactory; - } - - private bool AdminInGuildOrOwnerInDm() - => (ctx.Guild is null && _creds.IsOwner(ctx.User)) - || (ctx.Guild is not null && ((IGuildUser)ctx.User).GuildPermissions.Administrator); - - private async Task ExprAddInternalAsync(string key, string message) - { - if (string.IsNullOrWhiteSpace(message) || string.IsNullOrWhiteSpace(key)) - { - return; - } - - var ex = await _service.AddAsync(ctx.Guild?.Id, key, message); - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.expr_new)) - .WithDescription($"#{new kwum(ex.Id)}") - .AddField(GetText(strs.trigger), key) - .AddField(GetText(strs.response), - message.Length > 1024 ? GetText(strs.redacted_too_long) : message)) - .SendAsync(); - } - - [Cmd] - [UserPerm(GuildPerm.Administrator)] - public async Task ExprToggleGlobal() - { - var result = await _service.ToggleGlobalExpressionsAsync(ctx.Guild.Id); - if (result) - await Response().Confirm(strs.expr_global_disabled).SendAsync(); - else - await Response().Confirm(strs.expr_global_enabled).SendAsync(); - } - - [Cmd] - [UserPerm(GuildPerm.Administrator)] - public async Task ExprAddServer(string trigger, [Leftover] string response) - { - if (string.IsNullOrWhiteSpace(response) || string.IsNullOrWhiteSpace(trigger)) - { - return; - } - - await ExprAddInternalAsync(trigger, response); - } - - - [Cmd] - public async Task ExprAdd(string trigger, [Leftover] string response) - { - if (string.IsNullOrWhiteSpace(response) || string.IsNullOrWhiteSpace(trigger)) - { - return; - } - - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - await ExprAddInternalAsync(trigger, response); - } - - [Cmd] - public async Task ExprEdit(kwum id, [Leftover] string message) - { - var channel = ctx.Channel as ITextChannel; - if (string.IsNullOrWhiteSpace(message) || id < 0) - { - return; - } - - if (!IsValidExprEditor()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - var ex = await _service.EditAsync(ctx.Guild?.Id, id, message); - if (ex is not null) - { - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.expr_edited)) - .WithDescription($"#{id}") - .AddField(GetText(strs.trigger), ex.Trigger) - .AddField(GetText(strs.response), - message.Length > 1024 ? GetText(strs.redacted_too_long) : message)) - .SendAsync(); - } - else - { - await Response().Error(strs.expr_no_found_id).SendAsync(); - } - } - - private bool IsValidExprEditor() - => (ctx.Guild is not null && ((IGuildUser)ctx.User).GuildPermissions.Administrator) - || (ctx.Guild is null && _creds.IsOwner(ctx.User)); - - [Cmd] - [Priority(1)] - public async Task ExprList(int page = 1) - { - if (--page < 0 || page > 999) - { - return; - } - - var allExpressions = _service.GetExpressionsFor(ctx.Guild?.Id) - .OrderBy(x => x.Trigger) - .ToArray(); - - if (!allExpressions.Any()) - { - await Response().Error(strs.expr_no_found).SendAsync(); - return; - } - - await Response() - .Paginated() - .Items(allExpressions) - .PageSize(20) - .CurrentPage(page) - .Page((exprs, _) => - { - var desc = exprs - .Select(ex => $"{(ex.ContainsAnywhere ? "🗯" : "◾")}" - + $"{(ex.DmResponse ? "✉" : "◾")}" - + $"{(ex.AutoDeleteTrigger ? "❌" : "◾")}" - + $"`{(kwum)ex.Id}` {ex.Trigger}" - + (string.IsNullOrWhiteSpace(ex.Reactions) - ? string.Empty - : " // " + string.Join(" ", ex.GetReactions()))) - .Join('\n'); - - return _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.expressions)).WithDescription(desc); - }) - .SendAsync(); - } - - [Cmd] - public async Task ExprShow(kwum id) - { - var found = _service.GetExpression(ctx.Guild?.Id, id); - - if (found is null) - { - await Response().Error(strs.expr_no_found_id).SendAsync(); - return; - } - - var inter = CreateEditInteraction(id, found); - - await Response() - .Interaction(IsValidExprEditor() ? inter : null) - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithDescription($"#{id}") - .AddField(GetText(strs.trigger), found.Trigger.TrimTo(1024)) - .AddField(GetText(strs.response), - found.Response.TrimTo(1000).Replace("](", "]\\("))) - .SendAsync(); - } - - private EllieInteractionBase CreateEditInteraction(kwum id, EllieExpression found) - { - var modal = new ModalBuilder() - .WithCustomId("expr:edit_modal") - .WithTitle($"Edit expression {id}") - .AddTextInput(new TextInputBuilder() - .WithLabel(GetText(strs.response)) - .WithValue(found.Response) - .WithMinLength(1) - .WithCustomId("expr:edit_modal:response") - .WithStyle(TextInputStyle.Paragraph)); - - var inter = _inter.Create(ctx.User.Id, - new ButtonBuilder() - .WithEmote(Emoji.Parse("📝")) - .WithLabel("Edit") - .WithStyle(ButtonStyle.Primary) - .WithCustomId("test"), - modal, - async (sm) => - { - var msg = sm.Data.Components.FirstOrDefault()?.Value; - - await ExprEdit(id, msg); - } - ); - return inter; - } - - public async Task ExprDeleteInternalAsync(kwum id) - { - var ex = await _service.DeleteAsync(ctx.Guild?.Id, id); - - if (ex is not null) - { - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.expr_deleted)) - .WithDescription($"#{id}") - .AddField(GetText(strs.trigger), ex.Trigger.TrimTo(1024)) - .AddField(GetText(strs.response), ex.Response.TrimTo(1024))) - .SendAsync(); - } - else - { - await Response().Error(strs.expr_no_found_id).SendAsync(); - } - } - - [Cmd] - [UserPerm(GuildPerm.Administrator)] - [RequireContext(ContextType.Guild)] - public async Task ExprDeleteServer(kwum id) - => await ExprDeleteInternalAsync(id); - - [Cmd] - public async Task ExprDelete(kwum id) - { - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - await ExprDeleteInternalAsync(id); - } - - [Cmd] - public async Task ExprReact(kwum id, params string[] emojiStrs) - { - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - var ex = _service.GetExpression(ctx.Guild?.Id, id); - if (ex is null) - { - await Response().Error(strs.expr_no_found_id).SendAsync(); - return; - } - - if (emojiStrs.Length == 0) - { - await _service.ResetExprReactions(ctx.Guild?.Id, id); - await Response().Confirm(strs.expr_reset(Format.Bold(id.ToString()))).SendAsync(); - return; - } - - var succ = new List(); - foreach (var emojiStr in emojiStrs) - { - var emote = emojiStr.ToIEmote(); - - // i should try adding these emojis right away to the message, to make sure the bot can react with these emojis. If it fails, skip that emoji - try - { - await ctx.Message.AddReactionAsync(emote); - await Task.Delay(100); - succ.Add(emojiStr); - - if (succ.Count >= 3) - { - break; - } - } - catch { } - } - - if (succ.Count == 0) - { - await Response().Error(strs.invalid_emojis).SendAsync(); - return; - } - - await _service.SetExprReactions(ctx.Guild?.Id, id, succ); - - - await Response() - .Confirm(strs.expr_set(Format.Bold(id.ToString()), - succ.Select(static x => x.ToString()).Join(", "))) - .SendAsync(); - } - - [Cmd] - public Task ExprCa(kwum id) - => InternalExprEdit(id, ExprField.ContainsAnywhere); - - [Cmd] - public Task ExprDm(kwum id) - => InternalExprEdit(id, ExprField.DmResponse); - - [Cmd] - public Task ExprAd(kwum id) - => InternalExprEdit(id, ExprField.AutoDelete); - - [Cmd] - public Task ExprAt(kwum id) - => InternalExprEdit(id, ExprField.AllowTarget); - - [Cmd] - [OwnerOnly] - public async Task ExprsReload() - { - await _service.TriggerReloadExpressions(); - - await ctx.OkAsync(); - } - - private async Task InternalExprEdit(kwum id, ExprField option) - { - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - var (success, newVal) = await _service.ToggleExprOptionAsync(ctx.Guild?.Id, id, option); - if (!success) - { - await Response().Error(strs.expr_no_found_id).SendAsync(); - return; - } - - if (newVal) - { - await Response() - .Confirm(strs.option_enabled(Format.Code(option.ToString()), - Format.Code(id.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.option_disabled(Format.Code(option.ToString()), - Format.Code(id.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ExprClear() - { - if (await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithTitle("Expression clear") - .WithDescription("This will delete all expressions on this server."))) - { - var count = _service.DeleteAllExpressions(ctx.Guild.Id); - await Response().Confirm(strs.exprs_cleared(count)).SendAsync(); - } - } - - [Cmd] - public async Task ExprsExport() - { - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var serialized = _service.ExportExpressions(ctx.Guild?.Id); - await using var stream = await serialized.ToStream(); - await ctx.User.SendFileAsync(stream, $"exprs-export_{DateTime.UtcNow:yyyy-MM-dd-HH-mm-ss}_{(ctx.Guild?.Id.ToString() ?? "global")}.yml"); - } - - [Cmd] - [Ratelimit(300)] - public async Task ExprsImport([Leftover] string input = null) - { - if (!AdminInGuildOrOwnerInDm()) - { - await Response().Error(strs.expr_insuff_perms).SendAsync(); - return; - } - - input = input?.Trim(); - - _ = ctx.Channel.TriggerTypingAsync(); - - if (input is null) - { - var attachment = ctx.Message.Attachments.FirstOrDefault(); - if (attachment is null) - { - await Response().Error(strs.expr_import_no_input).SendAsync(); - return; - } - - using var client = _clientFactory.CreateClient(); - input = await client.GetStringAsync(attachment.Url); - - if (string.IsNullOrWhiteSpace(input)) - { - await Response().Error(strs.expr_import_no_input).SendAsync(); - return; - } - } - - var succ = await _service.ImportExpressionsAsync(ctx.Guild?.Id, input); - if (!succ) - { - await Response().Error(strs.expr_import_invalid_data).SendAsync(); - return; - } - - await ctx.OkAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs b/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs deleted file mode 100644 index a660b4d..0000000 --- a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs +++ /dev/null @@ -1,800 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Common.Yml; -using EllieBot.Db.Models; -using System.Runtime.CompilerServices; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Modules.Permissions.Services; -using YamlDotNet.Serialization; -using YamlDotNet.Serialization.NamingConventions; - -namespace EllieBot.Modules.EllieExpressions; - -public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor -{ - private const string MENTION_PH = "%bot.mention%"; - - private const string PREPEND_EXPORT = - """ - # Keys are triggers, Each key has a LIST of expressions in the following format: - # - res: Response string - # id: Alphanumeric id used for commands related to the expression. (Note, when using .exprsimport, a new id will be generated.) - # react: - # - - # at: Whether expression allows targets (see .h .exprat) - # ca: Whether expression expects trigger anywhere (see .h .exprca) - # dm: Whether expression DMs the response (see .h .exprdm) - # ad: Whether expression automatically deletes triggering message (see .h .exprad) - - - """; - - private static readonly ISerializer _exportSerializer = new SerializerBuilder() - .WithEventEmitter(args - => new MultilineScalarFlowStyleEmitter(args)) - .WithNamingConvention(CamelCaseNamingConvention.Instance) - .WithIndentedSequences() - .ConfigureDefaultValuesHandling(DefaultValuesHandling - .OmitDefaults) - .DisableAliases() - .Build(); - - public int Priority - => 0; - - private readonly object _gexprWriteLock = new(); - - private readonly TypedKey _gexprAddedKey = new("gexpr.added"); - private readonly TypedKey _gexprDeletedkey = new("gexpr.deleted"); - private readonly TypedKey _gexprEditedKey = new("gexpr.edited"); - private readonly TypedKey _exprsReloadedKey = new("exprs.reloaded"); - - // it is perfectly fine to have global expressions as an array - // 1. expressions are almost never added (compared to how many times they are being looped through) - // 2. only need write locks for this as we'll rebuild+replace the array on every edit - // 3. there's never many of them (at most a thousand, usually < 100) - private EllieExpression[] globalExpressions = Array.Empty(); - private ConcurrentDictionary newguildExpressions = new(); - - private readonly DbService _db; - - private readonly DiscordSocketClient _client; - - // private readonly PermissionService _perms; - // private readonly GlobalPermissionService _gperm; - // private readonly CmdCdService _cmdCds; - private readonly IPermissionChecker _permChecker; - private readonly ICommandHandler _cmd; - private readonly IBotStrings _strings; - private readonly IBot _bot; - private readonly IPubSub _pubSub; - private readonly IMessageSenderService _sender; - private readonly IReplacementService _repSvc; - private readonly Random _rng; - - private bool ready; - private ConcurrentHashSet _disabledGlobalExpressionGuilds; - private readonly PermissionService _pc; - - public EllieExpressionsService( - DbService db, - IBotStrings strings, - IBot bot, - DiscordSocketClient client, - ICommandHandler cmd, - IPubSub pubSub, - IMessageSenderService sender, - IReplacementService repSvc, - IPermissionChecker permChecker, - PermissionService pc) - { - _db = db; - _client = client; - _cmd = cmd; - _strings = strings; - _bot = bot; - _pubSub = pubSub; - _sender = sender; - _repSvc = repSvc; - _permChecker = permChecker; - _pc = pc; - _rng = new EllieRandom(); - - _pubSub.Sub(_exprsReloadedKey, OnExprsShouldReload); - pubSub.Sub(_gexprAddedKey, OnGexprAdded); - pubSub.Sub(_gexprDeletedkey, OnGexprDeleted); - pubSub.Sub(_gexprEditedKey, OnGexprEdited); - - bot.JoinedGuild += OnJoinedGuild; - _client.LeftGuild += OnLeftGuild; - } - - private async Task ReloadInternal(IReadOnlyList allGuildIds) - { - await using var uow = _db.GetDbContext(); - var guildItems = await uow.Set() - .AsNoTracking() - .Where(x => allGuildIds.Contains(x.GuildId.Value)) - .ToListAsync(); - - newguildExpressions = guildItems.GroupBy(k => k.GuildId!.Value) - .ToDictionary(g => g.Key, - g => g.Select(x => - { - x.Trigger = x.Trigger.Replace(MENTION_PH, - _client.CurrentUser.Mention); - return x; - }) - .ToArray()) - .ToConcurrent(); - - _disabledGlobalExpressionGuilds = new(await uow.Set() - .Where(x => x.DisableGlobalExpressions) - .Select(x => x.GuildId) - .ToListAsyncLinqToDB()); - - lock (_gexprWriteLock) - { - var globalItems = uow.Set() - .AsNoTracking() - .Where(x => x.GuildId == null || x.GuildId == 0) - .Where(x => x.Trigger != null) - .AsEnumerable() - .Select(x => - { - x.Trigger = x.Trigger.Replace(MENTION_PH, _client.CurrentUser.Mention); - return x; - }) - .ToArray(); - - globalExpressions = globalItems; - } - - ready = true; - } - - private EllieExpression TryGetExpression(IUserMessage umsg) - { - if (!ready) - return null; - - if (umsg.Channel is not SocketTextChannel channel) - return null; - - var content = umsg.Content.Trim().ToLowerInvariant(); - - if (newguildExpressions.TryGetValue(channel.Guild.Id, out var expressions) && expressions.Length > 0) - { - var expr = MatchExpressions(content, expressions); - if (expr is not null) - return expr; - } - - if (_disabledGlobalExpressionGuilds.Contains(channel.Guild.Id)) - return null; - - var localGrs = globalExpressions; - - return MatchExpressions(content, localGrs); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private EllieExpression MatchExpressions(in ReadOnlySpan content, EllieExpression[] exprs) - { - var result = new List(1); - for (var i = 0; i < exprs.Length; i++) - { - var expr = exprs[i]; - var trigger = expr.Trigger; - if (content.Length > trigger.Length) - { - // if input is greater than the trigger, it can only work if: - // it has CA enabled - if (expr.ContainsAnywhere) - { - // if ca is enabled, we have to check if it is a word within the content - var wp = content.GetWordPosition(trigger); - - // if it is, then that's valid - if (wp != WordPosition.None) - result.Add(expr); - - // if it's not, then it cant' work under any circumstance, - // because content is greater than the trigger length - // so it can't be equal, and it's not contained as a word - continue; - } - - // if CA is disabled, and expr has AllowTarget, then the - // content has to start with the trigger followed by a space - if (expr.AllowTarget - && content.StartsWith(trigger, StringComparison.OrdinalIgnoreCase) - && content[trigger.Length] == ' ') - result.Add(expr); - } - else if (content.Length < expr.Trigger.Length) - { - // if input length is less than trigger length, it means - // that the reaction can never be triggered - } - else - { - // if input length is the same as trigger length - // reaction can only trigger if the strings are equal - if (content.SequenceEqual(expr.Trigger)) - result.Add(expr); - } - } - - if (result.Count == 0) - return null; - - var cancelled = result.FirstOrDefault(x => x.Response == "-"); - if (cancelled is not null) - return cancelled; - - return result[_rng.Next(0, result.Count)]; - } - - public async Task ExecOnMessageAsync(IGuild guild, IUserMessage msg) - { - // maybe this message is an expression - var expr = TryGetExpression(msg); - - if (expr is null || expr.Response == "-") - return false; - - try - { - if (guild is SocketGuild sg) - { - var result = await _permChecker.CheckPermsAsync( - guild, - msg.Channel, - msg.Author, - "ACTUALEXPRESSIONS", - expr.Trigger - ); - - if (!result.IsAllowed) - { - var cache = _pc.GetCacheFor(guild.Id); - if (cache.Verbose) - { - if (result.TryPickT3(out var disallowed, out _)) - { - var permissionMessage = _strings.GetText(strs.perm_prevent(disallowed.PermIndex + 1, - Format.Bold(disallowed.PermText)), - sg.Id); - - try - { - await _sender.Response(msg.Channel) - .Error(permissionMessage) - .SendAsync(); - } - catch - { - } - - Log.Information("{PermissionMessage}", permissionMessage); - } - } - - return true; - } - } - - var sentMsg = await expr.Send(msg, _repSvc, _client, _sender); - - var reactions = expr.GetReactions(); - foreach (var reaction in reactions) - { - try - { - await sentMsg.AddReactionAsync(reaction.ToIEmote()); - } - catch - { - Log.Warning("Unable to add reactions to message {Message} in server {GuildId}", - sentMsg.Id, - expr.GuildId); - break; - } - - await Task.Delay(1000); - } - - if (expr.AutoDeleteTrigger) - { - try - { - await msg.DeleteAsync(); - } - catch - { - } - } - - Log.Information("s: {GuildId} c: {ChannelId} u: {UserId} | {UserName} executed expression {Expr}", - guild.Id, - msg.Channel.Id, - msg.Author.Id, - msg.Author.ToString(), - expr.Trigger); - - return true; - } - catch (Exception ex) - { - Log.Warning(ex, "Error in Expression RunBehavior: {ErrorMessage}", ex.Message); - } - - return false; - } - - public async Task ResetExprReactions(ulong? maybeGuildId, int id) - { - EllieExpression expr; - await using var uow = _db.GetDbContext(); - expr = uow.Set().GetById(id); - if (expr is null) - return; - - expr.Reactions = string.Empty; - - await uow.SaveChangesAsync(); - } - - private Task UpdateInternalAsync(ulong? maybeGuildId, EllieExpression expr) - { - if (maybeGuildId is { } guildId) - UpdateInternal(guildId, expr); - else - return _pubSub.Pub(_gexprEditedKey, expr); - - return Task.CompletedTask; - } - - private void UpdateInternal(ulong? maybeGuildId, EllieExpression expr) - { - if (maybeGuildId is { } guildId) - { - newguildExpressions.AddOrUpdate(guildId, - [expr], - (_, old) => - { - var newArray = old.ToArray(); - for (var i = 0; i < newArray.Length; i++) - { - if (newArray[i].Id == expr.Id) - newArray[i] = expr; - } - - return newArray; - }); - } - else - { - lock (_gexprWriteLock) - { - var exprs = globalExpressions; - for (var i = 0; i < exprs.Length; i++) - { - if (exprs[i].Id == expr.Id) - exprs[i] = expr; - } - } - } - } - - private Task AddInternalAsync(ulong? maybeGuildId, EllieExpression expr) - { - // only do this for perf purposes - expr.Trigger = expr.Trigger.Replace(MENTION_PH, _client.CurrentUser.Mention); - - if (maybeGuildId is { } guildId) - newguildExpressions.AddOrUpdate(guildId, [expr], (_, old) => old.With(expr)); - else - return _pubSub.Pub(_gexprAddedKey, expr); - - return Task.CompletedTask; - } - - private Task DeleteInternalAsync(ulong? maybeGuildId, int id) - { - if (maybeGuildId is { } guildId) - { - newguildExpressions.AddOrUpdate(guildId, - Array.Empty(), - (key, old) => DeleteInternal(old, id, out _)); - - return Task.CompletedTask; - } - - lock (_gexprWriteLock) - { - var expr = Array.Find(globalExpressions, item => item.Id == id); - if (expr is not null) - return _pubSub.Pub(_gexprDeletedkey, expr.Id); - } - - return Task.CompletedTask; - } - - private EllieExpression[] DeleteInternal( - IReadOnlyList exprs, - int id, - out EllieExpression deleted) - { - deleted = null; - if (exprs is null || exprs.Count == 0) - return exprs as EllieExpression[] ?? exprs?.ToArray(); - - var newExprs = new EllieExpression[exprs.Count - 1]; - for (int i = 0, k = 0; i < exprs.Count; i++, k++) - { - if (exprs[i].Id == id) - { - deleted = exprs[i]; - k--; - continue; - } - - newExprs[k] = exprs[i]; - } - - return newExprs; - } - - public async Task SetExprReactions(ulong? guildId, int id, IEnumerable emojis) - { - EllieExpression expr; - await using (var uow = _db.GetDbContext()) - { - expr = uow.Set().GetById(id); - if (expr is null) - return; - - expr.Reactions = string.Join("@@@", emojis); - - await uow.SaveChangesAsync(); - } - - await UpdateInternalAsync(guildId, expr); - } - - public async Task<(bool Sucess, bool NewValue)> ToggleExprOptionAsync(ulong? guildId, int id, ExprField field) - { - var newVal = false; - EllieExpression expr; - await using (var uow = _db.GetDbContext()) - { - expr = uow.Set().GetById(id); - - if (expr is null || expr.GuildId != guildId) - return (false, false); - if (field == ExprField.AutoDelete) - newVal = expr.AutoDeleteTrigger = !expr.AutoDeleteTrigger; - else if (field == ExprField.ContainsAnywhere) - newVal = expr.ContainsAnywhere = !expr.ContainsAnywhere; - else if (field == ExprField.DmResponse) - newVal = expr.DmResponse = !expr.DmResponse; - else if (field == ExprField.AllowTarget) - newVal = expr.AllowTarget = !expr.AllowTarget; - - await uow.SaveChangesAsync(); - } - - await UpdateInternalAsync(guildId, expr); - - return (true, newVal); - } - - public EllieExpression GetExpression(ulong? guildId, int id) - { - using var uow = _db.GetDbContext(); - var expr = uow.Set().GetById(id); - if (expr is null || expr.GuildId != guildId) - return null; - - return expr; - } - - public int DeleteAllExpressions(ulong guildId) - { - using var uow = _db.GetDbContext(); - var count = uow.Set().ClearFromGuild(guildId); - uow.SaveChanges(); - - newguildExpressions.TryRemove(guildId, out _); - - return count; - } - - public bool ExpressionExists(ulong? guildId, string input) - { - input = input.ToLowerInvariant(); - - var gexprs = globalExpressions; - foreach (var t in gexprs) - { - if (t.Trigger == input) - return true; - } - - if (guildId is ulong gid && newguildExpressions.TryGetValue(gid, out var guildExprs)) - { - foreach (var t in guildExprs) - { - if (t.Trigger == input) - return true; - } - } - - return false; - } - - public string ExportExpressions(ulong? guildId) - { - var exprs = GetExpressionsFor(guildId); - - var exprsDict = exprs.GroupBy(x => x.Trigger).ToDictionary(x => x.Key, x => x.Select(ExportedExpr.FromModel)); - - return PREPEND_EXPORT + _exportSerializer.Serialize(exprsDict).UnescapeUnicodeCodePoints(); - } - - public async Task ImportExpressionsAsync(ulong? guildId, string input) - { - Dictionary> data; - try - { - data = Yaml.Deserializer.Deserialize>>(input); - if (data.Sum(x => x.Value.Count) == 0) - return false; - } - catch - { - return false; - } - - await using var uow = _db.GetDbContext(); - foreach (var entry in data) - { - var trigger = entry.Key; - await uow.Set() - .AddRangeAsync(entry.Value - .Where(expr => !string.IsNullOrWhiteSpace(expr.Res)) - .Select(expr => new EllieExpression - { - GuildId = guildId, - Response = expr.Res, - Reactions = expr.React?.Join("@@@"), - Trigger = trigger, - AllowTarget = expr.At, - ContainsAnywhere = expr.Ca, - DmResponse = expr.Dm, - AutoDeleteTrigger = expr.Ad - })); - } - - await uow.SaveChangesAsync(); - await TriggerReloadExpressions(); - return true; - } - - #region Event Handlers - - public async Task OnReadyAsync() - => await OnExprsShouldReload(true); - - private ValueTask OnExprsShouldReload(bool _) - => new(ReloadInternal(_bot.GetCurrentGuildIds())); - - private ValueTask OnGexprAdded(EllieExpression c) - { - lock (_gexprWriteLock) - { - var newGlobalReactions = new EllieExpression[globalExpressions.Length + 1]; - Array.Copy(globalExpressions, newGlobalReactions, globalExpressions.Length); - newGlobalReactions[globalExpressions.Length] = c; - globalExpressions = newGlobalReactions; - } - - return default; - } - - private ValueTask OnGexprEdited(EllieExpression c) - { - lock (_gexprWriteLock) - { - for (var i = 0; i < globalExpressions.Length; i++) - { - if (globalExpressions[i].Id == c.Id) - { - globalExpressions[i] = c; - return default; - } - } - - // if edited expr is not found?! - // add it - OnGexprAdded(c); - } - - return default; - } - - private ValueTask OnGexprDeleted(int id) - { - lock (_gexprWriteLock) - { - var newGlobalReactions = DeleteInternal(globalExpressions, id, out _); - globalExpressions = newGlobalReactions; - } - - return default; - } - - public Task TriggerReloadExpressions() - => _pubSub.Pub(_exprsReloadedKey, true); - - #endregion - - #region Client Event Handlers - - private Task OnLeftGuild(SocketGuild arg) - { - newguildExpressions.TryRemove(arg.Id, out _); - - return Task.CompletedTask; - } - - private async Task OnJoinedGuild(GuildConfig gc) - { - await using var uow = _db.GetDbContext(); - var exprs = await uow.Set().AsNoTracking().Where(x => x.GuildId == gc.GuildId).ToArrayAsync(); - - newguildExpressions[gc.GuildId] = exprs; - } - - #endregion - - #region Basic Operations - - public async Task AddAsync( - ulong? guildId, - string key, - string message, - bool ca = false, - bool ad = false, - bool dm = false) - { - key = key.ToLowerInvariant(); - var expr = new EllieExpression - { - GuildId = guildId, - Trigger = key, - Response = message, - ContainsAnywhere = ca, - AutoDeleteTrigger = ad, - DmResponse = dm - }; - - if (expr.Response.Contains("%target%", StringComparison.OrdinalIgnoreCase)) - expr.AllowTarget = true; - - await using (var uow = _db.GetDbContext()) - { - uow.Set().Add(expr); - await uow.SaveChangesAsync(); - } - - await AddInternalAsync(guildId, expr); - - return expr; - } - - public async Task EditAsync( - ulong? guildId, - int id, - string message, - bool? ca = null, - bool? ad = null, - bool? dm = null) - { - await using var uow = _db.GetDbContext(); - var expr = uow.Set().GetById(id); - - if (expr is null || expr.GuildId != guildId) - return null; - - // disable allowtarget if message had target, but it was removed from it - if (!message.Contains("%target%", StringComparison.OrdinalIgnoreCase) - && expr.Response.Contains("%target%", StringComparison.OrdinalIgnoreCase)) - expr.AllowTarget = false; - - expr.Response = message; - - // enable allow target if message is edited to contain target - if (expr.Response.Contains("%target%", StringComparison.OrdinalIgnoreCase)) - expr.AllowTarget = true; - - expr.ContainsAnywhere = ca ?? expr.ContainsAnywhere; - expr.AutoDeleteTrigger = ad ?? expr.AutoDeleteTrigger; - expr.DmResponse = dm ?? expr.DmResponse; - - await uow.SaveChangesAsync(); - await UpdateInternalAsync(guildId, expr); - - return expr; - } - - - public async Task DeleteAsync(ulong? guildId, int id) - { - await using var uow = _db.GetDbContext(); - var toDelete = uow.Set().GetById(id); - - if (toDelete is null) - return null; - - if ((toDelete.IsGlobal() && guildId is null) || guildId == toDelete.GuildId) - { - uow.Set().Remove(toDelete); - await uow.SaveChangesAsync(); - await DeleteInternalAsync(guildId, id); - return toDelete; - } - - return null; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public EllieExpression[] GetExpressionsFor(ulong? maybeGuildId) - { - if (maybeGuildId is { } guildId) - return newguildExpressions.TryGetValue(guildId, out var exprs) ? exprs : Array.Empty(); - - return globalExpressions; - } - - #endregion - - public async Task ToggleGlobalExpressionsAsync(ulong guildId) - { - await using var ctx = _db.GetDbContext(); - var gc = ctx.GuildConfigsForId(guildId, set => set); - var toReturn = gc.DisableGlobalExpressions = !gc.DisableGlobalExpressions; - await ctx.SaveChangesAsync(); - - if (toReturn) - _disabledGlobalExpressionGuilds.Add(guildId); - else - _disabledGlobalExpressionGuilds.TryRemove(guildId); - - return toReturn; - } - - - public async Task<(IReadOnlyCollection Exprs, int TotalCount)> FindExpressionsAsync( - ulong guildId, - string query, - int page) - { - await using var ctx = _db.GetDbContext(); - - if (newguildExpressions.TryGetValue(guildId, out var exprs)) - { - return (exprs.Where(x => x.Trigger.Contains(query)) - .Skip(page * 9) - .Take(9) - .ToArray(), exprs.Length); - } - - return ([], 0); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/ExportedExpr.cs b/src/EllieBot/Modules/Expressions/ExportedExpr.cs deleted file mode 100644 index 581c884..0000000 --- a/src/EllieBot/Modules/Expressions/ExportedExpr.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.EllieExpressions; - -public class ExportedExpr -{ - public string Res { get; set; } - public string Id { get; set; } - public bool Ad { get; set; } - public bool Dm { get; set; } - public bool At { get; set; } - public bool Ca { get; set; } - public string[] React; - - public static ExportedExpr FromModel(EllieExpression cr) - => new() - { - Res = cr.Response, - Id = ((kwum)cr.Id).ToString(), - Ad = cr.AutoDeleteTrigger, - At = cr.AllowTarget, - Ca = cr.ContainsAnywhere, - Dm = cr.DmResponse, - React = string.IsNullOrWhiteSpace(cr.Reactions) ? null : cr.GetReactions() - }; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/ExprField.cs b/src/EllieBot/Modules/Expressions/ExprField.cs deleted file mode 100644 index 9b9fa2f..0000000 --- a/src/EllieBot/Modules/Expressions/ExprField.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EllieBot.Modules.EllieExpressions; - -public enum ExprField -{ - AutoDelete, - DmResponse, - AllowTarget, - ContainsAnywhere, - Message -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Expressions/TypeReaders/CommandOrExprTypeReader.cs b/src/EllieBot/Modules/Expressions/TypeReaders/CommandOrExprTypeReader.cs deleted file mode 100644 index 716735e..0000000 --- a/src/EllieBot/Modules/Expressions/TypeReaders/CommandOrExprTypeReader.cs +++ /dev/null @@ -1,33 +0,0 @@ -#nullable disable -using EllieBot.Modules.EllieExpressions; - -namespace EllieBot.Common.TypeReaders; - -public sealed class CommandOrExprTypeReader : EllieTypeReader -{ - private readonly CommandService _cmds; - private readonly ICommandHandler _commandHandler; - private readonly EllieExpressionsService _exprs; - - public CommandOrExprTypeReader(CommandService cmds, EllieExpressionsService exprs, ICommandHandler commandHandler) - { - _cmds = cmds; - _exprs = exprs; - _commandHandler = commandHandler; - } - - public override async ValueTask> ReadAsync(ICommandContext ctx, string input) - { - if (_exprs.ExpressionExists(ctx.Guild?.Id, input)) - return TypeReaderResult.FromSuccess(new CommandOrExprInfo(input, CommandOrExprInfo.Type.Custom)); - - var cmd = await new CommandTypeReader(_commandHandler, _cmds).ReadAsync(ctx, input); - if (cmd.IsSuccess) - { - return TypeReaderResult.FromSuccess(new CommandOrExprInfo(((CommandInfo)cmd.Values.First().Value).Name, - CommandOrExprInfo.Type.Normal)); - } - - return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or expression found."); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs deleted file mode 100644 index 84f10d4..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs +++ /dev/null @@ -1,153 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; -using EllieBot.Modules.Games.Common; - -namespace EllieBot.Modules.Gambling.Common.AnimalRacing; - -public sealed class AnimalRace : IDisposable -{ - public enum Phase - { - WaitingForPlayers, - Running, - Ended - } - - public event Func OnStarted = delegate { return Task.CompletedTask; }; - public event Func OnStartingFailed = delegate { return Task.CompletedTask; }; - public event Func OnStateUpdate = delegate { return Task.CompletedTask; }; - public event Func OnEnded = delegate { return Task.CompletedTask; }; - - public Phase CurrentPhase { get; private set; } = Phase.WaitingForPlayers; - - public IReadOnlyCollection Users - => _users.ToList(); - - public List FinishedUsers { get; } = new(); - public int MaxUsers { get; } - - private readonly SemaphoreSlim _locker = new(1, 1); - private readonly HashSet _users = new(); - private readonly ICurrencyService _currency; - private readonly RaceOptions _options; - private readonly Queue _animalsQueue; - - public AnimalRace(RaceOptions options, ICurrencyService currency, IEnumerable availableAnimals) - { - _currency = currency; - _options = options; - _animalsQueue = new(availableAnimals); - MaxUsers = _animalsQueue.Count; - - if (_animalsQueue.Count == 0) - CurrentPhase = Phase.Ended; - } - - public void Initialize() //lame name - => _ = Task.Run(async () => - { - await Task.Delay(_options.StartTime * 1000); - - await _locker.WaitAsync(); - try - { - if (CurrentPhase != Phase.WaitingForPlayers) - return; - - await Start(); - } - finally { _locker.Release(); } - }); - - public async Task JoinRace(ulong userId, string userName, long bet = 0) - { - ArgumentOutOfRangeException.ThrowIfNegative(bet); - - var user = new AnimalRacingUser(userName, userId, bet); - - await _locker.WaitAsync(); - try - { - if (_users.Count == MaxUsers) - throw new AnimalRaceFullException(); - - if (CurrentPhase != Phase.WaitingForPlayers) - throw new AlreadyStartedException(); - - if (!await _currency.RemoveAsync(userId, bet, new("animalrace", "bet"))) - throw new NotEnoughFundsException(); - - if (_users.Contains(user)) - throw new AlreadyJoinedException(); - - var animal = _animalsQueue.Dequeue(); - user.Animal = animal; - _users.Add(user); - - if (_animalsQueue.Count == 0) //start if no more spots left - await Start(); - - return user; - } - finally { _locker.Release(); } - } - - private async Task Start() - { - CurrentPhase = Phase.Running; - if (_users.Count <= 1) - { - foreach (var user in _users) - { - if (user.Bet > 0) - await _currency.AddAsync(user.UserId, user.Bet, new("animalrace", "refund")); - } - - _ = OnStartingFailed?.Invoke(this); - CurrentPhase = Phase.Ended; - return; - } - - _ = OnStarted?.Invoke(this); - _ = Task.Run(async () => - { - var rng = new EllieRandom(); - while (!_users.All(x => x.Progress >= 60)) - { - foreach (var user in _users) - { - user.Progress += rng.Next(1, 11); - if (user.Progress >= 60) - user.Progress = 60; - } - - var finished = _users.Where(x => x.Progress >= 60 && !FinishedUsers.Contains(x)).Shuffle(); - - FinishedUsers.AddRange(finished); - - _ = OnStateUpdate?.Invoke(this); - await Task.Delay(2500); - } - - if (FinishedUsers[0].Bet > 0) - { - await _currency.AddAsync(FinishedUsers[0].UserId, - FinishedUsers[0].Bet * (_users.Count - 1), - new("animalrace", "win")); - } - - _ = OnEnded?.Invoke(this); - }); - } - - public void Dispose() - { - CurrentPhase = Phase.Ended; - OnStarted = null; - OnEnded = null; - OnStartingFailed = null; - OnStateUpdate = null; - _locker.Dispose(); - _users.Clear(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs deleted file mode 100644 index f4c99a8..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common.AnimalRacing; - -namespace EllieBot.Modules.Gambling.Services; - -public class AnimalRaceService : IEService -{ - public ConcurrentDictionary AnimalRaces { get; } = new(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs deleted file mode 100644 index 1f23cf6..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs +++ /dev/null @@ -1,197 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.AnimalRacing; -using EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Gambling; - -// wth is this, needs full rewrite -public partial class Gambling -{ - [Group] - public partial class AnimalRacingCommands : GamblingSubmodule - { - private readonly ICurrencyService _cs; - private readonly DiscordSocketClient _client; - private readonly GamesConfigService _gamesConf; - - private IUserMessage raceMessage; - - public AnimalRacingCommands( - ICurrencyService cs, - DiscordSocketClient client, - GamblingConfigService gamblingConf, - GamesConfigService gamesConf) - : base(gamblingConf) - { - _cs = cs; - _client = client; - _gamesConf = gamesConf; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public Task Race(params string[] args) - { - var (options, _) = OptionsParser.ParseFrom(new RaceOptions(), args); - - var ar = new AnimalRace(options, _cs, _gamesConf.Data.RaceAnimals.Shuffle()); - if (!_service.AnimalRaces.TryAdd(ctx.Guild.Id, ar)) - return Response() - .Error(GetText(strs.animal_race), GetText(strs.animal_race_already_started)) - .SendAsync(); - - ar.Initialize(); - - var count = 0; - - Task ClientMessageReceived(SocketMessage arg) - { - _ = Task.Run(() => - { - try - { - if (arg.Channel.Id == ctx.Channel.Id) - { - if (ar.CurrentPhase == AnimalRace.Phase.Running && ++count % 9 == 0) - raceMessage = null; - } - } - catch { } - }); - return Task.CompletedTask; - } - - Task ArOnEnded(AnimalRace race) - { - _client.MessageReceived -= ClientMessageReceived; - _service.AnimalRaces.TryRemove(ctx.Guild.Id, out _); - var winner = race.FinishedUsers[0]; - if (race.FinishedUsers[0].Bet > 0) - { - return Response() - .Confirm(GetText(strs.animal_race), - GetText(strs.animal_race_won_money(Format.Bold(winner.Username), - winner.Animal.Icon, - (race.FinishedUsers[0].Bet * (race.Users.Count - 1)) + CurrencySign))) - .SendAsync(); - } - - ar.Dispose(); - return Response() - .Confirm(GetText(strs.animal_race), - GetText(strs.animal_race_won(Format.Bold(winner.Username), winner.Animal.Icon))) - .SendAsync(); - } - - ar.OnStartingFailed += Ar_OnStartingFailed; - ar.OnStateUpdate += Ar_OnStateUpdate; - ar.OnEnded += ArOnEnded; - ar.OnStarted += Ar_OnStarted; - _client.MessageReceived += ClientMessageReceived; - - return Response() - .Confirm(GetText(strs.animal_race), - GetText(strs.animal_race_starting(options.StartTime)), - footer: GetText(strs.animal_race_join_instr(prefix))) - .SendAsync(); - } - - private Task Ar_OnStarted(AnimalRace race) - { - if (race.Users.Count == race.MaxUsers) - return Response().Confirm(GetText(strs.animal_race), GetText(strs.animal_race_full)).SendAsync(); - return Response() - .Confirm(GetText(strs.animal_race), - GetText(strs.animal_race_starting_with_x(race.Users.Count))) - .SendAsync(); - } - - private async Task Ar_OnStateUpdate(AnimalRace race) - { - var text = $@"|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚| -{string.Join("\n", race.Users.Select(p => -{ - var index = race.FinishedUsers.IndexOf(p); - var extra = index == -1 ? "" : $"#{index + 1} {(index == 0 ? "🏆" : "")}"; - return $"{(int)(p.Progress / 60f * 100),-2}%|{new string('‣', p.Progress) + p.Animal.Icon + extra}"; -}))} -|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚|"; - - var msg = raceMessage; - - if (msg is null) - raceMessage = await Response().Confirm(text).SendAsync(); - else - { - await msg.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.animal_race)) - .WithDescription(text) - .WithOkColor() - .Build()); - } - } - - private Task Ar_OnStartingFailed(AnimalRace race) - { - _service.AnimalRaces.TryRemove(ctx.Guild.Id, out _); - race.Dispose(); - return Response().Error(strs.animal_race_failed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task JoinRace([OverrideTypeReader(typeof(BalanceTypeReader))] long amount = default) - { - if (!await CheckBetOptional(amount)) - return; - - if (!_service.AnimalRaces.TryGetValue(ctx.Guild.Id, out var ar)) - { - await Response().Error(strs.race_not_exist).SendAsync(); - return; - } - - try - { - var user = await ar.JoinRace(ctx.User.Id, ctx.User.ToString(), amount); - if (amount > 0) - { - await Response() - .Confirm(GetText(strs.animal_race_join_bet(ctx.User.Mention, - user.Animal.Icon, - amount + CurrencySign))) - .SendAsync(); - } - else - await Response() - .Confirm(strs.animal_race_join(ctx.User.Mention, user.Animal.Icon)) - .SendAsync(); - } - catch (ArgumentOutOfRangeException) - { - //ignore if user inputed an invalid amount - } - catch (AlreadyJoinedException) - { - // just ignore this - } - catch (AlreadyStartedException) - { - //ignore - } - catch (AnimalRaceFullException) - { - await Response().Confirm(GetText(strs.animal_race), GetText(strs.animal_race_full)).SendAsync(); - } - catch (NotEnoughFundsException) - { - await Response().Error(GetText(strs.not_enough(CurrencySign))).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs deleted file mode 100644 index 814b475..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs +++ /dev/null @@ -1,26 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Common; - -namespace EllieBot.Modules.Gambling.Common.AnimalRacing; - -public class AnimalRacingUser -{ - public long Bet { get; } - public string Username { get; } - public ulong UserId { get; } - public RaceAnimal Animal { get; set; } - public int Progress { get; set; } - - public AnimalRacingUser(string username, ulong userId, long bet) - { - Bet = bet; - Username = username; - UserId = userId; - } - - public override bool Equals(object obj) - => obj is AnimalRacingUser x ? x.UserId == UserId : false; - - public override int GetHashCode() - => UserId.GetHashCode(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs deleted file mode 100644 index 914b6a4..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; - -public class AlreadyJoinedException : Exception -{ - public AlreadyJoinedException() - { - } - - public AlreadyJoinedException(string message) - : base(message) - { - } - - public AlreadyJoinedException(string message, Exception innerException) - : base(message, innerException) - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs deleted file mode 100644 index e662785..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; - -public class AlreadyStartedException : Exception -{ - public AlreadyStartedException() - { - } - - public AlreadyStartedException(string message) - : base(message) - { - } - - public AlreadyStartedException(string message, Exception innerException) - : base(message, innerException) - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs deleted file mode 100644 index 9a76b5b..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; - -public class AnimalRaceFullException : Exception -{ - public AnimalRaceFullException() - { - } - - public AnimalRaceFullException(string message) - : base(message) - { - } - - public AnimalRaceFullException(string message, Exception innerException) - : base(message, innerException) - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs deleted file mode 100644 index b827761..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.AnimalRacing.Exceptions; - -public class NotEnoughFundsException : Exception -{ - public NotEnoughFundsException() - { - } - - public NotEnoughFundsException(string message) - : base(message) - { - } - - public NotEnoughFundsException(string message, Exception innerException) - : base(message, innerException) - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/RaceOptions.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/RaceOptions.cs deleted file mode 100644 index fb0f8c9..0000000 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/RaceOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -using CommandLine; - -namespace EllieBot.Modules.Gambling.Common.AnimalRacing; - -public class RaceOptions : IEllieCommandOptions -{ - [Option('s', "start-time", Default = 20, Required = false)] - public int StartTime { get; set; } = 20; - - public void NormalizeOptions() - { - if (StartTime is < 10 or > 120) - StartTime = 20; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs b/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs deleted file mode 100644 index ee66b6e..0000000 --- a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs +++ /dev/null @@ -1,139 +0,0 @@ -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Name("Bank")] - [Group("bank")] - public partial class BankCommands : GamblingModule - { - private readonly IBankService _bank; - private readonly DiscordSocketClient _client; - - public BankCommands(GamblingConfigService gcs, - IBankService bank, - DiscordSocketClient client) : base(gcs) - { - _bank = bank; - _client = client; - } - - [Cmd] - public async Task BankDeposit([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - { - if (amount <= 0) - return; - - if (await _bank.DepositAsync(ctx.User.Id, amount)) - { - await Response().Confirm(strs.bank_deposited(N(amount))).SendAsync(); - } - else - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - } - - [Cmd] - public async Task BankWithdraw([OverrideTypeReader(typeof(BankBalanceTypeReader))] long amount) - { - if (amount <= 0) - return; - - if (await _bank.WithdrawAsync(ctx.User.Id, amount)) - { - await Response().Confirm(strs.bank_withdrew(N(amount))).SendAsync(); - } - else - { - await Response().Error(strs.bank_withdraw_insuff(CurrencySign)).SendAsync(); - } - } - - [Cmd] - public async Task BankBalance() - { - var bal = await _bank.GetBalanceAsync(ctx.User.Id); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(GetText(strs.bank_balance(N(bal)))); - - try - { - await Response().User(ctx.User).Embed(eb).SendAsync(); - await ctx.OkAsync(); - } - catch - { - await Response().Error(strs.cant_dm).SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task BankBalance([Leftover] IUser user) - { - var bal = await _bank.GetBalanceAsync(user.Id); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(GetText(strs.bank_balance_other(user.ToString(), N(bal)))); - - try - { - await Response().User(ctx.User).Embed(eb).SendAsync(); - await ctx.OkAsync(); - } - catch - { - await Response().Error(strs.cant_dm).SendAsync(); - } - } - - private async Task BankTakeInternalAsync(long amount, ulong userId) - { - if (await _bank.TakeAsync(userId, amount)) - { - await ctx.OkAsync(); - return; - } - - await Response().Error(strs.take_fail(N(amount), - _client.GetUser(userId)?.ToString() - ?? userId.ToString(), - CurrencySign)).SendAsync(); - } - - private async Task BankAwardInternalAsync(long amount, ulong userId) - { - if (await _bank.AwardAsync(userId, amount)) - { - await ctx.OkAsync(); - return; - } - - } - - [Cmd] - [OwnerOnly] - [Priority(1)] - public async Task BankTake(long amount, [Leftover] IUser user) - => await BankTakeInternalAsync(amount, user.Id); - - [Cmd] - [OwnerOnly] - [Priority(0)] - public async Task BankTake(long amount, ulong userId) - => await BankTakeInternalAsync(amount, userId); - - [Cmd] - [OwnerOnly] - public async Task BankAward(long amount, [Leftover] IUser user) - => await BankAwardInternalAsync(amount, user.Id); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Bank/BankService.cs b/src/EllieBot/Modules/Gambling/Bank/BankService.cs deleted file mode 100644 index 0d75607..0000000 --- a/src/EllieBot/Modules/Gambling/Bank/BankService.cs +++ /dev/null @@ -1,115 +0,0 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Bank; - -public sealed class BankService : IBankService, IEService -{ - private readonly ICurrencyService _cur; - private readonly DbService _db; - - public BankService(ICurrencyService cur, DbService db) - { - _cur = cur; - _db = db; - } - - public async Task AwardAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); - - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - UserId = userId, - Balance = amount - }, - (old) => new() - { - Balance = old.Balance + amount - }, - () => new() - { - UserId = userId - }); - - return true; - } - - public async Task TakeAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); - - await using var ctx = _db.GetDbContext(); - var rows = await ctx.Set() - .ToLinqToDBTable() - .Where(x => x.UserId == userId && x.Balance >= amount) - .UpdateAsync((old) => new() - { - Balance = old.Balance - amount - }); - - return rows > 0; - } - - public async Task DepositAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); - - if (!await _cur.RemoveAsync(userId, amount, new("bank", "deposit"))) - return false; - - await using var ctx = _db.GetDbContext(); - await ctx.Set() - .ToLinqToDBTable() - .InsertOrUpdateAsync(() => new() - { - UserId = userId, - Balance = amount - }, - (old) => new() - { - Balance = old.Balance + amount - }, - () => new() - { - UserId = userId - }); - - return true; - } - - public async Task WithdrawAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount); - - await using var ctx = _db.GetDbContext(); - var rows = await ctx.Set() - .ToLinqToDBTable() - .Where(x => x.UserId == userId && x.Balance >= amount) - .UpdateAsync((old) => new() - { - Balance = old.Balance - amount - }); - - if (rows > 0) - { - await _cur.AddAsync(userId, amount, new("bank", "withdraw")); - return true; - } - - return false; - } - - public async Task GetBalanceAsync(ulong userId) - { - await using var ctx = _db.GetDbContext(); - return (await ctx.Set() - .ToLinqToDBTable() - .FirstOrDefaultAsync(x => x.UserId == userId)) - ?.Balance - ?? 0; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs deleted file mode 100644 index 772cb4f..0000000 --- a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs +++ /dev/null @@ -1,183 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Blackjack; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - public partial class BlackJackCommands : GamblingSubmodule - { - public enum BjAction - { - Hit = int.MinValue, - Stand, - Double - } - - private readonly ICurrencyService _cs; - private readonly DbService _db; - private IUserMessage msg; - - public BlackJackCommands(ICurrencyService cs, DbService db, GamblingConfigService gamblingConf) - : base(gamblingConf) - { - _cs = cs; - _db = db; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task BlackJack([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - { - if (!await CheckBetMandatory(amount)) - return; - - var newBj = new Blackjack(_cs); - Blackjack bj; - if (newBj == (bj = _service.Games.GetOrAdd(ctx.Channel.Id, newBj))) - { - if (!await bj.Join(ctx.User, amount)) - { - _service.Games.TryRemove(ctx.Channel.Id, out _); - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - bj.StateUpdated += Bj_StateUpdated; - bj.GameEnded += Bj_GameEnded; - bj.Start(); - - await Response().NoReply().Confirm(strs.bj_created(ctx.User.ToString())).SendAsync(); - } - else - { - if (await bj.Join(ctx.User, amount)) - await Response().NoReply().Confirm(strs.bj_joined(ctx.User.ToString())).SendAsync(); - else - { - Log.Information("{User} can't join a blackjack game as it's in {BlackjackState} state already", - ctx.User, - bj.State); - } - } - - await ctx.Message.DeleteAsync(); - } - - private Task Bj_GameEnded(Blackjack arg) - { - _service.Games.TryRemove(ctx.Channel.Id, out _); - return Task.CompletedTask; - } - - private async Task Bj_StateUpdated(Blackjack bj) - { - try - { - if (msg is not null) - _ = msg.DeleteAsync(); - - var c = bj.Dealer.Cards.Select(x => x.GetEmojiString()) - .ToList(); - var dealerIcon = "❔ "; - if (bj.State == Blackjack.GameState.Ended) - { - if (bj.Dealer.GetHandValue() == 21) - dealerIcon = "💰 "; - else if (bj.Dealer.GetHandValue() > 21) - dealerIcon = "💥 "; - else - dealerIcon = "🏁 "; - } - - var cStr = string.Concat(c.Select(x => x[..^1] + " ")); - cStr += "\n" + string.Concat(c.Select(x => x.Last() + " ")); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("BlackJack") - .AddField($"{dealerIcon} Dealer's Hand | Value: {bj.Dealer.GetHandValue()}", cStr); - - if (bj.CurrentUser is not null) - embed.WithFooter($"Player to make a choice: {bj.CurrentUser.DiscordUser}"); - - foreach (var p in bj.Players) - { - c = p.Cards.Select(x => x.GetEmojiString()).ToList(); - cStr = "-\t" + string.Concat(c.Select(x => x[..^1] + " ")); - cStr += "\n-\t" + string.Concat(c.Select(x => x.Last() + " ")); - var full = $"{p.DiscordUser.ToString().TrimTo(20)} | Bet: {N(p.Bet)} | Value: {p.GetHandValue()}"; - if (bj.State == Blackjack.GameState.Ended) - { - if (p.State == User.UserState.Lost) - full = "❌ " + full; - else - full = "✅ " + full; - } - else if (p == bj.CurrentUser) - full = "▶ " + full; - else if (p.State == User.UserState.Stand) - full = "⏹ " + full; - else if (p.State == User.UserState.Bust) - full = "💥 " + full; - else if (p.State == User.UserState.Blackjack) - full = "💰 " + full; - - embed.AddField(full, cStr); - } - - msg = await Response().Embed(embed).SendAsync(); - } - catch - { - } - } - - private string UserToString(User x) - { - var playerName = x.State == User.UserState.Bust - ? Format.Strikethrough(x.DiscordUser.ToString().TrimTo(30)) - : x.DiscordUser.ToString(); - - // var hand = $"{string.Concat(x.Cards.Select(y => "〖" + y.GetEmojiString() + "〗"))}"; - - - return $"{playerName} | Bet: {x.Bet}\n"; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Hit() - => InternalBlackJack(BjAction.Hit); - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Stand() - => InternalBlackJack(BjAction.Stand); - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Double() - => InternalBlackJack(BjAction.Double); - - private async Task InternalBlackJack(BjAction a) - { - if (!_service.Games.TryGetValue(ctx.Channel.Id, out var bj)) - return; - - if (a == BjAction.Hit) - await bj.Hit(ctx.User); - else if (a == BjAction.Stand) - await bj.Stand(ctx.User); - else if (a == BjAction.Double) - { - if (!await bj.Double(ctx.User)) - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - - await ctx.Message.DeleteAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackService.cs b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackService.cs deleted file mode 100644 index 3bfb87c..0000000 --- a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackService.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common.Blackjack; - -namespace EllieBot.Modules.Gambling.Services; - -public class BlackJackService : IEService -{ - public ConcurrentDictionary Games { get; } = new(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/BlackJack/Blackjack.cs b/src/EllieBot/Modules/Gambling/BlackJack/Blackjack.cs deleted file mode 100644 index e21d2cd..0000000 --- a/src/EllieBot/Modules/Gambling/BlackJack/Blackjack.cs +++ /dev/null @@ -1,329 +0,0 @@ -#nullable disable -using Ellie.Econ; - -namespace EllieBot.Modules.Gambling.Common.Blackjack; - -public class Blackjack -{ - public enum GameState - { - Starting, - Playing, - Ended - } - - public event Func StateUpdated; - public event Func GameEnded; - - private Deck Deck { get; } = new QuadDeck(); - public Dealer Dealer { get; set; } - - - public List Players { get; set; } = new(); - public GameState State { get; set; } = GameState.Starting; - public User CurrentUser { get; private set; } - - private TaskCompletionSource currentUserMove; - private readonly ICurrencyService _cs; - - private readonly SemaphoreSlim _locker = new(1, 1); - - public Blackjack(ICurrencyService cs) - { - _cs = cs; - Dealer = new(); - } - - public void Start() - => _ = GameLoop(); - - public async Task GameLoop() - { - try - { - //wait for players to join - await Task.Delay(20000); - await _locker.WaitAsync(); - try - { - State = GameState.Playing; - } - finally - { - _locker.Release(); - } - - await PrintState(); - //if no users joined the game, end it - if (!Players.Any()) - { - State = GameState.Ended; - _ = GameEnded?.Invoke(this); - return; - } - - //give 1 card to the dealer and 2 to each player - Dealer.Cards.Add(Deck.Draw()); - foreach (var usr in Players) - { - usr.Cards.Add(Deck.Draw()); - usr.Cards.Add(Deck.Draw()); - - if (usr.GetHandValue() == 21) - usr.State = User.UserState.Blackjack; - } - - //go through all users and ask them what they want to do - foreach (var usr in Players.Where(x => !x.Done)) - { - while (!usr.Done) - { - Log.Information("Waiting for {DiscordUser}'s move", usr.DiscordUser); - await PromptUserMove(usr); - } - } - - await PrintState(); - State = GameState.Ended; - await Task.Delay(2500); - Log.Information("Dealer moves"); - await DealerMoves(); - await PrintState(); - _ = GameEnded?.Invoke(this); - } - catch (Exception ex) - { - Log.Error(ex, "REPORT THE MESSAGE BELOW IN Ellie's Home SERVER PLEASE"); - State = GameState.Ended; - _ = GameEnded?.Invoke(this); - } - } - - private async Task PromptUserMove(User usr) - { - using var cts = new CancellationTokenSource(); - var pause = Task.Delay(20000, cts.Token); //10 seconds to decide - CurrentUser = usr; - currentUserMove = new(); - await PrintState(); - // either wait for the user to make an action and - // if he doesn't - stand - var finished = await Task.WhenAny(pause, currentUserMove.Task); - if (finished == pause) - await Stand(usr); - else - cts.Cancel(); - - CurrentUser = null; - currentUserMove = null; - } - - public async Task Join(IUser user, long bet) - { - await _locker.WaitAsync(); - try - { - if (State != GameState.Starting) - return false; - - if (Players.Count >= 5) - return false; - - if (!await _cs.RemoveAsync(user, bet, new("blackjack", "gamble"))) - return false; - - Players.Add(new(user, bet)); - _ = PrintState(); - return true; - } - finally - { - _locker.Release(); - } - } - - public async Task Stand(IUser u) - { - var cu = CurrentUser; - - if (cu is not null && cu.DiscordUser == u) - return await Stand(cu); - - return false; - } - - public async Task Stand(User u) - { - await _locker.WaitAsync(); - try - { - if (State != GameState.Playing) - return false; - - if (CurrentUser != u) - return false; - - u.State = User.UserState.Stand; - currentUserMove.TrySetResult(true); - return true; - } - finally - { - _locker.Release(); - } - } - - private async Task DealerMoves() - { - var hw = Dealer.GetHandValue(); - while (hw < 17 - || (hw == 17 - && Dealer.Cards.Count(x => x.Number == 1) > (Dealer.GetRawHandValue() - 17) / 10)) // hit on soft 17 - { - /* Dealer has - A 6 - That's 17, soft - hw == 17 => true - number of aces = 1 - 1 > 17-17 /10 => true - - AA 5 - That's 17, again soft, since one ace is worth 11, even though another one is 1 - hw == 17 => true - number of aces = 2 - 2 > 27 - 17 / 10 => true - - AA Q 5 - That's 17, but not soft, since both aces are worth 1 - hw == 17 => true - number of aces = 2 - 2 > 37 - 17 / 10 => false - * */ - Dealer.Cards.Add(Deck.Draw()); - hw = Dealer.GetHandValue(); - } - - if (hw > 21) - { - foreach (var usr in Players) - { - if (usr.State is User.UserState.Stand or User.UserState.Blackjack) - usr.State = User.UserState.Won; - else - usr.State = User.UserState.Lost; - } - } - else - { - foreach (var usr in Players) - { - if (usr.State == User.UserState.Blackjack) - usr.State = User.UserState.Won; - else if (usr.State == User.UserState.Stand) - usr.State = hw < usr.GetHandValue() ? User.UserState.Won : User.UserState.Lost; - else - usr.State = User.UserState.Lost; - } - } - - foreach (var usr in Players) - { - if (usr.State is User.UserState.Won or User.UserState.Blackjack) - await _cs.AddAsync(usr.DiscordUser.Id, usr.Bet * 2, new("blackjack", "win")); - } - } - - public async Task Double(IUser u) - { - var cu = CurrentUser; - - if (cu is not null && cu.DiscordUser == u) - return await Double(cu); - - return false; - } - - public async Task Double(User u) - { - await _locker.WaitAsync(); - try - { - if (State != GameState.Playing) - return false; - - if (CurrentUser != u) - return false; - - if (!await _cs.RemoveAsync(u.DiscordUser.Id, u.Bet, new("blackjack", "double"))) - return false; - - u.Bet *= 2; - - u.Cards.Add(Deck.Draw()); - - if (u.GetHandValue() == 21) - //blackjack - u.State = User.UserState.Blackjack; - else if (u.GetHandValue() > 21) - // user busted - u.State = User.UserState.Bust; - else - //with double you just get one card, and then you're done - u.State = User.UserState.Stand; - currentUserMove.TrySetResult(true); - - return true; - } - finally - { - _locker.Release(); - } - } - - public async Task Hit(IUser u) - { - var cu = CurrentUser; - - if (cu is not null && cu.DiscordUser == u) - return await Hit(cu); - - return false; - } - - public async Task Hit(User u) - { - await _locker.WaitAsync(); - try - { - if (State != GameState.Playing) - return false; - - if (CurrentUser != u) - return false; - - u.Cards.Add(Deck.Draw()); - - if (u.GetHandValue() == 21) - //blackjack - u.State = User.UserState.Blackjack; - else if (u.GetHandValue() > 21) - // user busted - u.State = User.UserState.Bust; - - currentUserMove.TrySetResult(true); - - return true; - } - finally - { - _locker.Release(); - } - } - - public Task PrintState() - { - if (StateUpdated is null) - return Task.CompletedTask; - return StateUpdated.Invoke(this); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/BlackJack/Player.cs b/src/EllieBot/Modules/Gambling/BlackJack/Player.cs deleted file mode 100644 index fb238c1..0000000 --- a/src/EllieBot/Modules/Gambling/BlackJack/Player.cs +++ /dev/null @@ -1,57 +0,0 @@ -#nullable disable -using Ellie.Econ; - -namespace EllieBot.Modules.Gambling.Common.Blackjack; - -public abstract class Player -{ - public List Cards { get; } = new(); - - public int GetHandValue() - { - var val = GetRawHandValue(); - - // while the hand value is greater than 21, for each ace you have in the deck - // reduce the value by 10 until it drops below 22 - // (emulating the fact that ace is either a 1 or a 11) - var i = Cards.Count(x => x.Number == 1); - while (val > 21 && i-- > 0) - val -= 10; - return val; - } - - public int GetRawHandValue() - => Cards.Sum(x => x.Number == 1 ? 11 : x.Number >= 10 ? 10 : x.Number); -} - -public class Dealer : Player -{ -} - -public class User : Player -{ - public enum UserState - { - Waiting, - Stand, - Bust, - Blackjack, - Won, - Lost - } - - public UserState State { get; set; } = UserState.Waiting; - public long Bet { get; set; } - public IUser DiscordUser { get; } - - public bool Done - => State != UserState.Waiting; - - public User(IUser user, long bet) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(bet); - - Bet = bet; - DiscordUser = user; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs deleted file mode 100644 index 02537fd..0000000 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs +++ /dev/null @@ -1,390 +0,0 @@ -#nullable disable -using CommandLine; -using System.Collections.Immutable; - -namespace EllieBot.Modules.Gambling.Common.Connect4; - -public sealed class Connect4Game : IDisposable -{ - public enum Field //temporary most likely - { - Empty, - P1, - P2 - } - - public enum Phase - { - Joining, // waiting for second player to join - P1Move, - P2Move, - Ended - } - - public enum Result - { - Draw, - CurrentPlayerWon, - OtherPlayerWon - } - - public const int NUMBER_OF_COLUMNS = 7; - public const int NUMBER_OF_ROWS = 6; - - //public event Func OnGameStarted; - public event Func OnGameStateUpdated; - public event Func OnGameFailedToStart; - public event Func OnGameEnded; - - public Phase CurrentPhase { get; private set; } = Phase.Joining; - - public IReadOnlyList GameState - => _gameState.AsReadOnly(); - - public IReadOnlyCollection<(ulong UserId, string Username)?> Players - => _players.AsReadOnly(); - - public (ulong UserId, string Username) CurrentPlayer - => CurrentPhase == Phase.P1Move ? _players[0].Value : _players[1].Value; - - public (ulong UserId, string Username) OtherPlayer - => CurrentPhase == Phase.P2Move ? _players[0].Value : _players[1].Value; - - //state is bottom to top, left to right - private readonly Field[] _gameState = new Field[NUMBER_OF_ROWS * NUMBER_OF_COLUMNS]; - private readonly (ulong UserId, string Username)?[] _players = new (ulong, string)?[2]; - - private readonly SemaphoreSlim _locker = new(1, 1); - private readonly Options _options; - private readonly EllieRandom _rng; - - private Timer playerTimeoutTimer; - - /* [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - * [ ][ ][ ][ ][ ][ ] - */ - - public Connect4Game( - ulong userId, - string userName, - Options options - ) - { - _players[0] = (userId, userName); - _options = options; - - _rng = new(); - for (var i = 0; i < NUMBER_OF_COLUMNS * NUMBER_OF_ROWS; i++) - _gameState[i] = Field.Empty; - } - - public void Initialize() - { - if (CurrentPhase != Phase.Joining) - return; - _ = Task.Run(async () => - { - await Task.Delay(15000); - await _locker.WaitAsync(); - try - { - if (_players[1] is null) - { - _ = OnGameFailedToStart?.Invoke(this); - CurrentPhase = Phase.Ended; - } - } - finally { _locker.Release(); } - }); - } - - public async Task Join(ulong userId, string userName) - { - await _locker.WaitAsync(); - try - { - if (CurrentPhase != Phase.Joining) //can't join if its not a joining phase - return false; - - if (_players[0].Value.UserId == userId) // same user can't join own game - return false; - - - if (_rng.Next(0, 2) == 0) //rolling from 0-1, if number is 0, join as first player - { - _players[1] = _players[0]; - _players[0] = (userId, userName); - } - else //else join as a second player - _players[1] = (userId, userName); - - CurrentPhase = Phase.P1Move; //start the game - playerTimeoutTimer = new(async _ => - { - await _locker.WaitAsync(); - try - { - EndGame(Result.OtherPlayerWon, OtherPlayer.UserId); - } - finally { _locker.Release(); } - }, - null, - TimeSpan.FromSeconds(_options.TurnTimer), - TimeSpan.FromSeconds(_options.TurnTimer)); - _ = OnGameStateUpdated?.Invoke(this); - - return true; - } - finally { _locker.Release(); } - } - - public async Task Input(ulong userId, int inputCol) - { - await _locker.WaitAsync(); - try - { - inputCol -= 1; - if (CurrentPhase is Phase.Ended or Phase.Joining) - return false; - - if (!((_players[0].Value.UserId == userId && CurrentPhase == Phase.P1Move) - || (_players[1].Value.UserId == userId && CurrentPhase == Phase.P2Move))) - return false; - - if (inputCol is < 0 or > NUMBER_OF_COLUMNS) //invalid input - return false; - - if (IsColumnFull(inputCol)) //can't play there event? - return false; - - var start = NUMBER_OF_ROWS * inputCol; - for (var i = start; i < start + NUMBER_OF_ROWS; i++) - { - if (_gameState[i] == Field.Empty) - { - _gameState[i] = GetPlayerPiece(userId); - break; - } - } - - //check winnning condition - // ok, i'll go from [0-2] in rows (and through all columns) and check upward if 4 are connected - - for (var i = 0; i < NUMBER_OF_ROWS - 3; i++) - { - if (CurrentPhase == Phase.Ended) - break; - - for (var j = 0; j < NUMBER_OF_COLUMNS; j++) - { - if (CurrentPhase == Phase.Ended) - break; - - var first = _gameState[i + (j * NUMBER_OF_ROWS)]; - if (first != Field.Empty) - { - for (var k = 1; k < 4; k++) - { - var next = _gameState[i + k + (j * NUMBER_OF_ROWS)]; - if (next == first) - { - if (k == 3) - EndGame(Result.CurrentPlayerWon, CurrentPlayer.UserId); - else - continue; - } - else - break; - } - } - } - } - - // i'll go [0-1] in columns (and through all rows) and check to the right if 4 are connected - for (var i = 0; i < NUMBER_OF_COLUMNS - 3; i++) - { - if (CurrentPhase == Phase.Ended) - break; - - for (var j = 0; j < NUMBER_OF_ROWS; j++) - { - if (CurrentPhase == Phase.Ended) - break; - - var first = _gameState[j + (i * NUMBER_OF_ROWS)]; - if (first != Field.Empty) - { - for (var k = 1; k < 4; k++) - { - var next = _gameState[j + ((i + k) * NUMBER_OF_ROWS)]; - if (next == first) - { - if (k == 3) - EndGame(Result.CurrentPlayerWon, CurrentPlayer.UserId); - else - continue; - } - else - break; - } - } - } - } - - //need to check diagonal now - for (var col = 0; col < NUMBER_OF_COLUMNS; col++) - { - if (CurrentPhase == Phase.Ended) - break; - - for (var row = 0; row < NUMBER_OF_ROWS; row++) - { - if (CurrentPhase == Phase.Ended) - break; - - var first = _gameState[row + (col * NUMBER_OF_ROWS)]; - - if (first != Field.Empty) - { - var same = 1; - - //top left - for (var i = 1; i < 4; i++) - { - //while going top left, rows are increasing, columns are decreasing - var curRow = row + i; - var curCol = col - i; - - //check if current values are in range - if (curRow is >= NUMBER_OF_ROWS or < 0) - break; - if (curCol is < 0 or >= NUMBER_OF_COLUMNS) - break; - - var cur = _gameState[curRow + (curCol * NUMBER_OF_ROWS)]; - if (cur == first) - same++; - else - break; - } - - if (same == 4) - { - EndGame(Result.CurrentPlayerWon, CurrentPlayer.UserId); - break; - } - - same = 1; - - //top right - for (var i = 1; i < 4; i++) - { - //while going top right, rows are increasing, columns are increasing - var curRow = row + i; - var curCol = col + i; - - //check if current values are in range - if (curRow is >= NUMBER_OF_ROWS or < 0) - break; - if (curCol is < 0 or >= NUMBER_OF_COLUMNS) - break; - - var cur = _gameState[curRow + (curCol * NUMBER_OF_ROWS)]; - if (cur == first) - same++; - else - break; - } - - if (same == 4) - { - EndGame(Result.CurrentPlayerWon, CurrentPlayer.UserId); - break; - } - } - } - } - - //check draw? if it's even possible - if (_gameState.All(x => x != Field.Empty)) - EndGame(Result.Draw, null); - - if (CurrentPhase != Phase.Ended) - { - if (CurrentPhase == Phase.P1Move) - CurrentPhase = Phase.P2Move; - else - CurrentPhase = Phase.P1Move; - - ResetTimer(); - } - - _ = OnGameStateUpdated?.Invoke(this); - return true; - } - finally { _locker.Release(); } - } - - private void ResetTimer() - => playerTimeoutTimer.Change(TimeSpan.FromSeconds(_options.TurnTimer), - TimeSpan.FromSeconds(_options.TurnTimer)); - - private void EndGame(Result result, ulong? winId) - { - if (CurrentPhase == Phase.Ended) - return; - _ = OnGameEnded?.Invoke(this, result); - CurrentPhase = Phase.Ended; - - if (result == Result.Draw) - { - return; - } - } - - private Field GetPlayerPiece(ulong userId) - => _players[0].Value.UserId == userId ? Field.P1 : Field.P2; - - //column is full if there are no empty fields - private bool IsColumnFull(int column) - { - var start = NUMBER_OF_ROWS * column; - for (var i = start; i < start + NUMBER_OF_ROWS; i++) - { - if (_gameState[i] == Field.Empty) - return false; - } - - return true; - } - - public void Dispose() - { - OnGameFailedToStart = null; - OnGameStateUpdated = null; - OnGameEnded = null; - playerTimeoutTimer?.Change(Timeout.Infinite, Timeout.Infinite); - } - - - public class Options : IEllieCommandOptions - { - [Option('t', - "turn-timer", - Required = false, - Default = 15, - HelpText = "Turn time in seconds. It has to be between 5 and 60. Default 15.")] - public int TurnTimer { get; set; } = 15; - - public void NormalizeOptions() - { - if (TurnTimer is < 5 or > 60) - TurnTimer = 15; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs deleted file mode 100644 index 3b3aad1..0000000 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs +++ /dev/null @@ -1,189 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Connect4; -using EllieBot.Modules.Gambling.Services; -using System.Text; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class Connect4Commands : GamblingSubmodule - { - private static readonly string[] _numbers = - [ - ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:" - ]; - - private int RepostCounter - { - get => repostCounter; - set - { - if (value is < 0 or > 7) - repostCounter = 0; - else - repostCounter = value; - } - } - - private readonly DiscordSocketClient _client; - - private IUserMessage msg; - - private int repostCounter; - - public Connect4Commands(DiscordSocketClient client, GamblingConfigService gamb) - : base(gamb) - { - _client = client; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public async Task Connect4(params string[] args) - { - var (options, _) = OptionsParser.ParseFrom(new Connect4Game.Options(), args); - - var newGame = new Connect4Game(ctx.User.Id, ctx.User.ToString(), options); - Connect4Game game; - if ((game = _service.Connect4Games.GetOrAdd(ctx.Channel.Id, newGame)) != newGame) - { - if (game.CurrentPhase != Connect4Game.Phase.Joining) - return; - - newGame.Dispose(); - //means game already exists, try to join - await game.Join(ctx.User.Id, ctx.User.ToString()); - return; - } - - game.OnGameStateUpdated += Game_OnGameStateUpdated; - game.OnGameFailedToStart += GameOnGameFailedToStart; - game.OnGameEnded += GameOnGameEnded; - _client.MessageReceived += ClientMessageReceived; - - game.Initialize(); - await Response().Confirm(strs.connect4_created).SendAsync(); - - Task ClientMessageReceived(SocketMessage arg) - { - if (ctx.Channel.Id != arg.Channel.Id) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - var success = false; - if (int.TryParse(arg.Content, out var col)) - success = await game.Input(arg.Author.Id, col); - - if (success) - { - try - { await arg.DeleteAsync(); } - catch { } - } - else - { - if (game.CurrentPhase is Connect4Game.Phase.Joining or Connect4Game.Phase.Ended) - return; - RepostCounter++; - if (RepostCounter == 0) - { - try - { msg = await Response().Embed(msg.Embeds.First().ToEmbedBuilder()).SendAsync(); } - catch { } - } - } - }); - return Task.CompletedTask; - } - - Task GameOnGameFailedToStart(Connect4Game arg) - { - if (_service.Connect4Games.TryRemove(ctx.Channel.Id, out var toDispose)) - { - _client.MessageReceived -= ClientMessageReceived; - toDispose.Dispose(); - } - - return Response().Error(strs.connect4_failed_to_start).SendAsync(); - } - - Task GameOnGameEnded(Connect4Game arg, Connect4Game.Result result) - { - if (_service.Connect4Games.TryRemove(ctx.Channel.Id, out var toDispose)) - { - _client.MessageReceived -= ClientMessageReceived; - toDispose.Dispose(); - } - - string title; - if (result == Connect4Game.Result.CurrentPlayerWon) - { - title = GetText(strs.connect4_won(Format.Bold(arg.CurrentPlayer.Username), - Format.Bold(arg.OtherPlayer.Username))); - } - else if (result == Connect4Game.Result.OtherPlayerWon) - { - title = GetText(strs.connect4_won(Format.Bold(arg.OtherPlayer.Username), - Format.Bold(arg.CurrentPlayer.Username))); - } - else - title = GetText(strs.connect4_draw); - - return msg.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithTitle(title) - .WithDescription(GetGameStateText(game)) - .WithOkColor() - .Build()); - } - } - - private async Task Game_OnGameStateUpdated(Connect4Game game) - { - var embed = _sender.CreateEmbed() - .WithTitle($"{game.CurrentPlayer.Username} vs {game.OtherPlayer.Username}") - .WithDescription(GetGameStateText(game)) - .WithOkColor(); - - - if (msg is null) - msg = await Response().Embed(embed).SendAsync(); - else - await msg.ModifyAsync(x => x.Embed = embed.Build()); - } - - private string GetGameStateText(Connect4Game game) - { - var sb = new StringBuilder(); - - if (game.CurrentPhase is Connect4Game.Phase.P1Move or Connect4Game.Phase.P2Move) - sb.AppendLine(GetText(strs.connect4_player_to_move(Format.Bold(game.CurrentPlayer.Username)))); - - for (var i = Connect4Game.NUMBER_OF_ROWS; i > 0; i--) - { - for (var j = 0; j < Connect4Game.NUMBER_OF_COLUMNS; j++) - { - var cur = game.GameState[i + (j * Connect4Game.NUMBER_OF_ROWS) - 1]; - - if (cur == Connect4Game.Field.Empty) - sb.Append("⚫"); //black circle - else if (cur == Connect4Game.Field.P1) - sb.Append("🔴"); //red circle - else - sb.Append("🔵"); //blue circle - } - - sb.AppendLine(); - } - - for (var i = 0; i < Connect4Game.NUMBER_OF_COLUMNS; i++) - sb.Append(_numbers[i]); - - return sb.ToString(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/CurrencyProvider.cs b/src/EllieBot/Modules/Gambling/CurrencyProvider.cs deleted file mode 100644 index e4f4bc1..0000000 --- a/src/EllieBot/Modules/Gambling/CurrencyProvider.cs +++ /dev/null @@ -1,16 +0,0 @@ -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public sealed class CurrencyProvider : ICurrencyProvider, IEService -{ - private readonly GamblingConfigService _cs; - - public CurrencyProvider(GamblingConfigService cs) - { - _cs = cs; - } - - public string GetCurrencySign() - => _cs.Data.Currency.Sign; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs b/src/EllieBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs deleted file mode 100644 index 15bf7ff..0000000 --- a/src/EllieBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs +++ /dev/null @@ -1,224 +0,0 @@ -#nullable disable -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.PixelFormats; -using System.Text.RegularExpressions; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class DiceRollCommands : EllieModule - { - private static readonly Regex _dndRegex = new(@"^(?\d+)d(?\d+)(?:\+(?\d+))?(?:\-(?\d+))?$", - RegexOptions.Compiled); - - private static readonly Regex _fudgeRegex = new(@"^(?\d+)d(?:F|f)$", RegexOptions.Compiled); - - private static readonly char[] _fateRolls = ['-', ' ', '+']; - private readonly IImageCache _images; - - public DiceRollCommands(IImageCache images) - => _images = images; - - [Cmd] - public async Task Roll() - { - var rng = new EllieRandom(); - var gen = rng.Next(1, 101); - - var num1 = gen / 10; - var num2 = gen % 10; - - using var img1 = await GetDiceAsync(num1); - using var img2 = await GetDiceAsync(num2); - using var img = new[] { img1, img2 }.Merge(out var format); - await using var ms = await img.ToStreamAsync(format); - - var fileName = $"dice.{format.FileExtensions.First()}"; - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .AddField(GetText(strs.roll2), gen) - .WithImageUrl($"attachment://{fileName}"); - - await ctx.Channel.SendFileAsync(ms, - fileName, - embed: eb.Build()); - } - - [Cmd] - [Priority(1)] - public async Task Roll(int num) - => await InternalRoll(num, true); - - - [Cmd] - [Priority(1)] - public async Task Rolluo(int num = 1) - => await InternalRoll(num, false); - - [Cmd] - [Priority(0)] - public async Task Roll(string arg) - => await InternallDndRoll(arg, true); - - [Cmd] - [Priority(0)] - public async Task Rolluo(string arg) - => await InternallDndRoll(arg, false); - - private async Task InternalRoll(int num, bool ordered) - { - if (num is < 1 or > 30) - { - await Response().Error(strs.dice_invalid_number(1, 30)).SendAsync(); - return; - } - - var rng = new EllieRandom(); - - var dice = new List>(num); - var values = new List(num); - for (var i = 0; i < num; i++) - { - var randomNumber = rng.Next(1, 7); - var toInsert = dice.Count; - if (ordered) - { - if (randomNumber == 6 || dice.Count == 0) - toInsert = 0; - else if (randomNumber != 1) - { - for (var j = 0; j < dice.Count; j++) - { - if (values[j] < randomNumber) - { - toInsert = j; - break; - } - } - } - } - else - toInsert = dice.Count; - - dice.Insert(toInsert, await GetDiceAsync(randomNumber)); - values.Insert(toInsert, randomNumber); - } - - using var bitmap = dice.Merge(out var format); - await using var ms = bitmap.ToStream(format); - foreach (var d in dice) - d.Dispose(); - - var imageName = $"dice.{format.FileExtensions.First()}"; - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .AddField(GetText(strs.rolls), values.Select(x => Format.Code(x.ToString())).Join(' '), true) - .AddField(GetText(strs.total), values.Sum(), true) - .WithDescription(GetText(strs.dice_rolled_num(Format.Bold(values.Count.ToString())))) - .WithImageUrl($"attachment://{imageName}"); - - await ctx.Channel.SendFileAsync(ms, - imageName, - embed: eb.Build()); - } - - private async Task InternallDndRoll(string arg, bool ordered) - { - Match match; - if ((match = _fudgeRegex.Match(arg)).Length != 0 - && int.TryParse(match.Groups["n1"].ToString(), out var n1) - && n1 is > 0 and < 500) - { - var rng = new EllieRandom(); - - var rolls = new List(); - - for (var i = 0; i < n1; i++) - rolls.Add(_fateRolls[rng.Next(0, _fateRolls.Length)]); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(GetText(strs.dice_rolled_num(Format.Bold(n1.ToString())))) - .AddField(Format.Bold("Result"), - string.Join(" ", rolls.Select(c => Format.Code($"[{c}]")))); - - await Response().Embed(embed).SendAsync(); - } - else if ((match = _dndRegex.Match(arg)).Length != 0) - { - var rng = new EllieRandom(); - if (int.TryParse(match.Groups["n1"].ToString(), out n1) - && int.TryParse(match.Groups["n2"].ToString(), out var n2) - && n1 <= 50 - && n2 <= 100000 - && n1 > 0 - && n2 > 0) - { - if (!int.TryParse(match.Groups["add"].Value, out var add)) - add = 0; - if (!int.TryParse(match.Groups["sub"].Value, out var sub)) - sub = 0; - - var arr = new int[n1]; - for (var i = 0; i < n1; i++) - arr[i] = rng.Next(1, n2 + 1); - - var sum = arr.Sum(); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(GetText(strs.dice_rolled_num(n1 + $"`1 - {n2}`"))) - .AddField(Format.Bold(GetText(strs.rolls)), - string.Join(" ", - (ordered ? arr.OrderBy(x => x).AsEnumerable() : arr).Select(x - => Format.Code(x.ToString())))) - .AddField(Format.Bold("Sum"), - sum + " + " + add + " - " + sub + " = " + (sum + add - sub)); - await Response().Embed(embed).SendAsync(); - } - } - } - - [Cmd] - public async Task NRoll([Leftover] string range) - { - int rolled; - if (range.Contains("-")) - { - var arr = range.Split('-').Take(2).Select(int.Parse).ToArray(); - if (arr[0] > arr[1]) - { - await Response().Error(strs.second_larger_than_first).SendAsync(); - return; - } - - rolled = new EllieRandom().Next(arr[0], arr[1] + 1); - } - else - rolled = new EllieRandom().Next(0, int.Parse(range) + 1); - - await Response().Confirm(strs.dice_rolled(Format.Bold(rolled.ToString()))).SendAsync(); - } - - private async Task> GetDiceAsync(int num) - { - if (num is < 0 or > 10) - throw new ArgumentOutOfRangeException(nameof(num)); - - if (num == 10) - { - using var imgOne = Image.Load(await _images.GetDiceAsync(1)); - using var imgZero = Image.Load(await _images.GetDiceAsync(0)); - return new[] { imgOne, imgZero }.Merge(); - } - - return Image.Load(await _images.GetDiceAsync(num)); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs b/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs deleted file mode 100644 index e39003d..0000000 --- a/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs +++ /dev/null @@ -1,246 +0,0 @@ -#nullable disable -using Ellie.Econ; -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.PixelFormats; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class DrawCommands : GamblingSubmodule - { - private static readonly ConcurrentDictionary _allDecks = new(); - private readonly IImageCache _images; - - public DrawCommands(IImageCache images, GamblingConfigService gcs) - : base(gcs) - => _images = images; - - private async Task InternalDraw(int count, ulong? guildId = null) - { - if (count is < 1 or > 10) - throw new ArgumentOutOfRangeException(nameof(count)); - - var cards = guildId is null ? new() : _allDecks.GetOrAdd(ctx.Guild, _ => new()); - var images = new List>(); - var cardObjects = new List(); - for (var i = 0; i < count; i++) - { - if (cards.CardPool.Count == 0 && i != 0) - { - try - { - await Response().Error(strs.no_more_cards).SendAsync(); - } - catch - { - // ignored - } - - break; - } - - var currentCard = cards.Draw(); - cardObjects.Add(currentCard); - var image = await GetCardImageAsync(currentCard); - images.Add(image); - } - - var imgName = "cards.jpg"; - using var img = images.Merge(); - foreach (var i in images) - i.Dispose(); - - var eb = _sender.CreateEmbed() - .WithOkColor(); - - var toSend = string.Empty; - if (cardObjects.Count == 5) - eb.AddField(GetText(strs.hand_value), Deck.GetHandValue(cardObjects), true); - - if (guildId is not null) - toSend += GetText(strs.cards_left(Format.Bold(cards.CardPool.Count.ToString()))); - - eb.WithDescription(toSend) - .WithAuthor(ctx.User) - .WithImageUrl($"attachment://{imgName}"); - - if (count > 1) - eb.AddField(GetText(strs.cards), count.ToString(), true); - - await using var imageStream = await img.ToStreamAsync(); - await ctx.Channel.SendFileAsync(imageStream, - imgName, - embed: eb.Build()); - } - - private async Task> GetCardImageAsync(RegularCard currentCard) - { - var cardName = currentCard.GetName().ToLowerInvariant().Replace(' ', '_'); - var cardBytes = await File.ReadAllBytesAsync($"data/images/cards/{cardName}.jpg"); - return Image.Load(cardBytes); - } - - private async Task> GetCardImageAsync(Deck.Card currentCard) - { - var cardName = currentCard.ToString().ToLowerInvariant().Replace(' ', '_'); - var cardBytes = await File.ReadAllBytesAsync($"data/images/cards/{cardName}.jpg"); - return Image.Load(cardBytes); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Draw(int num = 1) - { - if (num < 1) - return; - - if (num > 10) - num = 10; - - await InternalDraw(num, ctx.Guild.Id); - } - - [Cmd] - public async Task DrawNew(int num = 1) - { - if (num < 1) - return; - - if (num > 10) - num = 10; - - await InternalDraw(num); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task DeckShuffle() - { - //var channel = (ITextChannel)ctx.Channel; - - _allDecks.AddOrUpdate(ctx.Guild, - _ => new(), - (_, c) => - { - c.Restart(); - return c; - }); - - await Response().Confirm(strs.deck_reshuffled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task BetDraw( - [OverrideTypeReader(typeof(BalanceTypeReader))] - long amount, - InputValueGuess val, - InputColorGuess? col = null) - => BetDrawInternal(amount, val, col); - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task BetDraw( - [OverrideTypeReader(typeof(BalanceTypeReader))] - long amount, - InputColorGuess col, - InputValueGuess? val = null) - => BetDrawInternal(amount, val, col); - - public async Task BetDrawInternal(long amount, InputValueGuess? val, InputColorGuess? col) - { - if (!await CheckBetMandatory(amount)) - { - return; - } - - var res = await _service.BetDrawAsync(ctx.User.Id, - amount, - (byte?)val, - (byte?)col); - - if (!res.TryPickT0(out var result, out _)) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(result.Card.GetEmoji()) - .AddField(GetText(strs.guess), GetGuessInfo(val, col), true) - .AddField(GetText(strs.card), GetCardInfo(result.Card), true) - .AddField(GetText(strs.won), N((long)result.Won), false) - .WithImageUrl("attachment://card.png"); - - using var img = await GetCardImageAsync(result.Card); - await using var imgStream = await img.ToStreamAsync(); - await ctx.Channel.SendFileAsync(imgStream, "card.png", embed: eb.Build()); - } - - private string GetGuessInfo(InputValueGuess? valG, InputColorGuess? colG) - { - var val = valG switch - { - InputValueGuess.H => "Hi ⬆️", - InputValueGuess.L => "Lo ⬇️", - _ => "❓" - }; - - var col = colG switch - { - InputColorGuess.Red => "R 🔴", - InputColorGuess.Black => "B ⚫", - _ => "❓" - }; - - return $"{val} / {col}"; - } - - private string GetCardInfo(RegularCard card) - { - var val = (int)card.Value switch - { - < 7 => "Lo ⬇️", - > 7 => "Hi ⬆️", - _ => "7 💀" - }; - - var col = card.Value == RegularValue.Seven - ? "7 💀" - : card.Suit switch - { - RegularSuit.Diamonds or RegularSuit.Hearts => "R 🔴", - _ => "B ⚫" - }; - - return $"{val} / {col}"; - } - - public enum InputValueGuess - { - High = 0, - H = 0, - Hi = 0, - Low = 1, - L = 1, - Lo = 1, - } - - public enum InputColorGuess - { - R = 0, - Red = 0, - B = 1, - Bl = 1, - Black = 1, - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/EconomyResult.cs b/src/EllieBot/Modules/Gambling/EconomyResult.cs deleted file mode 100644 index 12a00f8..0000000 --- a/src/EllieBot/Modules/Gambling/EconomyResult.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Services; - -public sealed class EconomyResult -{ - public decimal Cash { get; init; } - public decimal Planted { get; init; } - public decimal Waifus { get; init; } - public decimal OnePercent { get; init; } - public decimal Bank { get; init; } - public long Bot { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs b/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs deleted file mode 100644 index c5e836c..0000000 --- a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Events; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class CurrencyEventsCommands : GamblingSubmodule - { - public CurrencyEventsCommands(GamblingConfigService gamblingConf) - : base(gamblingConf) - { - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - [OwnerOnly] - public async Task EventStart(CurrencyEvent.Type ev, params string[] options) - { - var (opts, _) = OptionsParser.ParseFrom(new EventOptions(), options); - if (!await _service.TryCreateEventAsync(ctx.Guild.Id, ctx.Channel.Id, ev, opts, GetEmbed)) - await Response().Error(strs.start_event_fail).SendAsync(); - } - - private EmbedBuilder GetEmbed(CurrencyEvent.Type type, EventOptions opts, long currentPot) - => type switch - { - CurrencyEvent.Type.Reaction => _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.event_title(type.ToString()))) - .WithDescription(GetReactionDescription(opts.Amount, currentPot)) - .WithFooter(GetText(strs.event_duration_footer(opts.Hours))), - CurrencyEvent.Type.GameStatus => _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.event_title(type.ToString()))) - .WithDescription(GetGameStatusDescription(opts.Amount, currentPot)) - .WithFooter(GetText(strs.event_duration_footer(opts.Hours))), - _ => throw new ArgumentOutOfRangeException(nameof(type)) - }; - - private string GetReactionDescription(long amount, long potSize) - { - var potSizeStr = Format.Bold(potSize == 0 ? "∞" + CurrencySign : N(potSize)); - - return GetText(strs.new_reaction_event(CurrencySign, Format.Bold(N(amount)), potSizeStr)); - } - - private string GetGameStatusDescription(long amount, long potSize) - { - var potSizeStr = Format.Bold(potSize == 0 ? "∞" + CurrencySign : potSize + CurrencySign); - - return GetText(strs.new_gamestatus_event(CurrencySign, Format.Bold(N(amount)), potSizeStr)); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsService.cs b/src/EllieBot/Modules/Gambling/Events/CurrencyEventsService.cs deleted file mode 100644 index 39160ff..0000000 --- a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsService.cs +++ /dev/null @@ -1,70 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Events; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Services; - -public class CurrencyEventsService : IEService -{ - private readonly DiscordSocketClient _client; - private readonly ICurrencyService _cs; - private readonly GamblingConfigService _configService; - - private readonly ConcurrentDictionary _events = new(); - private readonly IMessageSenderService _sender; - - public CurrencyEventsService(DiscordSocketClient client, ICurrencyService cs, GamblingConfigService configService, - IMessageSenderService sender) - { - _client = client; - _cs = cs; - _configService = configService; - _sender = sender; - } - - public async Task TryCreateEventAsync( - ulong guildId, - ulong channelId, - CurrencyEvent.Type type, - EventOptions opts, - Func embed) - { - var g = _client.GetGuild(guildId); - if (g?.GetChannel(channelId) is not ITextChannel ch) - return false; - - ICurrencyEvent ce; - - if (type == CurrencyEvent.Type.Reaction) - ce = new ReactionEvent(_client, _cs, g, ch, opts, _configService.Data, _sender, embed); - else if (type == CurrencyEvent.Type.GameStatus) - ce = new GameStatusEvent(_client, _cs, g, ch, opts, _sender, embed); - else - return false; - - var added = _events.TryAdd(guildId, ce); - if (added) - { - try - { - ce.OnEnded += OnEventEnded; - await ce.StartEvent(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error starting event"); - _events.TryRemove(guildId, out ce); - return false; - } - } - - return added; - } - - private Task OnEventEnded(ulong gid) - { - _events.TryRemove(gid, out _); - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/EventOptions.cs b/src/EllieBot/Modules/Gambling/Events/EventOptions.cs deleted file mode 100644 index 3d0eb3f..0000000 --- a/src/EllieBot/Modules/Gambling/Events/EventOptions.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable disable -using CommandLine; - -namespace EllieBot.Modules.Gambling.Common.Events; - -public class EventOptions : IEllieCommandOptions -{ - [Option('a', "amount", Required = false, Default = 100, HelpText = "Amount of currency each user receives.")] - public long Amount { get; set; } = 100; - - [Option('p', - "pot-size", - Required = false, - Default = 0, - HelpText = "The maximum amount of currency that can be rewarded. 0 means no limit.")] - public long PotSize { get; set; } - - //[Option('t', "type", Required = false, Default = "reaction", HelpText = "Type of the event. reaction, gamestatus or joinserver.")] - //public string TypeString { get; set; } = "reaction"; - [Option('d', - "duration", - Required = false, - Default = 24, - HelpText = "Number of hours the event should run for. Default 24.")] - public int Hours { get; set; } = 24; - - - public void NormalizeOptions() - { - if (Amount < 0) - Amount = 100; - if (PotSize < 0) - PotSize = 0; - if (Hours <= 0) - Hours = 24; - if (PotSize != 0 && PotSize < Amount) - PotSize = 0; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs b/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs deleted file mode 100644 index 1c461d6..0000000 --- a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs +++ /dev/null @@ -1,194 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; -using System.Collections.Concurrent; - -namespace EllieBot.Modules.Gambling.Common.Events; - -public class GameStatusEvent : ICurrencyEvent -{ - public event Func OnEnded; - private long PotSize { get; set; } - public bool Stopped { get; private set; } - public bool PotEmptied { get; private set; } - private readonly DiscordSocketClient _client; - private readonly IGuild _guild; - private IUserMessage msg; - private readonly ICurrencyService _cs; - private readonly long _amount; - - private readonly Func _embedFunc; - private readonly bool _isPotLimited; - private readonly ITextChannel _channel; - private readonly ConcurrentHashSet _awardedUsers = new(); - private readonly ConcurrentQueue _toAward = new(); - private readonly Timer _t; - private readonly Timer _timeout; - private readonly EventOptions _opts; - - private readonly string _code; - - private readonly object _stopLock = new(); - - private readonly object _potLock = new(); - private readonly IMessageSenderService _sender; - - private static readonly EllieRandom _rng = new EllieRandom(); - - public GameStatusEvent( - DiscordSocketClient client, - ICurrencyService cs, - SocketGuild g, - ITextChannel ch, - EventOptions opt, - IMessageSenderService sender, - Func embedFunc) - { - _client = client; - _guild = g; - _cs = cs; - _amount = opt.Amount; - PotSize = opt.PotSize; - _embedFunc = embedFunc; - _isPotLimited = PotSize > 0; - _channel = ch; - _opts = opt; - _sender = sender; - // generate code - _code = new kwum(_rng.Next(1_000_000, 10_000_000)).ToString(); - - _t = new(OnTimerTick, null, Timeout.InfiniteTimeSpan, TimeSpan.FromSeconds(2)); - if (_opts.Hours > 0) - _timeout = new(EventTimeout, null, TimeSpan.FromHours(_opts.Hours), Timeout.InfiniteTimeSpan); - } - - private void EventTimeout(object state) - => _ = StopEvent(); - - private async void OnTimerTick(object state) - { - var potEmpty = PotEmptied; - var toAward = new List(); - while (_toAward.TryDequeue(out var x)) - toAward.Add(x); - - if (!toAward.Any()) - return; - - try - { - await _cs.AddBulkAsync(toAward, - _amount, - new("event", "gamestatus") - ); - - if (_isPotLimited) - { - await msg.ModifyAsync(m => - { - m.Embed = GetEmbed(PotSize).Build(); - }); - } - - Log.Information("Game status event awarded {Count} users {Amount} currency.{Remaining}", - toAward.Count, - _amount, - _isPotLimited ? $" {PotSize} left." : ""); - - if (potEmpty) - _ = StopEvent(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error in OnTimerTick in gamestatusevent"); - } - } - - public async Task StartEvent() - { - msg = await _sender.Response(_channel).Embed(GetEmbed(_opts.PotSize)).SendAsync(); - await _client.SetGameAsync(_code); - _client.MessageDeleted += OnMessageDeleted; - _client.MessageReceived += HandleMessage; - _t.Change(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(2)); - } - - private EmbedBuilder GetEmbed(long pot) - => _embedFunc(CurrencyEvent.Type.GameStatus, _opts, pot); - - private async Task OnMessageDeleted(Cacheable message, Cacheable cacheable) - { - if (message.Id == msg.Id) - await StopEvent(); - } - - public Task StopEvent() - { - lock (_stopLock) - { - if (Stopped) - return Task.CompletedTask; - Stopped = true; - _client.MessageDeleted -= OnMessageDeleted; - _client.MessageReceived -= HandleMessage; - _t.Change(Timeout.Infinite, Timeout.Infinite); - _timeout?.Change(Timeout.Infinite, Timeout.Infinite); - _ = _client.SetGameAsync(null); - try - { - _ = msg.DeleteAsync(); - } - catch { } - - _ = OnEnded?.Invoke(_guild.Id); - } - - return Task.CompletedTask; - } - - private Task HandleMessage(SocketMessage message) - { - _ = Task.Run(async () => - { - if (message.Author is not IGuildUser gu // no unknown users, as they could be bots, or alts - || gu.IsBot // no bots - || message.Content != _code // code has to be the same - || (DateTime.UtcNow - gu.CreatedAt).TotalDays <= 5) // no recently created accounts - return; - // there has to be money left in the pot - // and the user wasn't rewarded - if (_awardedUsers.Add(message.Author.Id) && TryTakeFromPot()) - { - _toAward.Enqueue(message.Author.Id); - if (_isPotLimited && PotSize < _amount) - PotEmptied = true; - } - - try - { - await message.DeleteAsync(new() - { - RetryMode = RetryMode.AlwaysFail - }); - } - catch { } - }); - return Task.CompletedTask; - } - - private bool TryTakeFromPot() - { - if (_isPotLimited) - { - lock (_potLock) - { - if (PotSize < _amount) - return false; - - PotSize -= _amount; - return true; - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/ICurrencyEvent.cs b/src/EllieBot/Modules/Gambling/Events/ICurrencyEvent.cs deleted file mode 100644 index 57b96d9..0000000 --- a/src/EllieBot/Modules/Gambling/Events/ICurrencyEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common; - -public interface ICurrencyEvent -{ - event Func OnEnded; - Task StopEvent(); - Task StartEvent(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Events/ReactionEvent.cs b/src/EllieBot/Modules/Gambling/Events/ReactionEvent.cs deleted file mode 100644 index 6f02747..0000000 --- a/src/EllieBot/Modules/Gambling/Events/ReactionEvent.cs +++ /dev/null @@ -1,197 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Common.Events; - -public class ReactionEvent : ICurrencyEvent -{ - public event Func OnEnded; - private long PotSize { get; set; } - public bool Stopped { get; private set; } - public bool PotEmptied { get; private set; } - private readonly DiscordSocketClient _client; - private readonly IGuild _guild; - private IUserMessage msg; - private IEmote emote; - private readonly ICurrencyService _cs; - private readonly long _amount; - - private readonly Func _embedFunc; - private readonly bool _isPotLimited; - private readonly ITextChannel _channel; - private readonly ConcurrentHashSet _awardedUsers = new(); - private readonly System.Collections.Concurrent.ConcurrentQueue _toAward = new(); - private readonly Timer _t; - private readonly Timer _timeout; - private readonly bool _noRecentlyJoinedServer; - private readonly EventOptions _opts; - private readonly GamblingConfig _config; - - private readonly object _stopLock = new(); - - private readonly object _potLock = new(); - private readonly IMessageSenderService _sender; - - public ReactionEvent( - DiscordSocketClient client, - ICurrencyService cs, - SocketGuild g, - ITextChannel ch, - EventOptions opt, - GamblingConfig config, - IMessageSenderService sender, - Func embedFunc) - { - _client = client; - _guild = g; - _cs = cs; - _amount = opt.Amount; - PotSize = opt.PotSize; - _embedFunc = embedFunc; - _isPotLimited = PotSize > 0; - _channel = ch; - _noRecentlyJoinedServer = false; - _opts = opt; - _config = config; - _sender = sender; - - _t = new(OnTimerTick, null, Timeout.InfiniteTimeSpan, TimeSpan.FromSeconds(2)); - if (_opts.Hours > 0) - _timeout = new(EventTimeout, null, TimeSpan.FromHours(_opts.Hours), Timeout.InfiniteTimeSpan); - } - - private void EventTimeout(object state) - => _ = StopEvent(); - - private async void OnTimerTick(object state) - { - var potEmpty = PotEmptied; - var toAward = new List(); - while (_toAward.TryDequeue(out var x)) - toAward.Add(x); - - if (!toAward.Any()) - return; - - try - { - await _cs.AddBulkAsync(toAward, _amount, new("event", "reaction")); - - if (_isPotLimited) - { - await msg.ModifyAsync(m => - { - m.Embed = GetEmbed(PotSize).Build(); - }); - } - - Log.Information("Reaction Event awarded {Count} users {Amount} currency.{Remaining}", - toAward.Count, - _amount, - _isPotLimited ? $" {PotSize} left." : ""); - - if (potEmpty) - _ = StopEvent(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error adding bulk currency to users"); - } - } - - public async Task StartEvent() - { - if (Emote.TryParse(_config.Currency.Sign, out var parsedEmote)) - emote = parsedEmote; - else - emote = new Emoji(_config.Currency.Sign); - msg = await _sender.Response(_channel).Embed(GetEmbed(_opts.PotSize)).SendAsync(); - await msg.AddReactionAsync(emote); - _client.MessageDeleted += OnMessageDeleted; - _client.ReactionAdded += HandleReaction; - _t.Change(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(2)); - } - - private EmbedBuilder GetEmbed(long pot) - => _embedFunc(CurrencyEvent.Type.Reaction, _opts, pot); - - private async Task OnMessageDeleted(Cacheable message, Cacheable cacheable) - { - if (message.Id == msg.Id) - await StopEvent(); - } - - public Task StopEvent() - { - lock (_stopLock) - { - if (Stopped) - return Task.CompletedTask; - - Stopped = true; - _client.MessageDeleted -= OnMessageDeleted; - _client.ReactionAdded -= HandleReaction; - _t.Change(Timeout.Infinite, Timeout.Infinite); - _timeout?.Change(Timeout.Infinite, Timeout.Infinite); - try - { - _ = msg.DeleteAsync(); - } - catch { } - - _ = OnEnded?.Invoke(_guild.Id); - } - - return Task.CompletedTask; - } - - private Task HandleReaction( - Cacheable message, - Cacheable cacheable, - SocketReaction r) - { - _ = Task.Run(() => - { - if (emote.Name != r.Emote.Name) - return; - if ((r.User.IsSpecified - ? r.User.Value - : null) is not IGuildUser gu // no unknown users, as they could be bots, or alts - || message.Id != msg.Id // same message - || gu.IsBot // no bots - || (DateTime.UtcNow - gu.CreatedAt).TotalDays <= 5 // no recently created accounts - || (_noRecentlyJoinedServer - && // if specified, no users who joined the server in the last 24h - (gu.JoinedAt is null - || (DateTime.UtcNow - gu.JoinedAt.Value).TotalDays - < 1))) // and no users for who we don't know when they joined - return; - // there has to be money left in the pot - // and the user wasn't rewarded - if (_awardedUsers.Add(r.UserId) && TryTakeFromPot()) - { - _toAward.Enqueue(r.UserId); - if (_isPotLimited && PotSize < _amount) - PotEmptied = true; - } - }); - return Task.CompletedTask; - } - - private bool TryTakeFromPot() - { - if (_isPotLimited) - { - lock (_potLock) - { - if (PotSize < _amount) - return false; - - PotSize -= _amount; - return true; - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs b/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs deleted file mode 100644 index 2704495..0000000 --- a/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs +++ /dev/null @@ -1,140 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.PixelFormats; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class FlipCoinCommands : GamblingSubmodule - { - public enum BetFlipGuess : byte - { - H = 0, - Head = 0, - Heads = 0, - T = 1, - Tail = 1, - Tails = 1 - } - - private static readonly EllieRandom _rng = new(); - private readonly IImageCache _images; - private readonly ICurrencyService _cs; - private readonly ImagesConfig _ic; - - public FlipCoinCommands( - IImageCache images, - ImagesConfig ic, - ICurrencyService cs, - GamblingConfigService gss) - : base(gss) - { - _ic = ic; - _images = images; - _cs = cs; - } - - [Cmd] - public async Task Flip(int count = 1) - { - if (count is > 10 or < 1) - { - await Response().Error(strs.flip_invalid(10)).SendAsync(); - return; - } - - var headCount = 0; - var tailCount = 0; - var imgs = new Image[count]; - var headsArr = await _images.GetHeadsImageAsync(); - var tailsArr = await _images.GetTailsImageAsync(); - - var result = await _service.FlipAsync(count); - - for (var i = 0; i < result.Length; i++) - { - if (result[i].Side == 0) - { - imgs[i] = Image.Load(headsArr); - headCount++; - } - else - { - imgs[i] = Image.Load(tailsArr); - tailCount++; - } - } - - using var img = imgs.Merge(out var format); - await using var stream = await img.ToStreamAsync(format); - foreach (var i in imgs) - i.Dispose(); - - var imgName = $"coins.{format.FileExtensions.First()}"; - - var msg = count != 1 - ? Format.Bold(GetText(strs.flip_results(count, headCount, tailCount))) - : GetText(strs.flipped(headCount > 0 - ? Format.Bold(GetText(strs.heads)) - : Format.Bold(GetText(strs.tails)))); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(msg) - .WithImageUrl($"attachment://{imgName}"); - - await ctx.Channel.SendFileAsync(stream, - imgName, - embed: eb.Build()); - } - - [Cmd] - public async Task Betflip([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, BetFlipGuess guess) - { - if (!await CheckBetMandatory(amount) || amount == 1) - return; - - var res = await _service.BetFlipAsync(ctx.User.Id, amount, (byte)guess); - if (!res.TryPickT0(out var result, out _)) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - Uri imageToSend; - var coins = _ic.Data.Coins; - if (result.Side == 0) - { - imageToSend = coins.Heads[_rng.Next(0, coins.Heads.Length)]; - } - else - { - imageToSend = coins.Tails[_rng.Next(0, coins.Tails.Length)]; - } - - string str; - var won = (long)result.Won; - if (won > 0) - { - str = Format.Bold(GetText(strs.flip_guess(N(won)))); - } - else - { - str = Format.Bold(GetText(strs.better_luck)); - } - - await Response().Embed(_sender.CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(str) - .WithOkColor() - .WithImageUrl(imageToSend.ToString())).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/FlipCoin/FlipResult.cs b/src/EllieBot/Modules/Gambling/FlipCoin/FlipResult.cs deleted file mode 100644 index 6c16b9f..0000000 --- a/src/EllieBot/Modules/Gambling/FlipCoin/FlipResult.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Gambling; - -public readonly struct FlipResult -{ - public long Won { get; init; } - public int Side { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs deleted file mode 100644 index 64fedf5..0000000 --- a/src/EllieBot/Modules/Gambling/Gambling.cs +++ /dev/null @@ -1,903 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Modules.Utility.Services; -using EllieBot.Services.Currency; -using System.Collections.Immutable; -using System.Globalization; -using System.Text; -using EllieBot.Modules.Gambling.Rps; -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Patronage; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling : GamblingModule -{ - private readonly IGamblingService _gs; - private readonly DbService _db; - private readonly ICurrencyService _cs; - private readonly DiscordSocketClient _client; - private readonly NumberFormatInfo _enUsCulture; - private readonly DownloadTracker _tracker; - private readonly GamblingConfigService _configService; - private readonly IBankService _bank; - private readonly IRemindService _remind; - private readonly GamblingTxTracker _gamblingTxTracker; - private readonly IPatronageService _ps; - - public Gambling( - IGamblingService gs, - DbService db, - ICurrencyService currency, - DiscordSocketClient client, - DownloadTracker tracker, - GamblingConfigService configService, - IBankService bank, - IRemindService remind, - IPatronageService patronage, - GamblingTxTracker gamblingTxTracker) - : base(configService) - { - _gs = gs; - _db = db; - _cs = currency; - _client = client; - _bank = bank; - _remind = remind; - _gamblingTxTracker = gamblingTxTracker; - _ps = patronage; - - _enUsCulture = new CultureInfo("en-US", false).NumberFormat; - _enUsCulture.NumberDecimalDigits = 0; - _enUsCulture.NumberGroupSeparator = " "; - _tracker = tracker; - _configService = configService; - } - - public async Task GetBalanceStringAsync(ulong userId) - { - var bal = await _cs.GetBalanceAsync(userId); - return N(bal); - } - - [Cmd] - public async Task BetStats() - { - var stats = await _gamblingTxTracker.GetAllAsync(); - - var eb = _sender.CreateEmbed() - .WithOkColor(); - - var str = "` Feature `|`   Bet  `|`Paid Out`|`  RoI  `\n"; - str += "――――――――――――――――――――\n"; - foreach (var stat in stats) - { - var perc = (stat.PaidOut / stat.Bet).ToString("P2", Culture); - str += $"`{stat.Feature.PadBoth(9)}`" - + $"|`{stat.Bet.ToString("N0").PadLeft(8, ' ')}`" - + $"|`{stat.PaidOut.ToString("N0").PadLeft(8, ' ')}`" - + $"|`{perc.PadLeft(6, ' ')}`\n"; - } - - var bet = stats.Sum(x => x.Bet); - var paidOut = stats.Sum(x => x.PaidOut); - - if (bet == 0) - bet = 1; - - var tPerc = (paidOut / bet).ToString("P2", Culture); - str += "――――――――――――――――――――\n"; - str += $"` {("TOTAL").PadBoth(7)}` " - + $"|**{N(bet).PadLeft(8, ' ')}**" - + $"|**{N(paidOut).PadLeft(8, ' ')}**" - + $"|`{tPerc.PadLeft(6, ' ')}`"; - - eb.WithDescription(str); - - await Response().Embed(eb).SendAsync(); - } - - private async Task RemindTimelyAction(SocketMessageComponent smc, DateTime when) - { - var tt = TimestampTag.FromDateTime(when, TimestampTagStyles.Relative); - - await _remind.AddReminderAsync(ctx.User.Id, - ctx.User.Id, - ctx.Guild?.Id, - true, - when, - GetText(strs.timely_time), - ReminderType.Timely); - - await smc.RespondConfirmAsync(_sender, GetText(strs.remind_timely(tt)), ephemeral: true); - } - - // Creates timely reminder button, parameter in hours. - private EllieInteractionBase CreateRemindMeInteraction(int period) - => _inter - .Create(ctx.User.Id, - new ButtonBuilder( - label: "Remind me", - emote: Emoji.Parse("⏰"), - customId: "timely:remind_me"), - (smc) => RemindTimelyAction(smc, DateTime.UtcNow.Add(TimeSpan.FromHours(period))) - ); - - // Creates timely reminder button, parameter in milliseconds. - private EllieInteractionBase CreateRemindMeInteraction(double ms) - => _inter - .Create(ctx.User.Id, - new ButtonBuilder( - label: "Remind me", - emote: Emoji.Parse("⏰"), - customId: "timely:remind_me"), - (smc) => RemindTimelyAction(smc, DateTime.UtcNow.Add(TimeSpan.FromMilliseconds(ms))) - ); - - [Cmd] - public async Task Timely() - { - var val = Config.Timely.Amount; - var period = Config.Timely.Cooldown; - if (val <= 0 || period <= 0) - { - await Response().Error(strs.timely_none).SendAsync(); - return; - } - - if (await _service.ClaimTimelyAsync(ctx.User.Id, period) is { } remainder) - { - // Get correct time form remainder - var interaction = CreateRemindMeInteraction(remainder.TotalMilliseconds); - - // Removes timely button if there is a timely reminder in DB - if (_service.UserHasTimelyReminder(ctx.User.Id)) - { - interaction = null; - } - - var now = DateTime.UtcNow; - var relativeTag = TimestampTag.FromDateTime(now.Add(remainder), TimestampTagStyles.Relative); - await Response().Pending(strs.timely_already_claimed(relativeTag)).Interaction(interaction).SendAsync(); - return; - } - - - var patron = await _ps.GetPatronAsync(ctx.User.Id); - - var percentBonus = (_ps.PercentBonus(patron) / 100f); - - val += (int)(val * percentBonus); - - var inter = CreateRemindMeInteraction(period); - - await _cs.AddAsync(ctx.User.Id, val, new("timely", "claim")); - - await Response().Confirm(strs.timely(N(val), period)).Interaction(inter).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task TimelyReset() - { - await _service.RemoveAllTimelyClaimsAsync(); - await Response().Confirm(strs.timely_reset).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task TimelySet(int amount, int period = 24) - { - if (amount < 0 || period < 0) - { - return; - } - - _configService.ModifyConfig(gs => - { - gs.Timely.Amount = amount; - gs.Timely.Cooldown = period; - }); - - if (amount == 0) - { - await Response().Confirm(strs.timely_set_none).SendAsync(); - } - else - { - await Response() - .Confirm(strs.timely_set(Format.Bold(N(amount)), Format.Bold(period.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Raffle([Leftover] IRole role = null) - { - role ??= ctx.Guild.EveryoneRole; - - var members = (await role.GetMembersAsync()).Where(u => u.Status != UserStatus.Offline); - var membersArray = members as IUser[] ?? members.ToArray(); - if (membersArray.Length == 0) - { - return; - } - - var usr = membersArray[new EllieRandom().Next(0, membersArray.Length)]; - await Response() - .Confirm("🎟 " + GetText(strs.raffled_user), - $"**{usr.Username}**", - footer: $"ID: {usr.Id}") - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RaffleAny([Leftover] IRole role = null) - { - role ??= ctx.Guild.EveryoneRole; - - var members = await role.GetMembersAsync(); - var membersArray = members as IUser[] ?? members.ToArray(); - if (membersArray.Length == 0) - { - return; - } - - var usr = membersArray[new EllieRandom().Next(0, membersArray.Length)]; - await Response() - .Confirm("🎟 " + GetText(strs.raffled_user), - $"**{usr.Username}**", - footer: $"ID: {usr.Id}") - .SendAsync(); - } - - [Cmd] - [Priority(2)] - public Task CurrencyTransactions(int page = 1) - => InternalCurrencyTransactions(ctx.User.Id, page); - - [Cmd] - [OwnerOnly] - [Priority(0)] - public Task CurrencyTransactions([Leftover] IUser usr) - => InternalCurrencyTransactions(usr.Id, 1); - - [Cmd] - [OwnerOnly] - [Priority(1)] - public Task CurrencyTransactions(IUser usr, int page) - => InternalCurrencyTransactions(usr.Id, page); - - private async Task InternalCurrencyTransactions(ulong userId, int page) - { - if (--page < 0) - { - return; - } - - List trs; - await using (var uow = _db.GetDbContext()) - { - trs = await uow.Set().GetPageFor(userId, page); - } - - var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.transactions(((SocketGuild)ctx.Guild)?.GetUser(userId)?.ToString() - ?? $"{userId}"))) - .WithOkColor(); - - var sb = new StringBuilder(); - foreach (var tr in trs) - { - var change = tr.Amount >= 0 ? "🔵" : "🔴"; - var kwumId = new kwum(tr.Id).ToString(); - var date = $"#{Format.Code(kwumId)} `〖{GetFormattedCurtrDate(tr)}〗`"; - - sb.AppendLine($"\\{change} {date} {Format.Bold(N(tr.Amount))}"); - var transactionString = GetHumanReadableTransaction(tr.Type, tr.Extra, tr.OtherId); - if (transactionString is not null) - { - sb.AppendLine(transactionString); - } - - if (!string.IsNullOrWhiteSpace(tr.Note)) - { - sb.AppendLine($"\t`Note:` {tr.Note.TrimTo(50)}"); - } - } - - embed.WithDescription(sb.ToString()); - embed.WithFooter(GetText(strs.page(page + 1))); - await Response().Embed(embed).SendAsync(); - } - - private static string GetFormattedCurtrDate(CurrencyTransaction ct) - => $"{ct.DateAdded:HH:mm yyyy-MM-dd}"; - - [Cmd] - public async Task CurrencyTransaction(kwum id) - { - int intId = id; - await using var uow = _db.GetDbContext(); - - var tr = await uow.Set() - .ToLinqToDBTable() - .Where(x => x.Id == intId && x.UserId == ctx.User.Id) - .FirstOrDefaultAsync(); - - if (tr is null) - { - await Response().Error(strs.not_found).SendAsync(); - return; - } - - var eb = _sender.CreateEmbed().WithOkColor(); - - eb.WithAuthor(ctx.User); - eb.WithTitle(GetText(strs.transaction)); - eb.WithDescription(new kwum(tr.Id).ToString()); - eb.AddField("Amount", N(tr.Amount)); - eb.AddField("Type", tr.Type, true); - eb.AddField("Extra", tr.Extra, true); - - if (tr.OtherId is ulong other) - { - eb.AddField("From Id", other); - } - - if (!string.IsNullOrWhiteSpace(tr.Note)) - { - eb.AddField("Note", tr.Note); - } - - eb.WithFooter(GetFormattedCurtrDate(tr)); - - await Response().Embed(eb).SendAsync(); - } - - private string GetHumanReadableTransaction(string type, string subType, ulong? maybeUserId) - => (type, subType, maybeUserId) switch - { - ("gift", var name, ulong userId) => GetText(strs.curtr_gift(name, userId)), - ("award", var name, ulong userId) => GetText(strs.curtr_award(name, userId)), - ("take", var name, ulong userId) => GetText(strs.curtr_take(name, userId)), - ("blackjack", _, _) => $"Blackjack - {subType}", - ("wheel", _, _) => $"Lucky Ladder - {subType}", - ("lula", _, _) => $"Lucky Ladder - {subType}", - ("rps", _, _) => $"Rock Paper Scissors - {subType}", - (null, _, _) => null, - (_, null, _) => null, - (_, _, ulong userId) => $"{type} - {subType} | [{userId}]", - _ => $"{type} - {subType}" - }; - - [Cmd] - [Priority(0)] - public async Task Cash(ulong userId) - { - var cur = await GetBalanceStringAsync(userId); - await Response().Confirm(strs.has(Format.Code(userId.ToString()), cur)).SendAsync(); - } - - private async Task BankAction(SocketMessageComponent smc) - { - var balance = await _bank.GetBalanceAsync(ctx.User.Id); - - await N(balance) - .Pipe(strs.bank_balance) - .Pipe(GetText) - .Pipe(text => smc.RespondConfirmAsync(_sender, text, ephemeral: true)); - } - - private EllieInteractionBase CreateCashInteraction() - => _inter.Create(ctx.User.Id, - new ButtonBuilder( - customId: "cash:bank_show_balance", - emote: new Emoji("🏦")), - BankAction); - - [Cmd] - [Priority(1)] - public async Task Cash([Leftover] IUser user = null) - { - user ??= ctx.User; - var cur = await GetBalanceStringAsync(user.Id); - - var inter = user == ctx.User - ? CreateCashInteraction() - : null; - - await Response() - .Confirm( - user.ToString() - .Pipe(Format.Bold) - .With(cur) - .Pipe(strs.has)) - .Interaction(inter) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public async Task Give( - [OverrideTypeReader(typeof(BalanceTypeReader))] - long amount, - IGuildUser receiver, - [Leftover] string msg) - { - if (amount <= 0 || ctx.User.Id == receiver.Id || receiver.IsBot) - { - return; - } - - if (!await _cs.TransferAsync(_sender, ctx.User, receiver, amount, msg, N(amount))) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - await Response().Confirm(strs.gifted(N(amount), Format.Bold(receiver.ToString()), ctx.User)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public Task Give([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, [Leftover] IGuildUser receiver) - => Give(amount, receiver, null); - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - [Priority(0)] - public Task Award(long amount, IGuildUser usr, [Leftover] string msg) - => Award(amount, usr.Id, msg); - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - [Priority(1)] - public Task Award(long amount, [Leftover] IGuildUser usr) - => Award(amount, usr.Id); - - [Cmd] - [OwnerOnly] - [Priority(2)] - public async Task Award(long amount, ulong usrId, [Leftover] string msg = null) - { - if (amount <= 0) - { - return; - } - - var usr = await ((DiscordSocketClient)Context.Client).Rest.GetUserAsync(usrId); - - if (usr is null) - { - await Response().Error(strs.user_not_found).SendAsync(); - return; - } - - await _cs.AddAsync(usr.Id, amount, new("award", ctx.User.ToString()!, msg, ctx.User.Id)); - await Response().Confirm(strs.awarded(N(amount), $"<@{usrId}>", ctx.User)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - [Priority(3)] - public async Task Award(long amount, [Leftover] IRole role) - { - var users = (await ctx.Guild.GetUsersAsync()).Where(u => u.GetRoles().Contains(role)).ToList(); - - await _cs.AddBulkAsync(users.Select(x => x.Id).ToList(), - amount, - new("award", ctx.User.ToString()!, role.Name, ctx.User.Id)); - - await Response() - .Confirm(strs.mass_award(N(amount), - Format.Bold(users.Count.ToString()), - Format.Bold(role.Name))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - [Priority(0)] - public async Task Take(long amount, [Leftover] IRole role) - { - var users = (await role.GetMembersAsync()).ToList(); - - await _cs.RemoveBulkAsync(users.Select(x => x.Id).ToList(), - amount, - new("take", ctx.User.ToString()!, null, ctx.User.Id)); - - await Response() - .Confirm(strs.mass_take(N(amount), - Format.Bold(users.Count.ToString()), - Format.Bold(role.Name))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - [Priority(1)] - public async Task Take(long amount, [Leftover] IGuildUser user) - { - if (amount <= 0) - { - return; - } - - var extra = new TxData("take", ctx.User.ToString()!, null, ctx.User.Id); - - if (await _cs.RemoveAsync(user.Id, amount, extra)) - { - await Response().Confirm(strs.take(N(amount), Format.Bold(user.ToString()))).SendAsync(); - } - else - { - await Response().Error(strs.take_fail(N(amount), Format.Bold(user.ToString()), CurrencySign)).SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task Take(long amount, [Leftover] ulong usrId) - { - if (amount <= 0) - { - return; - } - - var extra = new TxData("take", ctx.User.ToString()!, null, ctx.User.Id); - - if (await _cs.RemoveAsync(usrId, amount, extra)) - { - await Response().Confirm(strs.take(N(amount), $"<@{usrId}>")).SendAsync(); - } - else - { - await Response().Error(strs.take_fail(N(amount), Format.Code(usrId.ToString()), CurrencySign)).SendAsync(); - } - } - - [Cmd] - public async Task BetRoll([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - { - if (!await CheckBetMandatory(amount)) - { - return; - } - - var maybeResult = await _gs.BetRollAsync(ctx.User.Id, amount); - if (!maybeResult.TryPickT0(out var result, out _)) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - - var win = (long)result.Won; - string str; - if (win > 0) - { - str = GetText(strs.br_win(N(win), result.Threshold + (result.Roll == 100 ? " 👑" : ""))); - } - else - { - str = GetText(strs.better_luck); - } - - var eb = _sender.CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(Format.Bold(str)) - .AddField(GetText(strs.roll2), result.Roll.ToString(CultureInfo.InvariantCulture)) - .WithOkColor(); - - await Response().Embed(eb).SendAsync(); - } - - [Cmd] - [EllieOptions] - [Priority(0)] - public Task Leaderboard(params string[] args) - => Leaderboard(1, args); - - [Cmd] - [EllieOptions] - [Priority(1)] - public async Task Leaderboard(int page = 1, params string[] args) - { - if (--page < 0) - { - return; - } - - var (opts, _) = OptionsParser.ParseFrom(new LbOpts(), args); - - // List cleanRichest; - // it's pointless to have clean on dm context - if (ctx.Guild is null) - { - opts.Clean = false; - } - - - async Task> GetTopRichest(int curPage) - { - if (opts.Clean) - { - await ctx.Channel.TriggerTypingAsync(); - await _tracker.EnsureUsersDownloadedAsync(ctx.Guild); - - await using var uow = _db.GetDbContext(); - - var cleanRichest = await uow.Set() - .GetTopRichest(_client.CurrentUser.Id, 0, 1000); - - var sg = (SocketGuild)ctx.Guild!; - return cleanRichest.Where(x => sg.GetUser(x.UserId) is not null).ToList(); - } - else - { - await using var uow = _db.GetDbContext(); - return await uow.Set().GetTopRichest(_client.CurrentUser.Id, curPage); - } - } - - var res = Response() - .Paginated(); - - await Response() - .Paginated() - .PageItems(GetTopRichest) - .TotalElements(900) - .PageSize(9) - .CurrentPage(page) - .Page((toSend, curPage) => - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(CurrencySign + " " + GetText(strs.leaderboard)); - - if (!toSend.Any()) - { - embed.WithDescription(GetText(strs.no_user_on_this_page)); - return Task.FromResult(embed); - } - - for (var i = 0; i < toSend.Count; i++) - { - var x = toSend[i]; - var usrStr = x.ToString().TrimTo(20, true); - - var j = i; - embed.AddField("#" + ((9 * curPage) + j + 1) + " " + usrStr, N(x.CurrencyAmount), true); - } - - return Task.FromResult(embed); - }) - .SendAsync(); - } - - public enum InputRpsPick : byte - { - R = 0, - Rock = 0, - Rocket = 0, - P = 1, - Paper = 1, - Paperclip = 1, - S = 2, - Scissors = 2 - } - - [Cmd] - public async Task Rps(InputRpsPick pick, [OverrideTypeReader(typeof(BalanceTypeReader))] long amount = default) - { - static string GetRpsPick(InputRpsPick p) - { - switch (p) - { - case InputRpsPick.R: - return "🚀"; - case InputRpsPick.P: - return "📎"; - default: - return "✂️"; - } - } - - if (!await CheckBetOptional(amount) || amount == 1) - return; - - var res = await _gs.RpsAsync(ctx.User.Id, amount, (byte)pick); - - if (!res.TryPickT0(out var result, out _)) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed(); - - string msg; - if (result.Result == RpsResultType.Draw) - { - msg = GetText(strs.rps_draw(GetRpsPick(pick))); - } - else if (result.Result == RpsResultType.Win) - { - if ((long)result.Won > 0) - embed.AddField(GetText(strs.won), N((long)result.Won)); - - msg = GetText(strs.rps_win(ctx.User.Mention, - GetRpsPick(pick), - GetRpsPick((InputRpsPick)result.ComputerPick))); - } - else - { - msg = GetText(strs.rps_win(ctx.Client.CurrentUser.Mention, - GetRpsPick((InputRpsPick)result.ComputerPick), - GetRpsPick(pick))); - } - - embed - .WithOkColor() - .WithDescription(msg); - - await Response().Embed(embed).SendAsync(); - } - - private static readonly ImmutableArray _emojis = - new[] { "⬆", "↖", "⬅", "↙", "⬇", "↘", "➡", "↗" }.ToImmutableArray(); - - - [Cmd] - public async Task LuckyLadder([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - { - if (!await CheckBetMandatory(amount)) - return; - - var res = await _gs.LulaAsync(ctx.User.Id, amount); - if (!res.TryPickT0(out var result, out _)) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - var multis = result.Multipliers; - - var sb = new StringBuilder(); - foreach (var multi in multis) - { - sb.Append($"╠══╣"); - - if (multi == result.Multiplier) - sb.Append($"{Format.Bold($"x{multi:0.##}")} ⬅️"); - else - sb.Append($"||x{multi:0.##}||"); - - sb.AppendLine(); - } - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(sb.ToString()) - .AddField(GetText(strs.multiplier), $"{result.Multiplier:0.##}x", true) - .AddField(GetText(strs.won), $"{(long)result.Won}", true) - .WithAuthor(ctx.User); - - - await Response().Embed(eb).SendAsync(); - } - - - public enum GambleTestTarget - { - Slot, - Betroll, - Betflip, - BetflipT, - BetDraw, - BetDrawHL, - BetDrawRB, - Lula, - Rps, - } - - [Cmd] - [OwnerOnly] - public async Task BetTest() - { - var values = Enum.GetValues() - .Select(x => $"`{x}`") - .Join(", "); - - await Response().Confirm(GetText(strs.available_tests), values).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task BetTest(GambleTestTarget target, int tests = 1000) - { - if (tests <= 0) - return; - - await ctx.Channel.TriggerTypingAsync(); - - var streak = 0; - var maxW = 0; - var maxL = 0; - - var dict = new Dictionary(); - for (var i = 0; i < tests; i++) - { - var multi = target switch - { - GambleTestTarget.BetDraw => (await _gs.BetDrawAsync(ctx.User.Id, 0, 1, 0)).AsT0.Multiplier, - GambleTestTarget.BetDrawRB => (await _gs.BetDrawAsync(ctx.User.Id, 0, null, 1)).AsT0.Multiplier, - GambleTestTarget.BetDrawHL => (await _gs.BetDrawAsync(ctx.User.Id, 0, 0, null)).AsT0.Multiplier, - GambleTestTarget.Slot => (await _gs.SlotAsync(ctx.User.Id, 0)).AsT0.Multiplier, - GambleTestTarget.Betflip => (await _gs.BetFlipAsync(ctx.User.Id, 0, 0)).AsT0.Multiplier, - GambleTestTarget.BetflipT => (await _gs.BetFlipAsync(ctx.User.Id, 0, 1)).AsT0.Multiplier, - GambleTestTarget.Lula => (await _gs.LulaAsync(ctx.User.Id, 0)).AsT0.Multiplier, - GambleTestTarget.Rps => (await _gs.RpsAsync(ctx.User.Id, 0, (byte)(i % 3))).AsT0.Multiplier, - GambleTestTarget.Betroll => (await _gs.BetRollAsync(ctx.User.Id, 0)).AsT0.Multiplier, - _ => throw new ArgumentOutOfRangeException(nameof(target)) - }; - - if (dict.ContainsKey(multi)) - dict[multi] += 1; - else - dict.Add(multi, 1); - - if (multi < 1) - { - if (streak <= 0) - --streak; - else - streak = -1; - - maxL = Math.Max(maxL, -streak); - } - else if (multi > 1) - { - if (streak >= 0) - ++streak; - else - streak = 1; - - maxW = Math.Max(maxW, streak); - } - } - - var sb = new StringBuilder(); - decimal payout = 0; - foreach (var key in dict.Keys.OrderByDescending(x => x)) - { - sb.AppendLine($"x**{key}** occured `{dict[key]}` times. {dict[key] * 1.0f / tests * 100}%"); - payout += key * dict[key]; - } - - sb.AppendLine(); - sb.AppendLine($"Longest win streak: `{maxW}`"); - sb.AppendLine($"Longest lose streak: `{maxL}`"); - - await Response() - .Confirm(GetText(strs.test_results_for(target)), - sb.ToString(), - footer: $"Total Bet: {tests} | Payout: {payout:F0} | {payout * 1.0M / tests * 100}%") - .SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingConfig.cs b/src/EllieBot/Modules/Gambling/GamblingConfig.cs deleted file mode 100644 index 7b6582c..0000000 --- a/src/EllieBot/Modules/Gambling/GamblingConfig.cs +++ /dev/null @@ -1,411 +0,0 @@ -#nullable disable -using Cloneable; -using EllieBot.Common.Yml; -using SixLabors.ImageSharp.PixelFormats; -using YamlDotNet.Serialization; -using Color = SixLabors.ImageSharp.Color; - -namespace EllieBot.Modules.Gambling.Common; - -[Cloneable] -public sealed partial class GamblingConfig : ICloneable -{ - [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 8; - - [Comment("""Currency settings""")] - public CurrencyConfig Currency { get; set; } - - [Comment("""Minimum amount users can bet (>=0)""")] - public int MinBet { get; set; } = 0; - - [Comment(""" - Maximum amount users can bet - Set 0 for unlimited - """)] - public int MaxBet { get; set; } = 0; - - [Comment("""Settings for betflip command""")] - public BetFlipConfig BetFlip { get; set; } - - [Comment("""Settings for betroll command""")] - public BetRollConfig BetRoll { get; set; } - - [Comment("""Automatic currency generation settings.""")] - public GenerationConfig Generation { get; set; } - - [Comment(""" - Settings for timely command - (letting people claim X amount of currency every Y hours) - """)] - public TimelyConfig Timely { get; set; } - - [Comment("""How much will each user's owned currency decay over time.""")] - public DecayConfig Decay { get; set; } - - [Comment("""What is the bot's cut on some transactions""")] - public BotCutConfig BotCuts { get; set; } - - [Comment("""Settings for LuckyLadder command""")] - public LuckyLadderSettings LuckyLadder { get; set; } - - [Comment("""Settings related to waifus""")] - public WaifuConfig Waifu { get; set; } - - [Comment(""" - Amount of currency selfhosters will get PER pledged dollar CENT. - 1 = 100 currency per $. Used almost exclusively on public ellie. - """)] - public decimal PatreonCurrencyPerCent { get; set; } = 1; - - [Comment(""" - Currency reward per vote. - This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting - """)] - public long VoteReward { get; set; } = 100; - - [Comment("""Slot config""")] - public SlotsConfig Slots { get; set; } - - public GamblingConfig() - { - BetRoll = new(); - Waifu = new(); - Currency = new(); - BetFlip = new(); - Generation = new(); - Timely = new(); - Decay = new(); - Slots = new(); - LuckyLadder = new(); - BotCuts = new(); - } -} - -public class CurrencyConfig -{ - [Comment("""What is the emoji/character which represents the currency""")] - public string Sign { get; set; } = "💵"; - - [Comment("""What is the name of the currency""")] - public string Name { get; set; } = "Ellie Money"; - - [Comment(""" - For how long (in days) will the transactions be kept in the database (curtrs) - Set 0 to disable cleanup (keep transactions forever) - """)] - public int TransactionsLifetime { get; set; } = 0; -} - -[Cloneable] -public partial class TimelyConfig -{ - [Comment(""" - How much currency will the users get every time they run .timely command - setting to 0 or less will disable this feature - """)] - public int Amount { get; set; } = 0; - - [Comment(""" - How often (in hours) can users claim currency with .timely command - setting to 0 or less will disable this feature - """)] - public int Cooldown { get; set; } = 24; -} - -[Cloneable] -public partial class BetFlipConfig -{ - [Comment("""Bet multiplier if user guesses correctly""")] - public decimal Multiplier { get; set; } = 1.95M; -} - -[Cloneable] -public partial class BetRollConfig -{ - [Comment(""" - When betroll is played, user will roll a number 0-100. - This setting will describe which multiplier is used for when the roll is higher than the given number. - Doesn't have to be ordered. - """)] - public BetRollPair[] Pairs { get; set; } = Array.Empty(); - - public BetRollConfig() - => Pairs = - [ - new() - { - WhenAbove = 99, - MultiplyBy = 10 - }, - new() - { - WhenAbove = 90, - MultiplyBy = 4 - }, - new() - { - WhenAbove = 66, - MultiplyBy = 2 - } - ]; -} - -[Cloneable] -public partial class GenerationConfig -{ - [Comment(""" - when currency is generated, should it also have a random password - associated with it which users have to type after the .pick command - in order to get it - """)] - public bool HasPassword { get; set; } = true; - - [Comment(""" - Every message sent has a certain % chance to generate the currency - specify the percentage here (1 being 100%, 0 being 0% - for example - default is 0.02, which is 2% - """)] - public decimal Chance { get; set; } = 0.02M; - - [Comment("""How many seconds have to pass for the next message to have a chance to spawn currency""")] - public int GenCooldown { get; set; } = 10; - - [Comment("""Minimum amount of currency that can spawn""")] - public int MinAmount { get; set; } = 1; - - [Comment(""" - Maximum amount of currency that can spawn. - Set to the same value as MinAmount to always spawn the same amount - """)] - public int MaxAmount { get; set; } = 1; -} - -[Cloneable] -public partial class DecayConfig -{ - [Comment(""" - Percentage of user's current currency which will be deducted every 24h. - 0 - 1 (1 is 100%, 0.5 50%, 0 disabled) - """)] - public decimal Percent { get; set; } = 0; - - [Comment("""Maximum amount of user's currency that can decay at each interval. 0 for unlimited.""")] - public int MaxDecay { get; set; } = 0; - - [Comment("""Only users who have more than this amount will have their currency decay.""")] - public int MinThreshold { get; set; } = 99; - - [Comment("""How often, in hours, does the decay run. Default is 24 hours""")] - public int HourInterval { get; set; } = 24; -} - -[Cloneable] -public partial class LuckyLadderSettings -{ - [Comment("""Self-Explanatory. Has to have 8 values, otherwise the command won't work.""")] - public decimal[] Multipliers { get; set; } - - public LuckyLadderSettings() - => Multipliers = [2.4M, 1.7M, 1.5M, 1.2M, 0.5M, 0.3M, 0.2M, 0.1M]; -} - -[Cloneable] -public sealed partial class WaifuConfig -{ - [Comment("""Minimum price a waifu can have""")] - public long MinPrice { get; set; } = 50; - - public MultipliersData Multipliers { get; set; } = new(); - - [Comment(""" - Settings for periodic waifu price decay. - Waifu price decays only if the waifu has no claimer. - """)] - public WaifuDecayConfig Decay { get; set; } = new(); - - [Comment(""" - List of items available for gifting. - If negative is true, gift will instead reduce waifu value. - """)] - public List Items { get; set; } = []; - - public WaifuConfig() - => Items = - [ - new("🥔", 5, "Potato"), - new("🍪", 10, "Cookie"), - new("🥖", 20, "Bread"), - new("🍭", 30, "Lollipop"), - new("🌹", 50, "Rose"), - new("🍺", 70, "Beer"), - new("🌮", 85, "Taco"), - new("💌", 100, "LoveLetter"), - new("🥛", 125, "Milk"), - new("🍕", 150, "Pizza"), - new("🍫", 200, "Chocolate"), - new("🍦", 250, "Icecream"), - new("🍣", 300, "Sushi"), - new("🍚", 400, "Rice"), - new("🍉", 500, "Watermelon"), - new("🍱", 600, "Bento"), - new("🎟", 800, "MovieTicket"), - new("🍰", 1000, "Cake"), - new("📔", 1500, "Book"), - new("🐱", 2000, "Cat"), - new("🐶", 2001, "Dog"), - new("🐼", 2500, "Panda"), - new("💄", 3000, "Lipstick"), - new("👛", 3500, "Purse"), - new("📱", 4000, "iPhone"), - new("👗", 4500, "Dress"), - new("💻", 5000, "Laptop"), - new("🎻", 7500, "Violin"), - new("🎹", 8000, "Piano"), - new("🚗", 9000, "Car"), - new("💍", 10000, "Ring"), - new("🛳", 12000, "Ship"), - new("🏠", 15000, "House"), - new("🚁", 20000, "Helicopter"), - new("🚀", 30000, "Spaceship"), - new("🌕", 50000, "Moon") - ]; - - public class WaifuDecayConfig - { - [Comment(""" - Unclaimed waifus will decay by this percentage (0 - 100). - Default is 0 (disabled) - For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - """)] - public int UnclaimedDecayPercent { get; set; } = 0; - - [Comment(""" - Claimed waifus will decay by this percentage (0 - 100). - Default is 0 (disabled) - For example if a waifu has a price of $500, setting this value to 10 would reduce the waifu by 10% ($50) - """)] - public int ClaimedDecayPercent { get; set; } = 0; - - [Comment("""How often to decay waifu values, in hours""")] - public int HourInterval { get; set; } = 24; - - [Comment(""" - Minimum waifu price required for the decay to be applied. - For example if this value is set to 300, any waifu with the price 300 or less will not experience decay. - """)] - public long MinPrice { get; set; } = 300; - } -} - -[Cloneable] -public sealed partial class MultipliersData -{ - [Comment(""" - Multiplier for waifureset. Default 150. - Formula (at the time of writing this): - price = (waifu_price * 1.25f) + ((number_of_divorces + changes_of_heart + 2) * WaifuReset) rounded up - """)] - public int WaifuReset { get; set; } = 150; - - [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu who doesn't have a crush on you. - Default is 1.1 - Example: If a waifu is worth 100, you will have to pay at least 100 * NormalClaim currency to claim her. - (100 * 1.1 = 110) - """)] - public decimal NormalClaim { get; set; } = 1.1m; - - [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu that has a crush on you. - Default is 0.88 - Example: If a waifu is worth 100, you will have to pay at least 100 * CrushClaim currency to claim her. - (100 * 0.88 = 88) - """)] - public decimal CrushClaim { get; set; } = 0.88M; - - [Comment(""" - When divorcing a waifu, her new value will be her current value multiplied by this number. - Default 0.75 (meaning will lose 25% of her value) - """)] - public decimal DivorceNewValue { get; set; } = 0.75M; - - [Comment(""" - All gift prices will be multiplied by this number. - Default 1 (meaning no effect) - """)] - public decimal AllGiftPrices { get; set; } = 1.0M; - - [Comment(""" - What percentage of the value of the gift will a waifu gain when she's gifted. - Default 0.95 (meaning 95%) - Example: If a waifu is worth 1000, and she receives a gift worth 100, her new value will be 1095) - """)] - public decimal GiftEffect { get; set; } = 0.95M; - - [Comment(""" - What percentage of the value of the gift will a waifu lose when she's gifted a gift marked as 'negative'. - Default 0.5 (meaning 50%) - Example: If a waifu is worth 1000, and she receives a negative gift worth 100, her new value will be 950) - """)] - public decimal NegativeGiftEffect { get; set; } = 0.50M; -} - -public sealed class SlotsConfig -{ - [Comment("""Hex value of the color which the numbers on the slot image will have.""")] - public Rgba32 CurrencyFontColor { get; set; } = Color.Red; -} - -[Cloneable] -public sealed partial class WaifuItemModel -{ - public string ItemEmoji { get; set; } - public long Price { get; set; } - public string Name { get; set; } - - [YamlMember(DefaultValuesHandling = DefaultValuesHandling.OmitDefaults)] - public bool Negative { get; set; } - - public WaifuItemModel() - { - } - - public WaifuItemModel( - string itemEmoji, - long price, - string name, - bool negative = false) - { - ItemEmoji = itemEmoji; - Price = price; - Name = name; - Negative = negative; - } - - - public override string ToString() - => Name; -} - -[Cloneable] -public sealed partial class BetRollPair -{ - public int WhenAbove { get; set; } - public float MultiplyBy { get; set; } -} - -[Cloneable] -public sealed partial class BotCutConfig -{ - [Comment(""" - Shop sale cut percentage. - Whenever a user buys something from the shop, bot will take a cut equal to this percentage. - The rest goes to the user who posted the item/role/whatever to the shop. - This is a good way to reduce the amount of currency in circulation therefore keeping the inflation in check. - Default 0.1 (10%). - """)] - public decimal ShopSaleCut { get; set; } = 0.1m; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs deleted file mode 100644 index c1ad447..0000000 --- a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs +++ /dev/null @@ -1,203 +0,0 @@ -#nullable disable -using EllieBot.Common.Configs; -using EllieBot.Modules.Gambling.Common; - -namespace EllieBot.Modules.Gambling.Services; - -public sealed class GamblingConfigService : ConfigServiceBase -{ - private const string FILE_PATH = "data/gambling.yml"; - private static readonly TypedKey _changeKey = new("config.gambling.updated"); - - public override string Name - => "gambling"; - - private readonly IEnumerable _antiGiftSeed = new[] - { - new WaifuItemModel("🥀", 100, "WiltedRose", true), new WaifuItemModel("✂️", 1000, "Haircut", true), - new WaifuItemModel("🧻", 10000, "ToiletPaper", true) - }; - - public GamblingConfigService(IConfigSeria serializer, IPubSub pubSub) - : base(FILE_PATH, serializer, pubSub, _changeKey) - { - AddParsedProp("currency.name", - gs => gs.Currency.Name, - ConfigParsers.String, - ConfigPrinters.ToString); - - AddParsedProp("currency.sign", - gs => gs.Currency.Sign, - ConfigParsers.String, - ConfigPrinters.ToString); - - AddParsedProp("minbet", - gs => gs.MinBet, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("maxbet", - gs => gs.MaxBet, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("gen.min", - gs => gs.Generation.MinAmount, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 1); - - AddParsedProp("gen.max", - gs => gs.Generation.MaxAmount, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 1); - - AddParsedProp("gen.cd", - gs => gs.Generation.GenCooldown, - int.TryParse, - ConfigPrinters.ToString, - val => val > 0); - - AddParsedProp("gen.chance", - gs => gs.Generation.Chance, - decimal.TryParse, - ConfigPrinters.ToString, - val => val is >= 0 and <= 1); - - AddParsedProp("gen.has_pw", - gs => gs.Generation.HasPassword, - bool.TryParse, - ConfigPrinters.ToString); - - AddParsedProp("bf.multi", - gs => gs.BetFlip.Multiplier, - decimal.TryParse, - ConfigPrinters.ToString, - val => val >= 1); - - AddParsedProp("waifu.min_price", - gs => gs.Waifu.MinPrice, - long.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("waifu.multi.reset", - gs => gs.Waifu.Multipliers.WaifuReset, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("waifu.multi.crush_claim", - gs => gs.Waifu.Multipliers.CrushClaim, - decimal.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("waifu.multi.normal_claim", - gs => gs.Waifu.Multipliers.NormalClaim, - decimal.TryParse, - ConfigPrinters.ToString, - val => val > 0); - - AddParsedProp("waifu.multi.divorce_value", - gs => gs.Waifu.Multipliers.DivorceNewValue, - decimal.TryParse, - ConfigPrinters.ToString, - val => val > 0); - - AddParsedProp("waifu.multi.all_gifts", - gs => gs.Waifu.Multipliers.AllGiftPrices, - decimal.TryParse, - ConfigPrinters.ToString, - val => val > 0); - - AddParsedProp("waifu.multi.gift_effect", - gs => gs.Waifu.Multipliers.GiftEffect, - decimal.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("waifu.multi.negative_gift_effect", - gs => gs.Waifu.Multipliers.NegativeGiftEffect, - decimal.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("decay.percent", - gs => gs.Decay.Percent, - decimal.TryParse, - ConfigPrinters.ToString, - val => val is >= 0 and <= 1); - - AddParsedProp("decay.maxdecay", - gs => gs.Decay.MaxDecay, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - AddParsedProp("decay.threshold", - gs => gs.Decay.MinThreshold, - int.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - - Migrate(); - } - - public void Migrate() - { - if (data.Version < 2) - { - ModifyConfig(c => - { - c.Waifu.Items = c.Waifu.Items.Concat(_antiGiftSeed).ToList(); - c.Version = 2; - }); - } - - if (data.Version < 3) - { - ModifyConfig(c => - { - c.Version = 3; - c.VoteReward = 100; - }); - } - - if (data.Version < 5) - { - ModifyConfig(c => - { - c.Version = 5; - }); - } - - if (data.Version < 6) - { - ModifyConfig(c => - { - c.Version = 6; - }); - } - - if (data.Version < 7) - { - ModifyConfig(c => - { - c.Version = 7; - }); - } - - if (data.Version < 8) - { - ModifyConfig(c => - { - c.Version = 8; - c.Waifu.Decay.UnclaimedDecayPercent = 0; - }); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingService.cs b/src/EllieBot/Modules/Gambling/GamblingService.cs deleted file mode 100644 index f9a55bc..0000000 --- a/src/EllieBot/Modules/Gambling/GamblingService.cs +++ /dev/null @@ -1,187 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Connect4; - -namespace EllieBot.Modules.Gambling.Services; - -public class GamblingService : IEService, IReadyExecutor -{ - public ConcurrentDictionary<(ulong, ulong), RollDuelGame> Duels { get; } = new(); - public ConcurrentDictionary Connect4Games { get; } = new(); - private readonly DbService _db; - private readonly DiscordSocketClient _client; - private readonly IBotCache _cache; - private readonly GamblingConfigService _gss; - - private static readonly TypedKey _curDecayKey = new("currency:last_decay"); - - public GamblingService( - DbService db, - DiscordSocketClient client, - IBotCache cache, - GamblingConfigService gss) - { - _db = db; - _client = client; - _cache = cache; - _gss = gss; - } - - public Task OnReadyAsync() - => Task.WhenAll(CurrencyDecayLoopAsync(), TransactionClearLoopAsync()); - - private async Task TransactionClearLoopAsync() - { - if (_client.ShardId != 0) - return; - - using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); - while (await timer.WaitForNextTickAsync()) - { - try - { - var lifetime = _gss.Data.Currency.TransactionsLifetime; - if (lifetime <= 0) - continue; - - var now = DateTime.UtcNow; - var days = TimeSpan.FromDays(lifetime); - await using var uow = _db.GetDbContext(); - await uow.Set() - .DeleteAsync(ct => ct.DateAdded == null || now - ct.DateAdded < days); - } - catch (Exception ex) - { - Log.Warning(ex, - "An unexpected error occurred in transactions cleanup loop: {ErrorMessage}", - ex.Message); - } - } - } - - private async Task CurrencyDecayLoopAsync() - { - if (_client.ShardId != 0) - return; - - using var timer = new PeriodicTimer(TimeSpan.FromMinutes(5)); - while (await timer.WaitForNextTickAsync()) - { - try - { - var config = _gss.Data; - var maxDecay = config.Decay.MaxDecay; - if (config.Decay.Percent is <= 0 or > 1 || maxDecay < 0) - continue; - - var now = DateTime.UtcNow; - - await using var uow = _db.GetDbContext(); - var result = await _cache.GetAsync(_curDecayKey); - - if (result.TryPickT0(out var bin, out _) - && (now - DateTime.FromBinary(bin) < TimeSpan.FromHours(config.Decay.HourInterval))) - { - continue; - } - - Log.Information(""" - --- Decaying users' currency --- - | decay: {ConfigDecayPercent}% - | max: {MaxDecay} - | threshold: {DecayMinTreshold} - """, - config.Decay.Percent * 100, - maxDecay, - config.Decay.MinThreshold); - - if (maxDecay == 0) - maxDecay = int.MaxValue; - - var decay = (double)config.Decay.Percent; - await uow.Set() - .Where(x => x.CurrencyAmount > config.Decay.MinThreshold && x.UserId != _client.CurrentUser.Id) - .UpdateAsync(old => new() - { - CurrencyAmount = - maxDecay > Sql.Round((old.CurrencyAmount * decay) - 0.5) - ? (long)(old.CurrencyAmount - Sql.Round((old.CurrencyAmount * decay) - 0.5)) - : old.CurrencyAmount - maxDecay - }); - - await uow.SaveChangesAsync(); - - await _cache.AddAsync(_curDecayKey, now.ToBinary()); - } - catch (Exception ex) - { - Log.Warning(ex, - "An unexpected error occurred in currency decay loop: {ErrorMessage}", - ex.Message); - } - } - } - - private static readonly TypedKey _ecoKey = new("ellie:economy"); - - private static readonly SemaphoreSlim _timelyLock = new(1, 1); - - private static TypedKey> _timelyKey - = new("timely:claims"); - - public async Task ClaimTimelyAsync(ulong userId, int period) - { - if (period == 0) - return null; - - await _timelyLock.WaitAsync(); - try - { - // get the dictionary from the cache or get a new one - var dict = (await _cache.GetOrAddAsync(_timelyKey, - () => Task.FromResult(new Dictionary())))!; - - var now = DateTime.UtcNow; - var nowB = now.ToBinary(); - - // try to get users last claim - if (!dict.TryGetValue(userId, out var lastB)) - lastB = dict[userId] = now.ToBinary(); - - var diff = now - DateTime.FromBinary(lastB); - - // if its now, or too long ago => success - if (lastB == nowB || diff > period.Hours()) - { - // update the cache - dict[userId] = nowB; - await _cache.AddAsync(_timelyKey, dict); - - return null; - } - else - { - // otherwise return the remaining time - return period.Hours() - diff; - } - } - finally - { - _timelyLock.Release(); - } - } - - public bool UserHasTimelyReminder(ulong userId) - { - var db = _db.GetDbContext(); - return db.GetTable().Any(x => x.UserId == userId - && x.Type == ReminderType.Timely); - } - - public async Task RemoveAllTimelyClaimsAsync() - => await _cache.RemoveAsync(_timelyKey); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs b/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs deleted file mode 100644 index 25cbb73..0000000 --- a/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs +++ /dev/null @@ -1,68 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Services; -using System.Numerics; - -namespace EllieBot.Modules.Gambling.Common; - -public abstract class GamblingModule : EllieModule -{ - protected GamblingConfig Config - => _lazyConfig.Value; - - protected string CurrencySign - => Config.Currency.Sign; - - protected string CurrencyName - => Config.Currency.Name; - - private readonly Lazy _lazyConfig; - - protected GamblingModule(GamblingConfigService gambService) - => _lazyConfig = new(() => gambService.Data); - - private async Task InternalCheckBet(long amount) - { - if (amount < 1) - return false; - - if (amount < Config.MinBet) - { - await Response().Error(strs.min_bet_limit(Format.Bold(Config.MinBet.ToString()) + CurrencySign)).SendAsync(); - return false; - } - - if (Config.MaxBet > 0 && amount > Config.MaxBet) - { - await Response().Error(strs.max_bet_limit(Format.Bold(Config.MaxBet.ToString()) + CurrencySign)).SendAsync(); - return false; - } - - return true; - } - - protected string N(T cur) - where T : INumber - => CurrencyHelper.N(cur, Culture, CurrencySign); - - protected Task CheckBetMandatory(long amount) - { - if (amount < 1) - return Task.FromResult(false); - return InternalCheckBet(amount); - } - - protected Task CheckBetOptional(long amount) - { - if (amount == 0) - return Task.FromResult(true); - return InternalCheckBet(amount); - } -} - -public abstract class GamblingSubmodule : GamblingModule -{ - protected GamblingSubmodule(GamblingConfigService gamblingConfService) - : base(gamblingConfService) - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/InputRpsPick.cs b/src/EllieBot/Modules/Gambling/InputRpsPick.cs deleted file mode 100644 index d0c76f0..0000000 --- a/src/EllieBot/Modules/Gambling/InputRpsPick.cs +++ /dev/null @@ -1,3 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling; - diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs deleted file mode 100644 index 67994c8..0000000 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs +++ /dev/null @@ -1,114 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class PlantPickCommands : GamblingSubmodule - { - private readonly ILogCommandService _logService; - - public PlantPickCommands(ILogCommandService logService, GamblingConfigService gss) - : base(gss) - => _logService = logService; - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Pick(string pass = null) - { - if (!string.IsNullOrWhiteSpace(pass) && !pass.IsAlphaNumeric()) - return; - - var picked = await _service.PickAsync(ctx.Guild.Id, (ITextChannel)ctx.Channel, ctx.User.Id, pass); - - if (picked > 0) - { - var msg = await Response().NoReply().Confirm(strs.picked(N(picked), ctx.User)).SendAsync(); - msg.DeleteAfter(10); - } - - if (((SocketGuild)ctx.Guild).CurrentUser.GuildPermissions.ManageMessages) - { - try - { - _logService.AddDeleteIgnore(ctx.Message.Id); - await ctx.Message.DeleteAsync(); - } - catch { } - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Plant([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, string pass = null) - { - if (amount < 1) - return; - - if (!string.IsNullOrWhiteSpace(pass) && !pass.IsAlphaNumeric()) - return; - - if (((SocketGuild)ctx.Guild).CurrentUser.GuildPermissions.ManageMessages) - { - _logService.AddDeleteIgnore(ctx.Message.Id); - await ctx.Message.DeleteAsync(); - } - - var success = await _service.PlantAsync(ctx.Guild.Id, - ctx.Channel, - ctx.User.Id, - ctx.User.ToString(), - amount, - pass); - - if (!success) - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] -#if GLOBAL_ELLIE - [OwnerOnly] -#endif - public async Task GenCurrency() - { - var enabled = _service.ToggleCurrencyGeneration(ctx.Guild.Id, ctx.Channel.Id); - if (enabled) - await Response().Confirm(strs.curgen_enabled).SendAsync(); - else - await Response().Confirm(strs.curgen_disabled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [OwnerOnly] - public Task GenCurList(int page = 1) - { - if (--page < 0) - return Task.CompletedTask; - - var enabledIn = _service.GetAllGeneratingChannels(); - - return Response() - .Paginated() - .Items(enabledIn.ToList()) - .PageSize(9) - .CurrentPage(page) - .Page((items, _) => - { - if (!items.Any()) - return _sender.CreateEmbed().WithErrorColor().WithDescription("-"); - - return items.Aggregate(_sender.CreateEmbed().WithOkColor(), - (eb, i) => eb.AddField(i.GuildId.ToString(), i.ChannelId)); - }) - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs deleted file mode 100644 index 37aba9f..0000000 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs +++ /dev/null @@ -1,390 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using SixLabors.Fonts; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using Color = SixLabors.ImageSharp.Color; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Gambling.Services; - -public class PlantPickService : IEService, IExecNoCommand -{ - //channelId/last generation - public ConcurrentDictionary LastGenerations { get; } = new(); - private readonly DbService _db; - private readonly IBotStrings _strings; - private readonly IImageCache _images; - private readonly FontProvider _fonts; - private readonly ICurrencyService _cs; - private readonly CommandHandler _cmdHandler; - private readonly EllieRandom _rng; - private readonly DiscordSocketClient _client; - private readonly GamblingConfigService _gss; - - private readonly ConcurrentHashSet _generationChannels; - private readonly SemaphoreSlim _pickLock = new(1, 1); - - public PlantPickService( - DbService db, - IBotStrings strings, - IImageCache images, - FontProvider fonts, - ICurrencyService cs, - CommandHandler cmdHandler, - DiscordSocketClient client, - GamblingConfigService gss) - { - _db = db; - _strings = strings; - _images = images; - _fonts = fonts; - _cs = cs; - _cmdHandler = cmdHandler; - _rng = new(); - _client = client; - _gss = gss; - - using var uow = db.GetDbContext(); - var guildIds = client.Guilds.Select(x => x.Id).ToList(); - var configs = uow.Set() - .AsQueryable() - .Include(x => x.GenerateCurrencyChannelIds) - .Where(x => guildIds.Contains(x.GuildId)) - .ToList(); - - _generationChannels = new(configs.SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId))); - } - - public Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - => PotentialFlowerGeneration(msg); - - private string GetText(ulong gid, LocStr str) - => _strings.GetText(str, gid); - - public bool ToggleCurrencyGeneration(ulong gid, ulong cid) - { - bool enabled; - using var uow = _db.GetDbContext(); - var guildConfig = uow.GuildConfigsForId(gid, set => set.Include(gc => gc.GenerateCurrencyChannelIds)); - - var toAdd = new GCChannelId - { - ChannelId = cid - }; - if (!guildConfig.GenerateCurrencyChannelIds.Contains(toAdd)) - { - guildConfig.GenerateCurrencyChannelIds.Add(toAdd); - _generationChannels.Add(cid); - enabled = true; - } - else - { - var toDelete = guildConfig.GenerateCurrencyChannelIds.FirstOrDefault(x => x.Equals(toAdd)); - if (toDelete is not null) - uow.Remove(toDelete); - _generationChannels.TryRemove(cid); - enabled = false; - } - - uow.SaveChanges(); - return enabled; - } - - public IEnumerable GetAllGeneratingChannels() - { - using var uow = _db.GetDbContext(); - var chs = uow.Set().GetGeneratingChannels(); - return chs; - } - - /// - /// Get a random currency image stream, with an optional password sticked onto it. - /// - /// Optional password to add to top left corner. - /// Stream of the currency image - public async Task<(Stream, string)> GetRandomCurrencyImageAsync(string pass) - { - var curImg = await _images.GetCurrencyImageAsync(); - - if (curImg is null) - return (new MemoryStream(), null); - - if (string.IsNullOrWhiteSpace(pass)) - { - // determine the extension - using var load = Image.Load(curImg); - - var format = load.Metadata.DecodedImageFormat; - // return the image - return (curImg.ToStream(), format?.FileExtensions.FirstOrDefault() ?? "png"); - } - - // get the image stream and extension - return AddPassword(curImg, pass); - } - - /// - /// Add a password to the image. - /// - /// Image to add password to. - /// Password to add to top left corner. - /// Image with the password in the top left corner. - private (Stream, string) AddPassword(byte[] curImg, string pass) - { - // draw lower, it looks better - pass = pass.TrimTo(10, true).ToLowerInvariant(); - using var img = Image.Load(curImg); - // choose font size based on the image height, so that it's visible - var font = _fonts.NotoSans.CreateFont(img.Height / 12.0f, FontStyle.Bold); - img.Mutate(x => - { - // measure the size of the text to be drawing - var size = TextMeasurer.MeasureSize(pass, - new TextOptions(font) - { - Origin = new PointF(0, 0) - }); - - // fill the background with black, add 5 pixels on each side to make it look better - x.FillPolygon(Color.ParseHex("00000080"), - new PointF(0, 0), - new PointF(size.Width + 5, 0), - new PointF(size.Width + 5, size.Height + 10), - new PointF(0, size.Height + 10)); - - // draw the password over the background - x.DrawText(pass, font, Color.White, new(0, 0)); - }); - // return image as a stream for easy sending - var format = img.Metadata.DecodedImageFormat; - return (img.ToStream(format), format.FileExtensions.FirstOrDefault() ?? "png"); - } - - private Task PotentialFlowerGeneration(IUserMessage imsg) - { - if (imsg is not SocketUserMessage msg || msg.Author.IsBot) - return Task.CompletedTask; - - if (imsg.Channel is not ITextChannel channel) - return Task.CompletedTask; - - if (!_generationChannels.Contains(channel.Id)) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - try - { - var config = _gss.Data; - var lastGeneration = LastGenerations.GetOrAdd(channel.Id, DateTime.MinValue.ToBinary()); - var rng = new EllieRandom(); - - if (DateTime.UtcNow - TimeSpan.FromSeconds(config.Generation.GenCooldown) - < DateTime.FromBinary(lastGeneration)) //recently generated in this channel, don't generate again - return; - - var num = rng.Next(1, 101) + (config.Generation.Chance * 100); - if (num > 100 && LastGenerations.TryUpdate(channel.Id, DateTime.UtcNow.ToBinary(), lastGeneration)) - { - var dropAmount = config.Generation.MinAmount; - var dropAmountMax = config.Generation.MaxAmount; - - if (dropAmountMax > dropAmount) - dropAmount = new EllieRandom().Next(dropAmount, dropAmountMax + 1); - - if (dropAmount > 0) - { - var prefix = _cmdHandler.GetPrefix(channel.Guild.Id); - var toSend = dropAmount == 1 - ? GetText(channel.GuildId, strs.curgen_sn(config.Currency.Sign)) - + " " - + GetText(channel.GuildId, strs.pick_sn(prefix)) - : GetText(channel.GuildId, strs.curgen_pl(dropAmount, config.Currency.Sign)) - + " " - + GetText(channel.GuildId, strs.pick_pl(prefix)); - - var pw = config.Generation.HasPassword ? GenerateCurrencyPassword().ToUpperInvariant() : null; - - IUserMessage sent; - var (stream, ext) = await GetRandomCurrencyImageAsync(pw); - - await using (stream) - sent = await channel.SendFileAsync(stream, $"currency_image.{ext}", toSend); - - await AddPlantToDatabase(channel.GuildId, - channel.Id, - _client.CurrentUser.Id, - sent.Id, - dropAmount, - pw); - } - } - } - catch - { - } - }); - return Task.CompletedTask; - } - - /// - /// Generate a hexadecimal string from 1000 to ffff. - /// - /// A hexadecimal string from 1000 to ffff - private string GenerateCurrencyPassword() - { - // generate a number from 1000 to ffff - var num = _rng.Next(4096, 65536); - // convert it to hexadecimal - return num.ToString("x4"); - } - - public async Task PickAsync( - ulong gid, - ITextChannel ch, - ulong uid, - string pass) - { - await _pickLock.WaitAsync(); - try - { - long amount; - ulong[] ids; - await using (var uow = _db.GetDbContext()) - { - // this method will sum all plants with that password, - // remove them, and get messageids of the removed plants - - pass = pass?.Trim().TrimTo(10, true).ToUpperInvariant(); - // gets all plants in this channel with the same password - var entries = uow.Set() - .AsQueryable() - .Where(x => x.ChannelId == ch.Id && pass == x.Password) - .ToList(); - // sum how much currency that is, and get all of the message ids (so that i can delete them) - amount = entries.Sum(x => x.Amount); - ids = entries.Select(x => x.MessageId).ToArray(); - // remove them from the database - uow.RemoveRange(entries); - - - if (amount > 0) - // give the picked currency to the user - await _cs.AddAsync(uid, amount, new("currency", "collect")); - await uow.SaveChangesAsync(); - } - - try - { - // delete all of the plant messages which have just been picked - _ = ch.DeleteMessagesAsync(ids); - } - catch { } - - // return the amount of currency the user picked - return amount; - } - finally - { - _pickLock.Release(); - } - } - - public async Task SendPlantMessageAsync( - ulong gid, - IMessageChannel ch, - string user, - long amount, - string pass) - { - try - { - // get the text - var prefix = _cmdHandler.GetPrefix(gid); - var msgToSend = GetText(gid, strs.planted(Format.Bold(user), amount + _gss.Data.Currency.Sign)); - - if (amount > 1) - msgToSend += " " + GetText(gid, strs.pick_pl(prefix)); - else - msgToSend += " " + GetText(gid, strs.pick_sn(prefix)); - - //get the image - var (stream, ext) = await GetRandomCurrencyImageAsync(pass); - // send it - await using (stream) - { - var msg = await ch.SendFileAsync(stream, $"img.{ext}", msgToSend); - // return sent message's id (in order to be able to delete it when it's picked) - return msg.Id; - } - } - catch (Exception ex) - { - // if sending fails, return null as message id - Log.Warning(ex, "Sending plant message failed: {Message}", ex.Message); - return null; - } - } - - public async Task PlantAsync( - ulong gid, - IMessageChannel ch, - ulong uid, - string user, - long amount, - string pass) - { - // normalize it - no more than 10 chars, uppercase - pass = pass?.Trim().TrimTo(10, true).ToUpperInvariant(); - // has to be either null or alphanumeric - if (!string.IsNullOrWhiteSpace(pass) && !pass.IsAlphaNumeric()) - return false; - - // remove currency from the user who's planting - if (await _cs.RemoveAsync(uid, amount, new("put/collect", "put"))) - { - // try to send the message with the currency image - var msgId = await SendPlantMessageAsync(gid, ch, user, amount, pass); - if (msgId is null) - { - // if it fails it will return null, if it returns null, refund - await _cs.AddAsync(uid, amount, new("put/collect", "refund")); - return false; - } - - // if it doesn't fail, put the plant in the database for other people to pick - await AddPlantToDatabase(gid, ch.Id, uid, msgId.Value, amount, pass); - return true; - } - - // if user doesn't have enough currency, fail - return false; - } - - private async Task AddPlantToDatabase( - ulong gid, - ulong cid, - ulong uid, - ulong mid, - long amount, - string pass) - { - await using var uow = _db.GetDbContext(); - uow.Set() - .Add(new() - { - Amount = amount, - GuildId = gid, - ChannelId = cid, - Password = pass, - UserId = uid, - MessageId = mid - }); - await uow.SaveChangesAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Shop/IShopService.cs b/src/EllieBot/Modules/Gambling/Shop/IShopService.cs deleted file mode 100644 index f8d19f8..0000000 --- a/src/EllieBot/Modules/Gambling/Shop/IShopService.cs +++ /dev/null @@ -1,46 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Services; - -public interface IShopService -{ - /// - /// Changes the price of a shop item - /// - /// Id of the guild in which the shop is - /// Index of the item - /// New item price - /// Success status - Task ChangeEntryPriceAsync(ulong guildId, int index, int newPrice); - - /// - /// Changes the name of a shop item - /// - /// Id of the guild in which the shop is - /// Index of the item - /// New item name - /// Success status - Task ChangeEntryNameAsync(ulong guildId, int index, string newName); - - /// - /// Swaps indexes of 2 items in the shop - /// - /// Id of the guild in which the shop is - /// First entry's index - /// Second entry's index - /// Whether swap was successful - Task SwapEntriesAsync(ulong guildId, int index1, int index2); - - /// - /// Swaps indexes of 2 items in the shop - /// - /// Id of the guild in which the shop is - /// Current index of the entry to move - /// Destination index of the entry - /// Whether swap was successful - Task MoveEntryAsync(ulong guildId, int fromIndex, int toIndex); - - Task SetItemRoleRequirementAsync(ulong guildId, int index, ulong? roleId); - Task AddShopCommandAsync(ulong guildId, ulong userId, int price, string command); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs b/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs deleted file mode 100644 index 2d0749e..0000000 --- a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs +++ /dev/null @@ -1,597 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Db.Models; -using EllieBot.Modules.Administration; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class ShopCommands : GamblingSubmodule - { - public enum List - { - List - } - - public enum Role - { - Role - } - - public enum Command - { - Command, - Cmd - } - - private readonly DbService _db; - private readonly ICurrencyService _cs; - - public ShopCommands(DbService db, ICurrencyService cs, GamblingConfigService gamblingConf) - : base(gamblingConf) - { - _db = db; - _cs = cs; - } - - private Task ShopInternalAsync(int page = 0) - { - if (page < 0) - throw new ArgumentOutOfRangeException(nameof(page)); - - using var uow = _db.GetDbContext(); - var entries = uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items)) - .ShopEntries.ToIndexed(); - - return Response() - .Paginated() - .Items(entries.ToList()) - .PageSize(9) - .CurrentPage(page) - .Page((items, curPage) => - { - if (!items.Any()) - return _sender.CreateEmbed().WithErrorColor().WithDescription(GetText(strs.shop_none)); - var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.shop)); - - for (var i = 0; i < items.Count; i++) - { - var entry = items[i]; - embed.AddField($"#{(curPage * 9) + i + 1} - {N(entry.Price)}", - EntryToString(entry), - true); - } - - return embed; - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Shop(int page = 1) - { - if (--page < 0) - return Task.CompletedTask; - - return ShopInternalAsync(page); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Buy(int index) - { - index -= 1; - if (index < 0) - return; - ShopEntry entry; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items)); - var entries = new IndexedCollection(config.ShopEntries); - entry = entries.ElementAtOrDefault(index); - uow.SaveChanges(); - } - - if (entry is null) - { - await Response().Error(strs.shop_item_not_found).SendAsync(); - return; - } - - if (entry.RoleRequirement is ulong reqRoleId) - { - var role = ctx.Guild.GetRole(reqRoleId); - if (role is null) - { - await Response().Error(strs.shop_item_req_role_not_found).SendAsync(); - return; - } - - var guser = (IGuildUser)ctx.User; - if (!guser.RoleIds.Contains(reqRoleId)) - { - await Response() - .Error(strs.shop_item_req_role_unfulfilled(Format.Bold(role.ToString()))) - .SendAsync(); - return; - } - } - - if (entry.Type == ShopEntryType.Role) - { - var guser = (IGuildUser)ctx.User; - var role = ctx.Guild.GetRole(entry.RoleId); - - if (role is null) - { - await Response().Error(strs.shop_role_not_found).SendAsync(); - return; - } - - if (guser.RoleIds.Any(id => id == role.Id)) - { - await Response().Error(strs.shop_role_already_bought).SendAsync(); - return; - } - - if (await _cs.RemoveAsync(ctx.User.Id, entry.Price, new("shop", "buy", entry.Type.ToString()))) - { - try - { - await guser.AddRoleAsync(role); - } - catch (Exception ex) - { - Log.Warning(ex, "Error adding shop role"); - await _cs.AddAsync(ctx.User.Id, entry.Price, new("shop", "error-refund")); - await Response().Error(strs.shop_role_purchase_error).SendAsync(); - return; - } - - var profit = GetProfitAmount(entry.Price); - await _cs.AddAsync(entry.AuthorId, profit, new("shop", "sell", $"Shop sell item - {entry.Type}")); - await _cs.AddAsync(ctx.Client.CurrentUser.Id, entry.Price - profit, new("shop", "cut")); - await Response().Confirm(strs.shop_role_purchase(Format.Bold(role.Name))).SendAsync(); - return; - } - - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - else if (entry.Type == ShopEntryType.List) - { - if (entry.Items.Count == 0) - { - await Response().Error(strs.out_of_stock).SendAsync(); - return; - } - - var item = entry.Items.ToArray()[new EllieRandom().Next(0, entry.Items.Count)]; - - if (await _cs.RemoveAsync(ctx.User.Id, entry.Price, new("shop", "buy", entry.Type.ToString()))) - { - await using (var uow = _db.GetDbContext()) - { - uow.Set().Remove(item); - await uow.SaveChangesAsync(); - } - - try - { - await Response() - .User(ctx.User) - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.shop_purchase(ctx.Guild.Name))) - .AddField(GetText(strs.item), item.Text) - .AddField(GetText(strs.price), entry.Price.ToString(), true) - .AddField(GetText(strs.name), entry.Name, true)) - .SendAsync(); - - await _cs.AddAsync(entry.AuthorId, - GetProfitAmount(entry.Price), - new("shop", "sell", entry.Name)); - } - catch - { - await _cs.AddAsync(ctx.User.Id, entry.Price, new("shop", "error-refund", entry.Name)); - await using (var uow = _db.GetDbContext()) - { - var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries) - .ThenInclude(x => x.Items)) - .ShopEntries); - entry = entries.ElementAtOrDefault(index); - if (entry is not null) - { - if (entry.Items.Add(item)) - uow.SaveChanges(); - } - } - - await Response().Error(strs.shop_buy_error).SendAsync(); - return; - } - - await Response().Confirm(strs.shop_item_purchase).SendAsync(); - } - else - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - else if (entry.Type == ShopEntryType.Command) - { - var guild = ctx.Guild as SocketGuild; - var channel = ctx.Channel as ISocketMessageChannel; - var msg = ctx.Message as SocketUserMessage; - var user = await ctx.Guild.GetUserAsync(entry.AuthorId); - - if (guild is null || channel is null || msg is null || user is null) - { - await Response().Error(strs.shop_command_invalid_context).SendAsync(); - return; - } - - if (!await _cs.RemoveAsync(ctx.User.Id, entry.Price, new("shop", "buy", entry.Type.ToString()))) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - else - { - var buyer = (IGuildUser)ctx.User; - var cmd = entry.Command - .Replace("%you%", buyer.Mention) - .Replace("%you.mention%", buyer.Mention) - .Replace("%you.username%", buyer.Username) - .Replace("%you.name%", buyer.GlobalName ?? buyer.Username) - .Replace("%you.nick%", buyer.DisplayName); - - var eb = _sender.CreateEmbed() - .WithPendingColor() - .WithTitle("Executing shop command") - .WithDescription(cmd); - - var msgTask = Response().Embed(eb).SendAsync(); - - await _cs.AddAsync(entry.AuthorId, - GetProfitAmount(entry.Price), - new("shop", "sell", entry.Name)); - - await Task.Delay(250); - await _cmdHandler.TryRunCommand(guild, - channel, - new DoAsUserMessage( - msg, - user, - cmd - )); - - try - { - var pendingMsg = await msgTask; - await pendingMsg.EditAsync( - SmartEmbedText.FromEmbed(eb - .WithOkColor() - .WithTitle("Shop command executed") - .Build())); - } - catch - { - } - } - } - } - - private long GetProfitAmount(int price) - => (int)Math.Ceiling((1.0m - Config.BotCuts.ShopSaleCut) * price); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ShopAdd(Command _, int price, [Leftover] string command) - { - if (price < 1) - return; - - - var entry = await _service.AddShopCommandAsync(ctx.Guild.Id, ctx.User.Id, price, command); - - await Response().Embed(EntryToEmbed(entry).WithTitle(GetText(strs.shop_item_add))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(GuildPerm.ManageRoles)] - public async Task ShopAdd(Role _, int price, [Leftover] IRole role) - { - if (price < 1) - return; - - var entry = new ShopEntry - { - Name = "-", - Price = price, - Type = ShopEntryType.Role, - AuthorId = ctx.User.Id, - RoleId = role.Id, - RoleName = role.Name - }; - await using (var uow = _db.GetDbContext()) - { - var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries) - .ThenInclude(x => x.Items)) - .ShopEntries) - { - entry - }; - uow.GuildConfigsForId(ctx.Guild.Id, set => set).ShopEntries = entries; - uow.SaveChanges(); - } - - await Response().Embed(EntryToEmbed(entry).WithTitle(GetText(strs.shop_item_add))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopAdd(List _, int price, [Leftover] string name) - { - if (price < 1) - return; - - var entry = new ShopEntry - { - Name = name.TrimTo(100), - Price = price, - Type = ShopEntryType.List, - AuthorId = ctx.User.Id, - Items = new() - }; - await using (var uow = _db.GetDbContext()) - { - var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries) - .ThenInclude(x => x.Items)) - .ShopEntries) - { - entry - }; - uow.GuildConfigsForId(ctx.Guild.Id, set => set).ShopEntries = entries; - uow.SaveChanges(); - } - - await Response().Embed(EntryToEmbed(entry).WithTitle(GetText(strs.shop_item_add))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopListAdd(int index, [Leftover] string itemText) - { - index -= 1; - if (index < 0) - return; - var item = new ShopEntryItem - { - Text = itemText - }; - ShopEntry entry; - var rightType = false; - var added = false; - await using (var uow = _db.GetDbContext()) - { - var entries = new IndexedCollection(uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries) - .ThenInclude(x => x.Items)) - .ShopEntries); - entry = entries.ElementAtOrDefault(index); - if (entry is not null && (rightType = entry.Type == ShopEntryType.List)) - { - if (entry.Items.Add(item)) - { - added = true; - uow.SaveChanges(); - } - } - } - - if (entry is null) - await Response().Error(strs.shop_item_not_found).SendAsync(); - else if (!rightType) - await Response().Error(strs.shop_item_wrong_type).SendAsync(); - else if (added == false) - await Response().Error(strs.shop_list_item_not_unique).SendAsync(); - else - await Response().Confirm(strs.shop_list_item_added).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopRemove(int index) - { - index -= 1; - if (index < 0) - return; - ShopEntry removed; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(ctx.Guild.Id, - set => set.Include(x => x.ShopEntries).ThenInclude(x => x.Items)); - - var entries = new IndexedCollection(config.ShopEntries); - removed = entries.ElementAtOrDefault(index); - if (removed is not null) - { - uow.RemoveRange(removed.Items); - uow.Remove(removed); - uow.SaveChanges(); - } - } - - if (removed is null) - await Response().Error(strs.shop_item_not_found).SendAsync(); - else - await Response().Embed(EntryToEmbed(removed).WithTitle(GetText(strs.shop_item_rm))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopChangePrice(int index, int price) - { - if (--index < 0 || price <= 0) - return; - - var succ = await _service.ChangeEntryPriceAsync(ctx.Guild.Id, index, price); - if (succ) - { - await ShopInternalAsync(index / 9); - await ctx.OkAsync(); - } - else - await ctx.ErrorAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopChangeName(int index, [Leftover] string newName) - { - if (--index < 0 || string.IsNullOrWhiteSpace(newName)) - return; - - var succ = await _service.ChangeEntryNameAsync(ctx.Guild.Id, index, newName); - if (succ) - { - await ShopInternalAsync(index / 9); - await ctx.OkAsync(); - } - else - await ctx.ErrorAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopSwap(int index1, int index2) - { - if (--index1 < 0 || --index2 < 0 || index1 == index2) - return; - - var succ = await _service.SwapEntriesAsync(ctx.Guild.Id, index1, index2); - if (succ) - { - await ShopInternalAsync(index1 / 9); - await ctx.OkAsync(); - } - else - await ctx.ErrorAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopMove(int fromIndex, int toIndex) - { - if (--fromIndex < 0 || --toIndex < 0 || fromIndex == toIndex) - return; - - var succ = await _service.MoveEntryAsync(ctx.Guild.Id, fromIndex, toIndex); - if (succ) - { - await ShopInternalAsync(toIndex / 9); - await ctx.OkAsync(); - } - else - await ctx.ErrorAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ShopReq(int itemIndex, [Leftover] IRole role = null) - { - if (--itemIndex < 0) - return; - - var succ = await _service.SetItemRoleRequirementAsync(ctx.Guild.Id, itemIndex, role?.Id); - if (!succ) - { - await Response().Error(strs.shop_item_not_found).SendAsync(); - return; - } - - if (role is null) - await Response().Confirm(strs.shop_item_role_no_req(itemIndex)).SendAsync(); - else - await Response().Confirm(strs.shop_item_role_req(itemIndex + 1, role)).SendAsync(); - } - - public EmbedBuilder EntryToEmbed(ShopEntry entry) - { - var embed = _sender.CreateEmbed().WithOkColor(); - - if (entry.Type == ShopEntryType.Role) - { - return embed - .AddField(GetText(strs.name), - GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name - ?? "MISSING_ROLE"))), - true) - .AddField(GetText(strs.price), N(entry.Price), true) - .AddField(GetText(strs.type), entry.Type.ToString(), true); - } - - if (entry.Type == ShopEntryType.List) - { - return embed.AddField(GetText(strs.name), entry.Name, true) - .AddField(GetText(strs.price), N(entry.Price), true) - .AddField(GetText(strs.type), GetText(strs.random_unique_item), true); - } - - else if (entry.Type == ShopEntryType.Command) - { - return embed - .AddField(GetText(strs.name), Format.Code(entry.Command), true) - .AddField(GetText(strs.price), N(entry.Price), true) - .AddField(GetText(strs.type), entry.Type.ToString(), true); - } - - //else if (entry.Type == ShopEntryType.Infinite_List) - // return embed.AddField(GetText(strs.name), GetText(strs.shop_role(Format.Bold(entry.RoleName)), true)) - // .AddField(GetText(strs.price), entry.Price.ToString(), true) - // .AddField(GetText(strs.type), entry.Type.ToString(), true); - return null; - } - - public string EntryToString(ShopEntry entry) - { - var prepend = string.Empty; - if (entry.RoleRequirement is not null) - prepend = Format.Italics(GetText(strs.shop_item_requires_role($"<@&{entry.RoleRequirement}>"))) - + Environment.NewLine; - - if (entry.Type == ShopEntryType.Role) - return prepend - + GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE"))); - if (entry.Type == ShopEntryType.List) - return prepend + GetText(strs.unique_items_left(entry.Items.Count)) + "\n" + entry.Name; - - if (entry.Type == ShopEntryType.Command) - return prepend + Format.Code(entry.Command); - return prepend; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs b/src/EllieBot/Modules/Gambling/Shop/ShopService.cs deleted file mode 100644 index 9e46aa0..0000000 --- a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs +++ /dev/null @@ -1,126 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Services; - -public class ShopService : IShopService, IEService -{ - private readonly DbService _db; - - public ShopService(DbService db) - => _db = db; - - private IndexedCollection GetEntriesInternal(DbContext uow, ulong guildId) - => uow.GuildConfigsForId(guildId, - set => set.Include(x => x.ShopEntries) - .ThenInclude(x => x.Items)) - .ShopEntries.ToIndexed(); - - public async Task ChangeEntryPriceAsync(ulong guildId, int index, int newPrice) - { - ArgumentOutOfRangeException.ThrowIfNegative(index); - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(newPrice); - - await using var uow = _db.GetDbContext(); - var entries = GetEntriesInternal(uow, guildId); - - if (index >= entries.Count) - return false; - - entries[index].Price = newPrice; - await uow.SaveChangesAsync(); - return true; - } - - public async Task ChangeEntryNameAsync(ulong guildId, int index, string newName) - { - ArgumentOutOfRangeException.ThrowIfNegative(index); - - if (string.IsNullOrWhiteSpace(newName)) - throw new ArgumentNullException(nameof(newName)); - - await using var uow = _db.GetDbContext(); - var entries = GetEntriesInternal(uow, guildId); - - if (index >= entries.Count) - return false; - - entries[index].Name = newName.TrimTo(100); - await uow.SaveChangesAsync(); - return true; - } - - public async Task SwapEntriesAsync(ulong guildId, int index1, int index2) - { - ArgumentOutOfRangeException.ThrowIfNegative(index1); - ArgumentOutOfRangeException.ThrowIfNegative(index2); - - await using var uow = _db.GetDbContext(); - var entries = GetEntriesInternal(uow, guildId); - - if (index1 >= entries.Count || index2 >= entries.Count || index1 == index2) - return false; - - entries[index1].Index = index2; - entries[index2].Index = index1; - - await uow.SaveChangesAsync(); - return true; - } - - public async Task MoveEntryAsync(ulong guildId, int fromIndex, int toIndex) - { - ArgumentOutOfRangeException.ThrowIfNegative(fromIndex); - ArgumentOutOfRangeException.ThrowIfNegative(toIndex); - - await using var uow = _db.GetDbContext(); - var entries = GetEntriesInternal(uow, guildId); - - if (fromIndex >= entries.Count || toIndex >= entries.Count || fromIndex == toIndex) - return false; - - var entry = entries[fromIndex]; - entries.RemoveAt(fromIndex); - entries.Insert(toIndex, entry); - - await uow.SaveChangesAsync(); - return true; - } - - public async Task SetItemRoleRequirementAsync(ulong guildId, int index, ulong? roleId) - { - await using var uow = _db.GetDbContext(); - var entries = GetEntriesInternal(uow, guildId); - - if (index >= entries.Count) - return false; - - var entry = entries[index]; - - entry.RoleRequirement = roleId; - - await uow.SaveChangesAsync(); - return true; - } - - public async Task AddShopCommandAsync(ulong guildId, ulong userId, int price, string command) - { - await using var uow = _db.GetDbContext(); - - var entries = GetEntriesInternal(uow, guildId); - var entry = new ShopEntry() - { - AuthorId = userId, - Command = command, - Type = ShopEntryType.Command, - Price = price, - }; - entries.Add(entry); - uow.GuildConfigsForId(guildId, set => set).ShopEntries = entries; - - await uow.SaveChangesAsync(); - - return entry; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs deleted file mode 100644 index 18c294a..0000000 --- a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs +++ /dev/null @@ -1,222 +0,0 @@ -#nullable disable warnings -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; -using SixLabors.Fonts; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using EllieBot.Common.TypeReaders; -using Color = SixLabors.ImageSharp.Color; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Gambling; - -public enum GamblingError -{ - InsufficientFunds, -} - -public partial class Gambling -{ - [Group] - public partial class SlotCommands : GamblingSubmodule - { - private readonly IImageCache _images; - private readonly FontProvider _fonts; - private readonly DbService _db; - private object _slotStatsLock = new(); - - public SlotCommands( - IImageCache images, - FontProvider fonts, - DbService db, - GamblingConfigService gamb) - : base(gamb) - { - _images = images; - _fonts = fonts; - _db = db; - } - - public Task Test() - => Task.CompletedTask; - - [Cmd] - public async Task Slot([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) - { - if (!await CheckBetMandatory(amount)) - return; - - // var slotInteraction = CreateSlotInteractionIntenal(amount); - - await ctx.Channel.TriggerTypingAsync(); - - if (await InternalSlotAsync(amount) is not SlotResult result) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - var text = GetSlotMessageTextInternal(result); - - using var image = await GenerateSlotImageAsync(amount, result); - await using var imgStream = await image.ToStreamAsync(); - - - var eb = _sender.CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(Format.Bold(text)) - .WithImageUrl($"attachment://result.png") - .WithOkColor(); - - var bb = new ButtonBuilder(emote: Emoji.Parse("🔁"), customId: "slot:again", label: "Pull Again"); - var inter = _inter.Create(ctx.User.Id, - bb, - smc => - { - smc.DeferAsync(); - return Slot(amount); - }); - - var msg = await ctx.Channel.SendFileAsync(imgStream, - "result.png", - embed: eb.Build(), - components: inter.CreateComponent() - ); - await inter.RunAsync(msg); - } - - // private SlotInteraction CreateSlotInteractionIntenal(long amount) - // { - // return new SlotInteraction((DiscordSocketClient)ctx.Client, - // ctx.User.Id, - // async (smc) => - // { - // try - // { - // if (await InternalSlotAsync(amount) is not SlotResult result) - // { - // await smc.RespondErrorAsync(_eb, GetText(strs.not_enough(CurrencySign)), true); - // return; - // } - // - // var msg = GetSlotMessageInternal(result); - // - // using var image = await GenerateSlotImageAsync(amount, result); - // await using var imgStream = await image.ToStreamAsync(); - // - // var guid = Guid.NewGuid(); - // var imgName = $"result_{guid}.png"; - // - // var slotInteraction = CreateSlotInteractionIntenal(amount).GetInteraction(); - // - // await smc.Message.ModifyAsync(m => - // { - // m.Content = msg; - // m.Attachments = new[] - // { - // new FileAttachment(imgStream, imgName) - // }; - // m.Components = slotInteraction.CreateComponent(); - // }); - // - // _ = slotInteraction.RunAsync(smc.Message); - // } - // catch (Exception ex) - // { - // Log.Error(ex, "Error pulling slot again"); - // } - // // finally - // // { - // // await Task.Delay(1000); - // // _runningUsers.TryRemove(ctx.User.Id); - // // } - // }); - // } - - private string GetSlotMessageTextInternal(SlotResult result) - { - var multi = result.Multiplier.ToString("0.##"); - var msg = result.WinType switch - { - SlotWinType.SingleJoker => GetText(strs.slot_single(CurrencySign, multi)), - SlotWinType.DoubleJoker => GetText(strs.slot_two(CurrencySign, multi)), - SlotWinType.TrippleNormal => GetText(strs.slot_three(multi)), - SlotWinType.TrippleJoker => GetText(strs.slot_jackpot(multi)), - _ => GetText(strs.better_luck), - }; - return msg; - } - - private async Task InternalSlotAsync(long amount) - { - var maybeResult = await _service.SlotAsync(ctx.User.Id, amount); - - if (!maybeResult.TryPickT0(out var result, out var error)) - { - return null; - } - - return result; - } - - private async Task> GenerateSlotImageAsync(long amount, SlotResult result) - { - long ownedAmount; - await using (var uow = _db.GetDbContext()) - { - ownedAmount = uow.Set().FirstOrDefault(x => x.UserId == ctx.User.Id)?.CurrencyAmount - ?? 0; - } - - var slotBg = await _images.GetSlotBgAsync(); - var bgImage = Image.Load(slotBg); - var numbers = new int[3]; - result.Rolls.CopyTo(numbers, 0); - - Color fontColor = Config.Slots.CurrencyFontColor; - - bgImage.Mutate(x => x.DrawText(new RichTextOptions(_fonts.DottyFont.CreateFont(65)) - { - HorizontalAlignment = HorizontalAlignment.Center, - VerticalAlignment = VerticalAlignment.Center, - WrappingLength = 140, - Origin = new(298, 100) - }, - ((long)result.Won).ToString(), - fontColor)); - - var bottomFont = _fonts.DottyFont.CreateFont(50); - - bgImage.Mutate(x => x.DrawText(new RichTextOptions(bottomFont) - { - HorizontalAlignment = HorizontalAlignment.Center, - VerticalAlignment = VerticalAlignment.Center, - WrappingLength = 135, - Origin = new(196, 480) - }, - amount.ToString(), - fontColor)); - - bgImage.Mutate(x => x.DrawText(new(bottomFont) - { - HorizontalAlignment = HorizontalAlignment.Center, - VerticalAlignment = VerticalAlignment.Center, - Origin = new(393, 480) - }, - ownedAmount.ToString(), - fontColor)); - //sw.PrintLap("drew red text"); - - for (var i = 0; i < 3; i++) - { - using var img = Image.Load(await _images.GetSlotEmojiAsync(numbers[i])); - bgImage.Mutate(x => x.DrawImage(img, new Point(148 + (105 * i), 217), 1f)); - } - - return bgImage; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/VoteRewardService.cs b/src/EllieBot/Modules/Gambling/VoteRewardService.cs deleted file mode 100644 index 62d861b..0000000 --- a/src/EllieBot/Modules/Gambling/VoteRewardService.cs +++ /dev/null @@ -1,106 +0,0 @@ -#nullable disable -using EllieBot.Common.ModuleBehaviors; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Gambling.Services; - -public class VoteModel -{ - [JsonPropertyName("userId")] - public ulong UserId { get; set; } -} - -public class VoteRewardService : IEService, IReadyExecutor -{ - private readonly DiscordSocketClient _client; - private readonly IBotCredentials _creds; - private readonly ICurrencyService _currencyService; - private readonly GamblingConfigService _gamb; - - public VoteRewardService( - DiscordSocketClient client, - IBotCredentials creds, - ICurrencyService currencyService, - GamblingConfigService gamb) - { - _client = client; - _creds = creds; - _currencyService = currencyService; - _gamb = gamb; - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - using var http = new HttpClient(new HttpClientHandler - { - AllowAutoRedirect = false, - ServerCertificateCustomValidationCallback = delegate { return true; } - }); - - while (true) - { - await Task.Delay(30000); - - var topggKey = _creds.Votes?.TopggKey; - var topggServiceUrl = _creds.Votes?.TopggServiceUrl; - - try - { - if (!string.IsNullOrWhiteSpace(topggKey) && !string.IsNullOrWhiteSpace(topggServiceUrl)) - { - http.DefaultRequestHeaders.Authorization = new(topggKey); - var uri = new Uri(new(topggServiceUrl), "topgg/new"); - var res = await http.GetStringAsync(uri); - var data = JsonSerializer.Deserialize>(res); - - if (data is { Count: > 0 }) - { - var ids = data.Select(x => x.UserId).ToList(); - - await _currencyService.AddBulkAsync(ids, - _gamb.Data.VoteReward, - new("vote", "top.gg", "top.gg vote reward")); - - Log.Information("Rewarding {Count} top.gg voters", ids.Count()); - } - } - } - catch (Exception ex) - { - Log.Error(ex, "Critical error loading top.gg vote rewards"); - } - - var discordsKey = _creds.Votes?.DiscordsKey; - var discordsServiceUrl = _creds.Votes?.DiscordsServiceUrl; - - try - { - if (!string.IsNullOrWhiteSpace(discordsKey) && !string.IsNullOrWhiteSpace(discordsServiceUrl)) - { - http.DefaultRequestHeaders.Authorization = new(discordsKey); - var res = await http.GetStringAsync(new Uri(new(discordsServiceUrl), "discords/new")); - var data = JsonSerializer.Deserialize>(res); - - if (data is { Count: > 0 }) - { - var ids = data.Select(x => x.UserId).ToList(); - - await _currencyService.AddBulkAsync(ids, - _gamb.Data.VoteReward, - new("vote", "discords", "discords.com vote reward")); - - Log.Information("Rewarding {Count} discords.com voters", ids.Count()); - } - } - } - catch (Exception ex) - { - Log.Error(ex, "Critical error loading discords.com vote rewards"); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs deleted file mode 100644 index a25bdd9..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ /dev/null @@ -1,406 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Waifu; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Db.Models; -using System.Globalization; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public partial class WaifuClaimCommands : GamblingSubmodule - { - public WaifuClaimCommands(GamblingConfigService gamblingConfService) - : base(gamblingConfService) - { - } - - [Cmd] - public async Task WaifuReset() - { - var price = _service.GetResetPrice(ctx.User); - var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.waifu_reset_confirm)) - .WithDescription(GetText(strs.waifu_reset_price(Format.Bold(N(price))))); - - if (!await PromptUserConfirmAsync(embed)) - return; - - if (await _service.TryReset(ctx.User)) - { - await Response().Confirm(strs.waifu_reset).SendAsync(); - return; - } - - await Response().Error(strs.waifu_reset_fail).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task WaifuClaim(long amount, [Leftover] IUser target) - { - if (amount < Config.Waifu.MinPrice) - { - await Response().Error(strs.waifu_isnt_cheap(Config.Waifu.MinPrice + CurrencySign)).SendAsync(); - return; - } - - if (target.Id == ctx.User.Id) - { - await Response().Error(strs.waifu_not_yourself).SendAsync(); - return; - } - - var (w, isAffinity, result) = await _service.ClaimWaifuAsync(ctx.User, target, amount); - - if (result == WaifuClaimResult.InsufficientAmount) - { - await Response() - .Error( - strs.waifu_not_enough(N((long)Math.Ceiling(w.Price * (isAffinity ? 0.88f : 1.1f))))) - .SendAsync(); - return; - } - - if (result == WaifuClaimResult.NotEnoughFunds) - { - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - return; - } - - var msg = GetText(strs.waifu_claimed( - Format.Bold(ctx.User.ToString()), - Format.Bold(target.ToString()), - N(amount))); - - if (w.Affinity?.UserId == ctx.User.Id) - msg += "\n" + GetText(strs.waifu_fulfilled(target, N(w.Price))); - else - msg = " " + msg; - await Response().Confirm(ctx.User.Mention + msg).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public async Task WaifuTransfer(ulong waifuId, IUser newOwner) - { - if (!await _service.WaifuTransfer(ctx.User, waifuId, newOwner)) - { - await Response().Error(strs.waifu_transfer_fail).SendAsync(); - return; - } - - await Response() - .Confirm(strs.waifu_transfer_success(Format.Bold(waifuId.ToString()), - Format.Bold(ctx.User.ToString()), - Format.Bold(newOwner.ToString()))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task WaifuTransfer(IUser waifu, IUser newOwner) - { - if (!await _service.WaifuTransfer(ctx.User, waifu.Id, newOwner)) - { - await Response().Error(strs.waifu_transfer_fail).SendAsync(); - return; - } - - await Response() - .Confirm(strs.waifu_transfer_success(Format.Bold(waifu.ToString()), - Format.Bold(ctx.User.ToString()), - Format.Bold(newOwner.ToString()))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(-1)] - public Task Divorce([Leftover] string target) - { - var waifuUserId = _service.GetWaifuUserId(ctx.User.Id, target); - if (waifuUserId == default) - return Response().Error(strs.waifu_not_yours).SendAsync(); - - return Divorce(waifuUserId); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public Task Divorce([Leftover] IGuildUser target) - => Divorce(target.Id); - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task Divorce([Leftover] ulong targetId) - { - if (targetId == ctx.User.Id) - return; - - var (w, result, amount, remaining) = await _service.DivorceWaifuAsync(ctx.User, targetId); - - if (result == DivorceResult.SucessWithPenalty) - { - await Response() - .Confirm(strs.waifu_divorced_like(Format.Bold(w.Waifu.ToString()), - N(amount))) - .SendAsync(); - } - else if (result == DivorceResult.Success) - await Response().Confirm(strs.waifu_divorced_notlike(N(amount))).SendAsync(); - else if (result == DivorceResult.NotYourWife) - await Response().Error(strs.waifu_not_yours).SendAsync(); - else if (remaining is { } rem) - { - await Response() - .Error(strs.waifu_recent_divorce( - Format.Bold(((int)rem.TotalHours).ToString()), - Format.Bold(rem.Minutes.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Affinity([Leftover] IGuildUser user = null) - { - if (user?.Id == ctx.User.Id) - { - await Response().Error(strs.waifu_egomaniac).SendAsync(); - return; - } - - var (oldAff, sucess, remaining) = await _service.ChangeAffinityAsync(ctx.User, user); - if (!sucess) - { - if (remaining is not null) - { - await Response() - .Error(strs.waifu_affinity_cooldown( - Format.Bold(((int)remaining?.TotalHours).ToString()), - Format.Bold(remaining?.Minutes.ToString()))) - .SendAsync(); - } - else - await Response().Error(strs.waifu_affinity_already).SendAsync(); - - return; - } - - if (user is null) - { - await Response().Confirm(strs.waifu_affinity_reset).SendAsync(); - } - else if (oldAff is null) - { - await Response() - .Confirm(strs.waifu_affinity_set(Format.Bold(ctx.User.ToString()), Format.Bold(user.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.waifu_affinity_changed( - Format.Bold(ctx.User.ToString()), - Format.Bold(oldAff.ToString()), - Format.Bold(user.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task WaifuLb(int page = 1) - { - page--; - - if (page < 0) - return; - - if (page > 100) - page = 100; - - var waifus = _service.GetTopWaifusAtPage(page).ToList(); - - if (waifus.Count == 0) - { - await Response().Confirm(strs.waifus_none).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed().WithTitle(GetText(strs.waifus_top_waifus)).WithOkColor(); - - var i = 0; - foreach (var w in waifus) - { - var j = i++; - embed.AddField("#" + ((page * 9) + j + 1) + " - " + N(w.Price), GetLbString(w)); - } - - await Response().Embed(embed).SendAsync(); - } - - private string GetLbString(WaifuLbResult w) - { - var claimer = "no one"; - string status; - - var waifuUsername = w.Username.TrimTo(20); - var claimerUsername = w.Claimer?.TrimTo(20); - - if (w.Claimer is not null) - claimer = $"{claimerUsername}#{w.ClaimerDiscrim}"; - if (w.Affinity is null) - status = $"... but {waifuUsername}'s heart is empty"; - else if (w.Affinity + w.AffinityDiscrim == w.Claimer + w.ClaimerDiscrim) - status = $"... and {waifuUsername} likes {claimerUsername} too <3"; - else - status = $"... but {waifuUsername}'s heart belongs to {w.Affinity.TrimTo(20)}#{w.AffinityDiscrim}"; - return $"**{waifuUsername}#{w.Discrim}** - claimed by **{claimer}**\n\t{status}"; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public Task WaifuInfo([Leftover] IUser target = null) - { - if (target is null) - target = ctx.User; - - return InternalWaifuInfo(target.Id, target.ToString()); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public Task WaifuInfo(ulong targetId) - => InternalWaifuInfo(targetId); - - private async Task InternalWaifuInfo(ulong targetId, string name = null) - { - var wi = await _service.GetFullWaifuInfoAsync(targetId); - var affInfo = _service.GetAffinityTitle(wi.AffinityCount); - - var waifuItems = _service.GetWaifuItems().ToDictionary(x => x.ItemEmoji, x => x); - - var nobody = GetText(strs.nobody); - var itemList = await _service.GetItems(wi.WaifuId); - var itemsStr = !itemList.Any() - ? "-" - : string.Join("\n", - itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _)) - .OrderByDescending(x => waifuItems[x.ItemEmoji].Price) - .GroupBy(x => x.ItemEmoji) - .Take(60) - .Select(x => $"{x.Key} x{x.Count(),-3}") - .Chunk(2) - .Select(x => string.Join(" ", x))); - - var claimsNames = (await _service.GetClaimNames(wi.WaifuId)); - var claimsStr = claimsNames - .Shuffle() - .Take(30) - .Join('\n'); - - var fansList = await _service.GetFansNames(wi.WaifuId); - var fansStr = fansList - .Shuffle() - .Take(30) - .Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x) - .Join('\n'); - - if (string.IsNullOrWhiteSpace(fansStr)) - fansStr = "-"; - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.waifu) - + " " - + (wi.FullName ?? name ?? targetId.ToString()) - + " - \"the " - + _service.GetClaimTitle(wi.ClaimCount) - + "\"") - .AddField(GetText(strs.price), N(wi.Price), true) - .AddField(GetText(strs.claimed_by), wi.ClaimerName ?? nobody, true) - .AddField(GetText(strs.likes), wi.AffinityName ?? nobody, true) - .AddField(GetText(strs.changes_of_heart), - $"{wi.AffinityCount} - \"the {affInfo}\"", - true) - .AddField(GetText(strs.divorces), wi.DivorceCount.ToString(), true) - .AddField("\u200B", "\u200B", true) - .AddField(GetText(strs.fans(fansList.Count)), fansStr, true) - .AddField($"Waifus ({wi.ClaimCount})", - wi.ClaimCount == 0 ? nobody : claimsStr, - true) - .AddField(GetText(strs.gifts), itemsStr, true); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task WaifuGift(int page = 1) - { - if (--page < 0 || page > (Config.Waifu.Items.Count - 1) / 9) - return; - - var waifuItems = _service.GetWaifuItems(); - await Response() - .Paginated() - .Items(waifuItems.OrderBy(x => x.Negative) - .ThenBy(x => x.Price) - .ToList()) - .PageSize(9) - .CurrentPage(page) - .Page((items, _) => - { - var embed = _sender.CreateEmbed().WithTitle(GetText(strs.waifu_gift_shop)).WithOkColor(); - - items - .ToList() - .ForEach(x => embed.AddField( - $"{(!x.Negative ? string.Empty : "\\💔")} {x.ItemEmoji} {x.Name}", - Format.Bold(N(x.Price)), - true)); - - return embed; - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public async Task WaifuGift(MultipleWaifuItems items, [Leftover] IUser waifu) - { - if (waifu.Id == ctx.User.Id) - return; - - var sucess = await _service.GiftWaifuAsync(ctx.User, waifu, items.Item, items.Count); - - if (sucess) - { - await Response() - .Confirm(strs.waifu_gift( - Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), - Format.Bold(waifu.ToString()))) - .SendAsync(); - } - else - await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); - } - - private static string GetCountString(MultipleWaifuItems items) - => items.Count > 1 - ? $"{items.Count}x " - : string.Empty; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs deleted file mode 100644 index 286d9e8..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs +++ /dev/null @@ -1,633 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Common.Waifu; - -namespace EllieBot.Modules.Gambling.Services; - -public class WaifuService : IEService, IReadyExecutor -{ - private readonly DbService _db; - private readonly ICurrencyService _cs; - private readonly IBotCache _cache; - private readonly GamblingConfigService _gss; - private readonly IBotCredentials _creds; - private readonly DiscordSocketClient _client; - - public WaifuService( - DbService db, - ICurrencyService cs, - IBotCache cache, - GamblingConfigService gss, - IBotCredentials creds, - DiscordSocketClient client) - { - _db = db; - _cs = cs; - _cache = cache; - _gss = gss; - _creds = creds; - _client = client; - } - - public async Task WaifuTransfer(IUser owner, ulong waifuId, IUser newOwner) - { - if (owner.Id == newOwner.Id || waifuId == newOwner.Id) - return false; - - var settings = _gss.Data; - - await using var uow = _db.GetDbContext(); - var waifu = uow.Set().ByWaifuUserId(waifuId); - var ownerUser = uow.GetOrCreateUser(owner); - - // owner has to be the owner of the waifu - if (waifu is null || waifu.ClaimerId != ownerUser.Id) - return false; - - // if waifu likes the person, gotta pay the penalty - if (waifu.AffinityId == ownerUser.Id) - { - if (!await _cs.RemoveAsync(owner.Id, (long)(waifu.Price * 0.6), new("waifu", "affinity-penalty"))) - // unable to pay 60% penalty - return false; - - waifu.Price = (long)(waifu.Price * 0.7); // half of 60% = 30% price reduction - if (waifu.Price < settings.Waifu.MinPrice) - waifu.Price = settings.Waifu.MinPrice; - } - else // if not, pay 10% fee - { - if (!await _cs.RemoveAsync(owner.Id, waifu.Price / 10, new("waifu", "transfer"))) - return false; - - waifu.Price = (long)(waifu.Price * 0.95); // half of 10% = 5% price reduction - if (waifu.Price < settings.Waifu.MinPrice) - waifu.Price = settings.Waifu.MinPrice; - } - - //new claimerId is the id of the new owner - var newOwnerUser = uow.GetOrCreateUser(newOwner); - waifu.ClaimerId = newOwnerUser.Id; - - await uow.SaveChangesAsync(); - - return true; - } - - public long GetResetPrice(IUser user) - { - var settings = _gss.Data; - using var uow = _db.GetDbContext(); - var waifu = uow.Set().ByWaifuUserId(user.Id); - - if (waifu is null) - return settings.Waifu.MinPrice; - - var divorces = uow.Set() - .Count(x - => x.Old != null - && x.Old.UserId == user.Id - && x.UpdateType == WaifuUpdateType.Claimed - && x.New == null); - var affs = uow.Set() - .AsQueryable() - .Where(w => w.User.UserId == user.Id - && w.UpdateType == WaifuUpdateType.AffinityChanged - && w.New != null) - .ToList() - .GroupBy(x => x.New) - .Count(); - - return (long)Math.Ceiling(waifu.Price * 1.25f) - + ((divorces + affs + 2) * settings.Waifu.Multipliers.WaifuReset); - } - - public async Task TryReset(IUser user) - { - await using var uow = _db.GetDbContext(); - var price = GetResetPrice(user); - if (!await _cs.RemoveAsync(user.Id, price, new("waifu", "reset"))) - return false; - - var affs = uow.Set() - .AsQueryable() - .Where(w => w.User.UserId == user.Id - && w.UpdateType == WaifuUpdateType.AffinityChanged - && w.New != null); - - var divorces = uow.Set() - .AsQueryable() - .Where(x => x.Old != null - && x.Old.UserId == user.Id - && x.UpdateType == WaifuUpdateType.Claimed - && x.New == null); - - //reset changes of heart to 0 - uow.Set().RemoveRange(affs); - //reset divorces to 0 - uow.Set().RemoveRange(divorces); - var waifu = uow.Set().ByWaifuUserId(user.Id); - //reset price, remove items - //remove owner, remove affinity - waifu.Price = 50; - waifu.Items.Clear(); - waifu.ClaimerId = null; - waifu.AffinityId = null; - - //wives stay though - - await uow.SaveChangesAsync(); - - return true; - } - - public async Task<(WaifuInfo, bool, WaifuClaimResult)> ClaimWaifuAsync(IUser user, IUser target, long amount) - { - var settings = _gss.Data; - WaifuClaimResult result; - WaifuInfo w; - bool isAffinity; - await using (var uow = _db.GetDbContext()) - { - w = uow.Set().ByWaifuUserId(target.Id); - isAffinity = w?.Affinity?.UserId == user.Id; - if (w is null) - { - var claimer = uow.GetOrCreateUser(user); - var waifu = uow.GetOrCreateUser(target); - if (!await _cs.RemoveAsync(user.Id, amount, new("waifu", "claim"))) - result = WaifuClaimResult.NotEnoughFunds; - else - { - uow.Set() - .Add(w = new() - { - Waifu = waifu, - Claimer = claimer, - Affinity = null, - Price = amount - }); - uow.Set() - .Add(new() - { - User = waifu, - Old = null, - New = claimer, - UpdateType = WaifuUpdateType.Claimed - }); - result = WaifuClaimResult.Success; - } - } - else if (isAffinity && amount > w.Price * settings.Waifu.Multipliers.CrushClaim) - { - if (!await _cs.RemoveAsync(user.Id, amount, new("waifu", "claim"))) - result = WaifuClaimResult.NotEnoughFunds; - else - { - var oldClaimer = w.Claimer; - w.Claimer = uow.GetOrCreateUser(user); - w.Price = amount + (amount / 4); - result = WaifuClaimResult.Success; - - uow.Set() - .Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = w.Claimer, - UpdateType = WaifuUpdateType.Claimed - }); - } - } - else if (amount >= w.Price * settings.Waifu.Multipliers.NormalClaim) // if no affinity - { - if (!await _cs.RemoveAsync(user.Id, amount, new("waifu", "claim"))) - result = WaifuClaimResult.NotEnoughFunds; - else - { - var oldClaimer = w.Claimer; - w.Claimer = uow.GetOrCreateUser(user); - w.Price = amount; - result = WaifuClaimResult.Success; - - uow.Set() - .Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = w.Claimer, - UpdateType = WaifuUpdateType.Claimed - }); - } - } - else - result = WaifuClaimResult.InsufficientAmount; - - - await uow.SaveChangesAsync(); - } - - return (w, isAffinity, result); - } - - public async Task<(DiscordUser, bool, TimeSpan?)> ChangeAffinityAsync(IUser user, IGuildUser target) - { - DiscordUser oldAff = null; - var success = false; - TimeSpan? remaining = null; - await using (var uow = _db.GetDbContext()) - { - var w = uow.Set().ByWaifuUserId(user.Id); - var newAff = target is null ? null : uow.GetOrCreateUser(target); - if (w?.Affinity?.UserId == target?.Id) - { - return (null, false, null); - } - - remaining = await _cache.GetRatelimitAsync(GetAffinityKey(user.Id), - 30.Minutes()); - - if (remaining is not null) - { - } - else if (w is null) - { - var thisUser = uow.GetOrCreateUser(user); - uow.Set() - .Add(new() - { - Affinity = newAff, - Waifu = thisUser, - Price = 1, - Claimer = null - }); - success = true; - - uow.Set() - .Add(new() - { - User = thisUser, - Old = null, - New = newAff, - UpdateType = WaifuUpdateType.AffinityChanged - }); - } - else - { - if (w.Affinity is not null) - oldAff = w.Affinity; - w.Affinity = newAff; - success = true; - - uow.Set() - .Add(new() - { - User = w.Waifu, - Old = oldAff, - New = newAff, - UpdateType = WaifuUpdateType.AffinityChanged - }); - } - - await uow.SaveChangesAsync(); - } - - return (oldAff, success, remaining); - } - - public IEnumerable GetTopWaifusAtPage(int page, int perPage = 9) - { - using var uow = _db.GetDbContext(); - return uow.Set().GetTop(perPage, page * perPage); - } - - public ulong GetWaifuUserId(ulong ownerId, string name) - { - using var uow = _db.GetDbContext(); - return uow.Set().GetWaifuUserId(ownerId, name); - } - - private static TypedKey GetDivorceKey(ulong userId) - => new($"waifu:divorce_cd:{userId}"); - - private static TypedKey GetAffinityKey(ulong userId) - => new($"waifu:affinity:{userId}"); - - public async Task<(WaifuInfo, DivorceResult, long, TimeSpan?)> DivorceWaifuAsync(IUser user, ulong targetId) - { - DivorceResult result; - TimeSpan? remaining = null; - long amount = 0; - WaifuInfo w; - await using (var uow = _db.GetDbContext()) - { - w = uow.Set().ByWaifuUserId(targetId); - if (w?.Claimer is null || w.Claimer.UserId != user.Id) - result = DivorceResult.NotYourWife; - else - { - remaining = await _cache.GetRatelimitAsync(GetDivorceKey(user.Id), 6.Hours()); - if (remaining is TimeSpan rem) - { - result = DivorceResult.Cooldown; - return (w, result, amount, rem); - } - - amount = w.Price / 2; - - if (w.Affinity?.UserId == user.Id) - { - await _cs.AddAsync(w.Waifu.UserId, amount, new("waifu", "compensation")); - w.Price = (long)Math.Floor(w.Price * _gss.Data.Waifu.Multipliers.DivorceNewValue); - result = DivorceResult.SucessWithPenalty; - } - else - { - await _cs.AddAsync(user.Id, amount, new("waifu", "refund")); - - result = DivorceResult.Success; - } - - var oldClaimer = w.Claimer; - w.Claimer = null; - - uow.Set() - .Add(new() - { - User = w.Waifu, - Old = oldClaimer, - New = null, - UpdateType = WaifuUpdateType.Claimed - }); - } - - await uow.SaveChangesAsync(); - } - - return (w, result, amount, remaining); - } - - public async Task GiftWaifuAsync( - IUser from, - IUser giftedWaifu, - WaifuItemModel itemObj, - int count) - { - ArgumentOutOfRangeException.ThrowIfLessThan(count, 1, nameof(count)); - - if (!await _cs.RemoveAsync(from, itemObj.Price * count, new("waifu", "item"))) - return false; - - var totalValue = itemObj.Price * count; - - await using var uow = _db.GetDbContext(); - var w = uow.Set() - .ByWaifuUserId(giftedWaifu.Id, - set => set - .Include(x => x.Items) - .Include(x => x.Claimer)); - if (w is null) - { - uow.Set() - .Add(w = new() - { - Affinity = null, - Claimer = null, - Price = 1, - Waifu = uow.GetOrCreateUser(giftedWaifu) - }); - } - - if (!itemObj.Negative) - { - w.Items.AddRange(Enumerable.Range(0, count) - .Select((_) => new WaifuItem() - { - Name = itemObj.Name.ToLowerInvariant(), - ItemEmoji = itemObj.ItemEmoji - })); - - if (w.Claimer?.UserId == from.Id) - w.Price += (long)(totalValue * _gss.Data.Waifu.Multipliers.GiftEffect); - else - w.Price += totalValue / 2; - } - else - { - w.Price -= (long)(totalValue * _gss.Data.Waifu.Multipliers.NegativeGiftEffect); - if (w.Price < 1) - w.Price = 1; - } - - await uow.SaveChangesAsync(); - - return true; - } - - public async Task GetFullWaifuInfoAsync(ulong targetId) - { - await using var uow = _db.GetDbContext(); - var wi = await uow.GetWaifuInfoAsync(targetId); - if (wi is null) - { - wi = new() - { - AffinityCount = 0, - AffinityName = null, - ClaimCount = 0, - ClaimerName = null, - DivorceCount = 0, - FullName = null, - Price = 1 - }; - } - - return wi; - } - - public string GetClaimTitle(int count) - { - ClaimTitle title; - if (count == 0) - title = ClaimTitle.Lonely; - else if (count == 1) - title = ClaimTitle.Devoted; - else if (count < 3) - title = ClaimTitle.Rookie; - else if (count < 6) - title = ClaimTitle.Schemer; - else if (count < 10) - title = ClaimTitle.Dilettante; - else if (count < 17) - title = ClaimTitle.Intermediate; - else if (count < 25) - title = ClaimTitle.Seducer; - else if (count < 35) - title = ClaimTitle.Expert; - else if (count < 50) - title = ClaimTitle.Veteran; - else if (count < 75) - title = ClaimTitle.Incubis; - else if (count < 100) - title = ClaimTitle.Harem_King; - else - title = ClaimTitle.Harem_God; - - return title.ToString().Replace('_', ' '); - } - - public string GetAffinityTitle(int count) - { - AffinityTitle title; - if (count < 1) - title = AffinityTitle.Pure; - else if (count < 2) - title = AffinityTitle.Faithful; - else if (count < 4) - title = AffinityTitle.Playful; - else if (count < 8) - title = AffinityTitle.Cheater; - else if (count < 11) - title = AffinityTitle.Tainted; - else if (count < 15) - title = AffinityTitle.Corrupted; - else if (count < 20) - title = AffinityTitle.Lewd; - else if (count < 25) - title = AffinityTitle.Sloot; - else if (count < 35) - title = AffinityTitle.Depraved; - else - title = AffinityTitle.Harlot; - - return title.ToString().Replace('_', ' '); - } - - public IReadOnlyList GetWaifuItems() - { - var conf = _gss.Data; - return conf.Waifu.Items.Select(x - => new WaifuItemModel(x.ItemEmoji, - (long)(x.Price * conf.Waifu.Multipliers.AllGiftPrices), - x.Name, - x.Negative)) - .ToList(); - } - - private static readonly TypedKey _waifuDecayKey = $"waifu:last_decay"; - - public async Task OnReadyAsync() - { - // only decay waifu values from shard 0 - if (_client.ShardId != 0) - return; - - while (true) - { - try - { - var decay = _gss.Data.Waifu.Decay; - - var unclaimedMulti = 1 - (decay.UnclaimedDecayPercent / 100f); - var claimedMulti = 1 - (decay.ClaimedDecayPercent / 100f); - - var minPrice = decay.MinPrice; - var decayInterval = decay.HourInterval; - - if (decayInterval <= 0) - continue; - - if ((unclaimedMulti < 0 || unclaimedMulti > 1) && (claimedMulti < 0 || claimedMulti > 1)) - continue; - - var now = DateTime.UtcNow; - var nowB = now.ToBinary(); - - var result = await _cache.GetAsync(_waifuDecayKey); - - if (result.TryGetValue(out var val)) - { - var lastDecay = DateTime.FromBinary(val); - var toWait = decayInterval.Hours() - (DateTime.UtcNow - lastDecay); - - if (toWait > 0.Hours()) - continue; - } - - await _cache.AddAsync(_waifuDecayKey, nowB); - - if (unclaimedMulti is > 0 and <= 1) - { - await using var uow = _db.GetDbContext(); - - await uow.GetTable() - .Where(x => x.Price > minPrice && x.ClaimerId == null) - .UpdateAsync(old => new() - { - Price = (long)(old.Price * unclaimedMulti) - }); - } - - if (claimedMulti is > 0 and <= 1) - { - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.Price > minPrice && x.ClaimerId == null) - .UpdateAsync(old => new() - { - Price = (long)(old.Price * claimedMulti) - }); - } - } - catch (Exception ex) - { - Log.Error(ex, "Unexpected error occured in waifu decay loop: {ErrorMessage}", ex.Message); - } - finally - { - await Task.Delay(1.Hours()); - } - } - } - - public async Task> GetClaimNames(int waifuId) - { - await using var ctx = _db.GetDbContext(); - return await ctx.GetTable() - .Where(x => ctx.GetTable() - .Where(wi => wi.ClaimerId == waifuId) - .Select(wi => wi.WaifuId) - .Contains(x.Id)) - .Select(x => $"{x.Username}#{x.Discriminator}") - .ToListAsyncEF(); - } - - public async Task> GetFansNames(int waifuId) - { - await using var ctx = _db.GetDbContext(); - return await ctx.GetTable() - .Where(x => ctx.GetTable() - .Where(wi => wi.AffinityId == waifuId) - .Select(wi => wi.WaifuId) - .Contains(x.Id)) - .Select(x => $"{x.Username}#{x.Discriminator}") - .ToListAsyncEF(); - } - - public async Task> GetItems(int waifuId) - { - await using var ctx = _db.GetDbContext(); - return await ctx.GetTable() - .Where(x => x.WaifuInfoId - == ctx.GetTable() - .Where(x => x.WaifuId == waifuId) - .Select(x => x.Id) - .FirstOrDefault()) - .ToListAsyncEF(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/AffinityTitle.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/AffinityTitle.cs deleted file mode 100644 index 64cf443..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/AffinityTitle.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.Waifu; - -public enum AffinityTitle -{ - Pure, - Faithful, - Playful, - Cheater, - Tainted, - Corrupted, - Lewd, - Sloot, - Depraved, - Harlot -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/ClaimTitle.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/ClaimTitle.cs deleted file mode 100644 index 4b7628f..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/ClaimTitle.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.Waifu; - -public enum ClaimTitle -{ - Lonely, - Devoted, - Rookie, - Schemer, - Dilettante, - Intermediate, - Seducer, - Expert, - Veteran, - Incubis, - Harem_King, - Harem_God -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/DivorceResult.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/DivorceResult.cs deleted file mode 100644 index 650bc91..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/DivorceResult.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.Waifu; - -public enum DivorceResult -{ - Success, - SucessWithPenalty, - NotYourWife, - Cooldown -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/Extensions.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/Extensions.cs deleted file mode 100644 index 44c6396..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/Extensions.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Gambling.Common.Waifu; - -public class Extensions -{ - -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs deleted file mode 100644 index 63b5742..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItems.cs +++ /dev/null @@ -1,6 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; - -namespace EllieBot.Modules.Gambling; - -public record class MultipleWaifuItems(int Count, WaifuItemModel Item); \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs deleted file mode 100644 index bac72c1..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs +++ /dev/null @@ -1,47 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Gambling.Services; -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Gambling; - -public partial class MultipleWaifuItemsTypeReader : EllieTypeReader -{ - private readonly WaifuService _service; - - [GeneratedRegex(@"(?:(?\d+)[x*])?(?.+)")] - private static partial Regex ItemRegex(); - - public MultipleWaifuItemsTypeReader(WaifuService service) - { - _service = service; - } - public override ValueTask> ReadAsync(ICommandContext ctx, string input) - { - input = input.ToLowerInvariant(); - var match = ItemRegex().Match(input); - if (!match.Success) - { - return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Invalid input.")); - } - - var count = 1; - if (match.Groups["count"].Success) - { - if (!int.TryParse(match.Groups["count"].Value, out count) || count < 1) - { - return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Invalid count.")); - } - } - - var itemName = match.Groups["item"].Value?.ToLowerInvariant(); - var allItems = _service.GetWaifuItems(); - var item = allItems.FirstOrDefault(x => x.Name.ToLowerInvariant() == itemName); - if (item is null) - { - return new(Discord.Commands.TypeReaderResult.FromError(CommandError.ParseFailed, "Waifu gift does not exist.")); - } - - return new(Discord.Commands.TypeReaderResult.FromSuccess(new MultipleWaifuItems(count, item))); - } -} diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/WaifuClaimResult.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/WaifuClaimResult.cs deleted file mode 100644 index d68eafb..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/WaifuClaimResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common.Waifu; - -public enum WaifuClaimResult -{ - Success, - NotEnoughFunds, - InsufficientAmount -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/Waifu.cs b/src/EllieBot/Modules/Gambling/Waifus/db/Waifu.cs deleted file mode 100644 index 559f8ba..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/Waifu.cs +++ /dev/null @@ -1,17 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class WaifuInfo : DbEntity -{ - public int WaifuId { get; set; } - public DiscordUser Waifu { get; set; } - - public int? ClaimerId { get; set; } - public DiscordUser Claimer { get; set; } - - public int? AffinityId { get; set; } - public DiscordUser Affinity { get; set; } - - public long Price { get; set; } - public List Items { get; set; } = new(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs deleted file mode 100644 index b5498f1..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs +++ /dev/null @@ -1,134 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class WaifuExtensions -{ - public static WaifuInfo ByWaifuUserId( - this DbSet waifus, - ulong userId, - Func, IQueryable> includes = null) - { - if (includes is null) - { - return waifus.Include(wi => wi.Waifu) - .Include(wi => wi.Affinity) - .Include(wi => wi.Claimer) - .Include(wi => wi.Items) - .FirstOrDefault(wi => wi.Waifu.UserId == userId); - } - - return includes(waifus).AsQueryable().FirstOrDefault(wi => wi.Waifu.UserId == userId); - } - - public static IEnumerable GetTop(this DbSet waifus, int count, int skip = 0) - { - ArgumentOutOfRangeException.ThrowIfNegative(count); - - if (count == 0) - return []; - - return waifus.Include(wi => wi.Waifu) - .Include(wi => wi.Affinity) - .Include(wi => wi.Claimer) - .OrderByDescending(wi => wi.Price) - .Skip(skip) - .Take(count) - .Select(x => new WaifuLbResult - { - Affinity = x.Affinity == null ? null : x.Affinity.Username, - AffinityDiscrim = x.Affinity == null ? null : x.Affinity.Discriminator, - Claimer = x.Claimer == null ? null : x.Claimer.Username, - ClaimerDiscrim = x.Claimer == null ? null : x.Claimer.Discriminator, - Username = x.Waifu.Username, - Discrim = x.Waifu.Discriminator, - Price = x.Price - }) - .ToList(); - } - - public static decimal GetTotalValue(this DbSet waifus) - => waifus.AsQueryable().Where(x => x.ClaimerId != null).Sum(x => x.Price); - - public static ulong GetWaifuUserId(this DbSet waifus, ulong ownerId, string name) - => waifus.AsQueryable() - .AsNoTracking() - .Where(x => x.Claimer.UserId == ownerId && x.Waifu.Username + "#" + x.Waifu.Discriminator == name) - .Select(x => x.Waifu.UserId) - .FirstOrDefault(); - - public static async Task GetWaifuInfoAsync(this DbContext ctx, ulong userId) - { - await ctx.EnsureUserCreatedAsync(userId); - - await ctx.Set() - .ToLinqToDBTable() - .InsertOrUpdateAsync(() => new() - { - AffinityId = null, - ClaimerId = null, - Price = 1, - WaifuId = ctx.Set().Where(x => x.UserId == userId).Select(x => x.Id).First() - }, - _ => new(), - () => new() - { - WaifuId = ctx.Set().Where(x => x.UserId == userId).Select(x => x.Id).First() - }); - - var toReturn = ctx.Set() - .AsQueryable() - .Where(w => w.WaifuId - == ctx.Set() - .AsQueryable() - .Where(u => u.UserId == userId) - .Select(u => u.Id) - .FirstOrDefault()) - .Select(w => new WaifuInfoStats - { - WaifuId = w.WaifuId, - FullName = - ctx.Set() - .AsQueryable() - .Where(u => u.UserId == userId) - .Select(u => u.Username + "#" + u.Discriminator) - .FirstOrDefault(), - AffinityCount = - ctx.Set() - .AsQueryable() - .Count(x => x.UserId == w.WaifuId - && x.UpdateType == WaifuUpdateType.AffinityChanged - && x.NewId != null), - AffinityName = - ctx.Set() - .AsQueryable() - .Where(u => u.Id == w.AffinityId) - .Select(u => u.Username + "#" + u.Discriminator) - .FirstOrDefault(), - ClaimCount = ctx.Set().AsQueryable().Count(x => x.ClaimerId == w.WaifuId), - ClaimerName = - ctx.Set() - .AsQueryable() - .Where(u => u.Id == w.ClaimerId) - .Select(u => u.Username + "#" + u.Discriminator) - .FirstOrDefault(), - DivorceCount = - ctx.Set() - .AsQueryable() - .Count(x => x.OldId == w.WaifuId - && x.NewId == null - && x.UpdateType == WaifuUpdateType.Claimed), - Price = w.Price, - }) - .FirstOrDefault(); - - if (toReturn is null) - return null; - - return toReturn; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuInfoStats.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuInfoStats.cs deleted file mode 100644 index 8add339..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuInfoStats.cs +++ /dev/null @@ -1,14 +0,0 @@ -#nullable disable -namespace EllieBot.Db; - -public class WaifuInfoStats -{ - public int WaifuId { get; init; } - public string FullName { get; init; } - public long Price { get; init; } - public string ClaimerName { get; init; } - public string AffinityName { get; init; } - public int AffinityCount { get; init; } - public int DivorceCount { get; init; } - public int ClaimCount { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs deleted file mode 100644 index 5b8630f..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class WaifuItem : DbEntity -{ - public WaifuInfo WaifuInfo { get; set; } - public int? WaifuInfoId { get; set; } - public string ItemEmoji { get; set; } - public string Name { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs deleted file mode 100644 index f83af4f..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs +++ /dev/null @@ -1,16 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class WaifuLbResult -{ - public string Username { get; set; } - public string Discrim { get; set; } - - public string Claimer { get; set; } - public string ClaimerDiscrim { get; set; } - - public string Affinity { get; set; } - public string AffinityDiscrim { get; set; } - - public long Price { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdate.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdate.cs deleted file mode 100644 index 64608c2..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdate.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class WaifuUpdate : DbEntity -{ - public int UserId { get; set; } - public DiscordUser User { get; set; } - public WaifuUpdateType UpdateType { get; set; } - - public int? OldId { get; set; } - public DiscordUser Old { get; set; } - - public int? NewId { get; set; } - public DiscordUser New { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdateType.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdateType.cs deleted file mode 100644 index 626bb4c..0000000 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuUpdateType.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public enum WaifuUpdateType -{ - AffinityChanged, - Claimed -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/Decks/QuadDeck.cs b/src/EllieBot/Modules/Gambling/_common/Decks/QuadDeck.cs deleted file mode 100644 index 04b8e76..0000000 --- a/src/EllieBot/Modules/Gambling/_common/Decks/QuadDeck.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Ellie.Econ; - -namespace EllieBot.Modules.Gambling.Common; - -public class QuadDeck : Deck -{ - protected override void RefillPool() - { - CardPool = new(52 * 4); - for (var j = 1; j < 14; j++) - for (var i = 1; i < 5; i++) - { - CardPool.Add(new((CardSuit)i, j)); - CardPool.Add(new((CardSuit)i, j)); - CardPool.Add(new((CardSuit)i, j)); - CardPool.Add(new((CardSuit)i, j)); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/GamblingCleanupService.cs b/src/EllieBot/Modules/Gambling/_common/GamblingCleanupService.cs deleted file mode 100644 index 45c1c7e..0000000 --- a/src/EllieBot/Modules/Gambling/_common/GamblingCleanupService.cs +++ /dev/null @@ -1,56 +0,0 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling; - -public class GamblingCleanupService : IGamblingCleanupService, IEService -{ - private readonly DbService _db; - - public GamblingCleanupService(DbService db) - { - _db = db; - } - - public async Task DeleteWaifus() - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable().DeleteAsync(); - await ctx.GetTable().DeleteAsync(); - await ctx.GetTable().DeleteAsync(); - } - - public async Task DeleteWaifu(ulong userId) - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .Where(x => x.User.UserId == userId) - .DeleteAsync(); - await ctx.GetTable() - .Where(x => x.WaifuInfo.Waifu.UserId == userId) - .DeleteAsync(); - await ctx.GetTable() - .Where(x => x.Claimer.UserId == userId) - .UpdateAsync(old => new WaifuInfo() - { - ClaimerId = null, - }); - await ctx.GetTable() - .Where(x => x.Waifu.UserId == userId) - .DeleteAsync(); - } - - public async Task DeleteCurrency() - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable().UpdateAsync(_ => new DiscordUser() - { - CurrencyAmount = 0 - }); - - await ctx.GetTable().DeleteAsync(); - await ctx.GetTable().DeleteAsync(); - await ctx.GetTable().DeleteAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/IGamblingCleanupService.cs b/src/EllieBot/Modules/Gambling/_common/IGamblingCleanupService.cs deleted file mode 100644 index 8e266b4..0000000 --- a/src/EllieBot/Modules/Gambling/_common/IGamblingCleanupService.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Gambling; - -public interface IGamblingCleanupService -{ - Task DeleteWaifus(); - Task DeleteWaifu(ulong userId); - Task DeleteCurrency(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs deleted file mode 100644 index 77cc2d7..0000000 --- a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs +++ /dev/null @@ -1,17 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Betdraw; -using EllieBot.Modules.Gambling.Rps; -using OneOf; - -namespace EllieBot.Modules.Gambling; - -public interface IGamblingService -{ - Task> LulaAsync(ulong userId, long amount); - Task> BetRollAsync(ulong userId, long amount); - Task> BetFlipAsync(ulong userId, long amount, byte guess); - Task> SlotAsync(ulong userId, long amount); - Task FlipAsync(int count); - Task> RpsAsync(ulong userId, long amount, byte pick); - Task> BetDrawAsync(ulong userId, long amount, byte? maybeGuessValue, byte? maybeGuessColor); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs deleted file mode 100644 index 85fa703..0000000 --- a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs +++ /dev/null @@ -1,268 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Betdraw; -using EllieBot.Modules.Gambling.Rps; -using EllieBot.Modules.Gambling.Services; -using OneOf; - -namespace EllieBot.Modules.Gambling; - -public sealed class NewGamblingService : IGamblingService, IEService -{ - private readonly GamblingConfigService _bcs; - private readonly ICurrencyService _cs; - - public NewGamblingService(GamblingConfigService bcs, ICurrencyService cs) - { - _bcs = bcs; - _cs = cs; - } - - public async Task> LulaAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("lula", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var game = new LulaGame(_bcs.Data.LuckyLadder.Multipliers); - var result = game.Spin(amount); - - var won = (long)result.Won; - if (won > 0) - { - await _cs.AddAsync(userId, won, new("lula", "win")); - } - - return result; - } - - public async Task> BetRollAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("betroll", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var game = new BetrollGame(_bcs.Data.BetRoll.Pairs - .Select(x => (x.WhenAbove, (decimal)x.MultiplyBy)) - .ToList()); - - var result = game.Roll(amount); - - var won = (long)result.Won; - if (won > 0) - { - await _cs.AddAsync(userId, won, new("betroll", "win")); - } - - return result; - } - - public async Task> BetFlipAsync(ulong userId, long amount, byte guess) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - - ArgumentOutOfRangeException.ThrowIfGreaterThan(guess, 1); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("betflip", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var game = new BetflipGame(_bcs.Data.BetFlip.Multiplier); - var result = game.Flip(guess, amount); - - var won = (long)result.Won; - if (won > 0) - { - await _cs.AddAsync(userId, won, new("betflip", "win")); - } - - return result; - } - - public async Task> BetDrawAsync(ulong userId, long amount, byte? maybeGuessValue, byte? maybeGuessColor) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - - if (maybeGuessColor is null && maybeGuessValue is null) - throw new ArgumentNullException(); - - if (maybeGuessColor > 1) - throw new ArgumentOutOfRangeException(nameof(maybeGuessColor)); - - if (maybeGuessValue > 1) - throw new ArgumentOutOfRangeException(nameof(maybeGuessValue)); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("betdraw", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var game = new BetdrawGame(); - var result = game.Draw((BetdrawValueGuess?)maybeGuessValue, (BetdrawColorGuess?)maybeGuessColor, amount); - - var won = (long)result.Won; - if (won > 0) - { - await _cs.AddAsync(userId, won, new("betdraw", "win")); - } - - return result; - } - - public async Task> SlotAsync(ulong userId, long amount) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("slot", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var game = new SlotGame(); - var result = game.Spin(amount); - - var won = (long)result.Won; - if (won > 0) - { - await _cs.AddAsync(userId, won, new("slot", "won")); - } - - return result; - } - - public Task FlipAsync(int count) - { - ArgumentOutOfRangeException.ThrowIfLessThan(count, 1); - - var game = new BetflipGame(0); - - var results = new FlipResult[count]; - for (var i = 0; i < count; i++) - { - results[i] = new() - { - Side = game.Flip(0, 0).Side - }; - } - - return Task.FromResult(results); - } - - // - // - // private readonly ConcurrentDictionary _decks = new ConcurrentDictionary(); - // - // public override Task DeckShuffle(DeckShuffleRequest request, ServerCallContext context) - // { - // _decks.AddOrUpdate(request.Id, new Deck(), (key, old) => new Deck()); - // return Task.FromResult(new DeckShuffleReply { }); - // } - // - // public override Task DeckDraw(DeckDrawRequest request, ServerCallContext context) - // { - // if (request.Count < 1 || request.Count > 10) - // throw new ArgumentOutOfRangeException(nameof(request.Id)); - // - // var deck = request.UseNew - // ? new Deck() - // : _decks.GetOrAdd(request.Id, new Deck()); - // - // var list = new List(request.Count); - // for (int i = 0; i < request.Count; i++) - // { - // var card = deck.DrawNoRestart(); - // if (card is null) - // { - // if (i == 0) - // { - // deck.Restart(); - // list.Add(deck.DrawNoRestart()); - // continue; - // } - // - // break; - // } - // - // list.Add(card); - // } - // - // var cards = list - // .Select(x => new Card - // { - // Name = x.ToString().ToLowerInvariant().Replace(' ', '_'), - // Number = x.Number, - // Suit = (CardSuit) x.Suit - // }); - // - // var toReturn = new DeckDrawReply(); - // toReturn.Cards.AddRange(cards); - // - // return Task.FromResult(toReturn); - // } - // - - public async Task> RpsAsync(ulong userId, long amount, byte pick) - { - ArgumentOutOfRangeException.ThrowIfNegative(amount); - ArgumentOutOfRangeException.ThrowIfGreaterThan(pick, 2); - - if (amount > 0) - { - var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("rps", "bet")); - - if (!isTakeSuccess) - { - return GamblingError.InsufficientFunds; - } - } - - var rps = new RpsGame(); - var result = rps.Play((RpsPick)pick, amount); - - var won = (long)result.Won; - if (won > 0) - { - var extra = result.Result switch - { - RpsResultType.Draw => "draw", - RpsResultType.Win => "win", - _ => "lose" - }; - - await _cs.AddAsync(userId, won, new("rps", extra)); - } - - return result; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/RollDuelGame.cs b/src/EllieBot/Modules/Gambling/_common/RollDuelGame.cs deleted file mode 100644 index 24b634a..0000000 --- a/src/EllieBot/Modules/Gambling/_common/RollDuelGame.cs +++ /dev/null @@ -1,139 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Gambling.Common; - -public class RollDuelGame -{ - public enum Reason - { - Normal, - NoFunds, - Timeout - } - - public enum State - { - Waiting, - Running, - Ended - } - - public event Func OnGameTick; - public event Func OnEnded; - - public ulong P1 { get; } - public ulong P2 { get; } - - public long Amount { get; } - - public List<(int, int)> Rolls { get; } = new(); - public State CurrentState { get; private set; } - public ulong Winner { get; private set; } - - private readonly ulong _botId; - - private readonly ICurrencyService _cs; - - private readonly Timer _timeoutTimer; - private readonly EllieRandom _rng = new(); - private readonly SemaphoreSlim _locker = new(1, 1); - - public RollDuelGame( - ICurrencyService cs, - ulong botId, - ulong p1, - ulong p2, - long amount) - { - P1 = p1; - P2 = p2; - _botId = botId; - Amount = amount; - _cs = cs; - - _timeoutTimer = new(async delegate - { - await _locker.WaitAsync(); - try - { - if (CurrentState != State.Waiting) - return; - CurrentState = State.Ended; - await OnEnded?.Invoke(this, Reason.Timeout); - } - catch { } - finally - { - _locker.Release(); - } - }, - null, - TimeSpan.FromSeconds(15), - TimeSpan.FromMilliseconds(-1)); - } - - public async Task StartGame() - { - await _locker.WaitAsync(); - try - { - if (CurrentState != State.Waiting) - return; - _timeoutTimer.Change(Timeout.Infinite, Timeout.Infinite); - CurrentState = State.Running; - } - finally - { - _locker.Release(); - } - - if (!await _cs.RemoveAsync(P1, Amount, new("rollduel", "bet"))) - { - await OnEnded?.Invoke(this, Reason.NoFunds); - CurrentState = State.Ended; - return; - } - - if (!await _cs.RemoveAsync(P2, Amount, new("rollduel", "bet"))) - { - await _cs.AddAsync(P1, Amount, new("rollduel", "refund")); - await OnEnded?.Invoke(this, Reason.NoFunds); - CurrentState = State.Ended; - return; - } - - int n1, n2; - do - { - n1 = _rng.Next(0, 5); - n2 = _rng.Next(0, 5); - Rolls.Add((n1, n2)); - if (n1 != n2) - { - if (n1 > n2) - Winner = P1; - else - Winner = P2; - var won = (long)(Amount * 2 * 0.98f); - await _cs.AddAsync(Winner, won, new("rollduel", "win")); - - await _cs.AddAsync(_botId, (Amount * 2) - won, new("rollduel", "fee")); - } - - try { await OnGameTick?.Invoke(this); } - catch { } - - await Task.Delay(2500); - if (n1 != n2) - break; - } while (true); - - CurrentState = State.Ended; - await OnEnded?.Invoke(this, Reason.Normal); - } -} - -public struct RollDuelChallenge -{ - public ulong Player1 { get; set; } - public ulong Player2 { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs b/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs deleted file mode 100644 index 6773b78..0000000 --- a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Text.RegularExpressions; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Services; -using NCalc; -using OneOf; - -namespace EllieBot.Common.TypeReaders; - -public class BaseShmartInputAmountReader -{ - private static readonly Regex _percentRegex = new(@"^((?100|\d{1,2})%)$", RegexOptions.Compiled); - protected readonly DbService _db; - protected readonly GamblingConfigService _gambling; - - public BaseShmartInputAmountReader(DbService db, GamblingConfigService gambling) - { - _db = db; - _gambling = gambling; - } - - public async ValueTask>> ReadAsync(ICommandContext context, string input) - { - var i = input.Trim().ToUpperInvariant(); - - i = i.Replace("K", "000"); - - //can't add m because it will conflict with max atm - - if (await TryHandlePercentage(context, i) is long num) - { - return num; - } - - try - { - var expr = new Expression(i, EvaluateOptions.IgnoreCase); - expr.EvaluateParameter += (str, ev) => EvaluateParam(str, ev, context).GetAwaiter().GetResult(); - return (long)decimal.Parse(expr.Evaluate().ToString()!); - } - catch (Exception) - { - return new OneOf.Types.Error($"Invalid input: {input}"); - } - } - - private async Task EvaluateParam(string name, ParameterArgs args, ICommandContext ctx) - { - switch (name.ToUpperInvariant()) - { - case "PI": - args.Result = Math.PI; - break; - case "E": - args.Result = Math.E; - break; - case "ALL": - case "ALLIN": - args.Result = await Cur(ctx); - break; - case "HALF": - args.Result = await Cur(ctx) / 2; - break; - case "MAX": - args.Result = await Max(ctx); - break; - } - } - - protected virtual async Task Cur(ICommandContext ctx) - { - await using var uow = _db.GetDbContext(); - return await uow.Set().GetUserCurrencyAsync(ctx.User.Id); - } - - protected virtual async Task Max(ICommandContext ctx) - { - var settings = _gambling.Data; - var max = settings.MaxBet; - return max == 0 ? await Cur(ctx) : max; - } - - private async Task TryHandlePercentage(ICommandContext ctx, string input) - { - var m = _percentRegex.Match(input); - - if (m.Captures.Count == 0) - return null; - - if (!long.TryParse(m.Groups["num"].ToString(), out var percent)) - return null; - - return (long)(await Cur(ctx) * (percent / 100.0f)); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartBankInputAmountReader.cs b/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartBankInputAmountReader.cs deleted file mode 100644 index bcb7c20..0000000 --- a/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartBankInputAmountReader.cs +++ /dev/null @@ -1,21 +0,0 @@ -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Common.TypeReaders; - -public sealed class ShmartBankInputAmountReader : BaseShmartInputAmountReader -{ - private readonly IBankService _bank; - - public ShmartBankInputAmountReader(IBankService bank, DbService db, GamblingConfigService gambling) - : base(db, gambling) - { - _bank = bank; - } - - protected override Task Cur(ICommandContext ctx) - => _bank.GetBalanceAsync(ctx.User.Id); - - protected override Task Max(ICommandContext ctx) - => Cur(ctx); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartNumberTypeReader.cs b/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartNumberTypeReader.cs deleted file mode 100644 index cd94058..0000000 --- a/src/EllieBot/Modules/Gambling/_common/TypeReaders/ShmartNumberTypeReader.cs +++ /dev/null @@ -1,57 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Common.TypeReaders; - -public sealed class BalanceTypeReader : TypeReader -{ - private readonly BaseShmartInputAmountReader _tr; - - public BalanceTypeReader(DbService db, GamblingConfigService gambling) - { - _tr = new BaseShmartInputAmountReader(db, gambling); - } - - public override async Task ReadAsync( - ICommandContext context, - string input, - IServiceProvider services) - { - - var result = await _tr.ReadAsync(context, input); - - if (result.TryPickT0(out var val, out var err)) - { - return Discord.Commands.TypeReaderResult.FromSuccess(val); - } - - return Discord.Commands.TypeReaderResult.FromError(CommandError.Unsuccessful, err.Value); - } -} - -public sealed class BankBalanceTypeReader : TypeReader -{ - private readonly ShmartBankInputAmountReader _tr; - - public BankBalanceTypeReader(IBankService bank, DbService db, GamblingConfigService gambling) - { - _tr = new ShmartBankInputAmountReader(bank, db, gambling); - } - - public override async Task ReadAsync( - ICommandContext context, - string input, - IServiceProvider services) - { - - var result = await _tr.ReadAsync(context, input); - - if (result.TryPickT0(out var val, out var err)) - { - return Discord.Commands.TypeReaderResult.FromSuccess(val); - } - - return Discord.Commands.TypeReaderResult.FromError(CommandError.Unsuccessful, err.Value); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Acrophobia/Acrophobia.cs b/src/EllieBot/Modules/Games/Acrophobia/Acrophobia.cs deleted file mode 100644 index ae8ba56..0000000 --- a/src/EllieBot/Modules/Games/Acrophobia/Acrophobia.cs +++ /dev/null @@ -1,200 +0,0 @@ -#nullable disable -using CommandLine; -using System.Collections.Immutable; - -namespace EllieBot.Modules.Games.Common.Acrophobia; - -public sealed class AcrophobiaGame : IDisposable -{ - public enum Phase - { - Submission, - Voting, - Ended - } - - public enum UserInputResult - { - Submitted, - SubmissionFailed, - Voted, - VotingFailed, - Failed - } - - public event Func OnStarted = delegate { return Task.CompletedTask; }; - - public event Func>, Task> OnVotingStarted = - delegate { return Task.CompletedTask; }; - - public event Func OnUserVoted = delegate { return Task.CompletedTask; }; - - public event Func>, Task> OnEnded = delegate - { - return Task.CompletedTask; - }; - - public Phase CurrentPhase { get; private set; } = Phase.Submission; - public ImmutableArray StartingLetters { get; private set; } - public Options Opts { get; } - - private readonly Dictionary _submissions = new(); - private readonly SemaphoreSlim _locker = new(1, 1); - private readonly EllieRandom _rng; - - private readonly HashSet _usersWhoVoted = []; - - public AcrophobiaGame(Options options) - { - Opts = options; - _rng = new(); - InitializeStartingLetters(); - } - - public async Task Run() - { - await OnStarted(this); - await Task.Delay(Opts.SubmissionTime * 1000); - await _locker.WaitAsync(); - try - { - if (_submissions.Count == 0) - { - CurrentPhase = Phase.Ended; - await OnVotingStarted(this, ImmutableArray.Create>()); - return; - } - - if (_submissions.Count == 1) - { - CurrentPhase = Phase.Ended; - await OnVotingStarted(this, _submissions.ToArray().ToImmutableArray()); - return; - } - - CurrentPhase = Phase.Voting; - - await OnVotingStarted(this, _submissions.ToArray().ToImmutableArray()); - } - finally { _locker.Release(); } - - await Task.Delay(Opts.VoteTime * 1000); - await _locker.WaitAsync(); - try - { - CurrentPhase = Phase.Ended; - await OnEnded(this, _submissions.ToArray().ToImmutableArray()); - } - finally { _locker.Release(); } - } - - private void InitializeStartingLetters() - { - var wordCount = _rng.Next(3, 6); - - var lettersArr = new char[wordCount]; - - for (var i = 0; i < wordCount; i++) - { - var randChar = (char)_rng.Next(65, 91); - lettersArr[i] = randChar == 'X' ? (char)_rng.Next(65, 88) : randChar; - } - - StartingLetters = lettersArr.ToImmutableArray(); - } - - public async Task UserInput(ulong userId, string userName, string input) - { - var user = new AcrophobiaUser(userId, userName, input.ToLowerInvariant().ToTitleCase()); - - await _locker.WaitAsync(); - try - { - switch (CurrentPhase) - { - case Phase.Submission: - if (_submissions.ContainsKey(user) || !IsValidAnswer(input)) - break; - - _submissions.Add(user, 0); - return true; - case Phase.Voting: - AcrophobiaUser toVoteFor; - if (!int.TryParse(input, out var index) - || --index < 0 - || index >= _submissions.Count - || (toVoteFor = _submissions.ToArray()[index].Key).UserId == user.UserId - || !_usersWhoVoted.Add(userId)) - break; - ++_submissions[toVoteFor]; - _ = Task.Run(() => OnUserVoted(userName)); - return true; - } - - return false; - } - finally - { - _locker.Release(); - } - } - - private bool IsValidAnswer(string input) - { - input = input.ToUpperInvariant(); - - var inputWords = input.Split(' '); - - if (inputWords.Length - != StartingLetters.Length) // number of words must be the same as the number of the starting letters - return false; - - for (var i = 0; i < StartingLetters.Length; i++) - { - var letter = StartingLetters[i]; - - if (!inputWords[i] - .StartsWith(letter.ToString(), StringComparison.InvariantCulture)) // all first letters must match - return false; - } - - return true; - } - - public void Dispose() - { - CurrentPhase = Phase.Ended; - OnStarted = null; - OnEnded = null; - OnUserVoted = null; - OnVotingStarted = null; - _usersWhoVoted.Clear(); - _submissions.Clear(); - _locker.Dispose(); - } - - public class Options : IEllieCommandOptions - { - [Option('s', - "submission-time", - Required = false, - Default = 60, - HelpText = "Time after which the submissions are closed and voting starts.")] - public int SubmissionTime { get; set; } = 60; - - [Option('v', - "vote-time", - Required = false, - Default = 60, - HelpText = "Time after which the voting is closed and the winner is declared.")] - public int VoteTime { get; set; } = 30; - - public void NormalizeOptions() - { - if (SubmissionTime is < 15 or > 300) - SubmissionTime = 60; - if (VoteTime is < 15 or > 120) - VoteTime = 30; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Acrophobia/AcrophobiaUser.cs b/src/EllieBot/Modules/Games/Acrophobia/AcrophobiaUser.cs deleted file mode 100644 index 2de2917..0000000 --- a/src/EllieBot/Modules/Games/Acrophobia/AcrophobiaUser.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Common.Acrophobia; - -public class AcrophobiaUser -{ - public string UserName { get; } - public ulong UserId { get; } - public string Input { get; } - - public AcrophobiaUser(ulong userId, string userName, string input) - { - UserName = userName; - UserId = userId; - Input = input; - } - - public override int GetHashCode() - => UserId.GetHashCode(); - - public override bool Equals(object obj) - => obj is AcrophobiaUser x ? x.UserId == UserId : false; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Acrophobia/AcropobiaCommands.cs b/src/EllieBot/Modules/Games/Acrophobia/AcropobiaCommands.cs deleted file mode 100644 index 30defba..0000000 --- a/src/EllieBot/Modules/Games/Acrophobia/AcropobiaCommands.cs +++ /dev/null @@ -1,140 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Common.Acrophobia; -using EllieBot.Modules.Games.Services; -using System.Collections.Immutable; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class AcropobiaCommands : EllieModule - { - private readonly DiscordSocketClient _client; - - public AcropobiaCommands(DiscordSocketClient client) - => _client = client; - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public async Task Acrophobia(params string[] args) - { - var (options, _) = OptionsParser.ParseFrom(new AcrophobiaGame.Options(), args); - var channel = (ITextChannel)ctx.Channel; - - var game = new AcrophobiaGame(options); - if (_service.AcrophobiaGames.TryAdd(channel.Id, game)) - { - try - { - game.OnStarted += Game_OnStarted; - game.OnEnded += Game_OnEnded; - game.OnVotingStarted += Game_OnVotingStarted; - game.OnUserVoted += Game_OnUserVoted; - _client.MessageReceived += ClientMessageReceived; - await game.Run(); - } - finally - { - _client.MessageReceived -= ClientMessageReceived; - _service.AcrophobiaGames.TryRemove(channel.Id, out game); - game?.Dispose(); - } - } - else - await Response().Error(strs.acro_running).SendAsync(); - - Task ClientMessageReceived(SocketMessage msg) - { - if (msg.Channel.Id != ctx.Channel.Id) - return Task.CompletedTask; - - _ = Task.Run(async () => - { - try - { - var success = await game.UserInput(msg.Author.Id, msg.Author.ToString(), msg.Content); - if (success) - await msg.DeleteAsync(); - } - catch { } - }); - - return Task.CompletedTask; - } - } - - private Task Game_OnStarted(AcrophobiaGame game) - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.acrophobia)) - .WithDescription( - GetText(strs.acro_started(Format.Bold(string.Join(".", game.StartingLetters))))) - .WithFooter(GetText(strs.acro_started_footer(game.Opts.SubmissionTime))); - - return Response().Embed(embed).SendAsync(); - } - - private Task Game_OnUserVoted(string user) - => Response().Confirm(GetText(strs.acrophobia), GetText(strs.acro_vote_cast(Format.Bold(user)))).SendAsync(); - - private async Task Game_OnVotingStarted( - AcrophobiaGame game, - ImmutableArray> submissions) - { - if (submissions.Length == 0) - { - await Response().Error(GetText(strs.acrophobia), GetText(strs.acro_ended_no_sub)).SendAsync(); - return; - } - - if (submissions.Length == 1) - { - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithDescription(GetText( - strs.acro_winner_only( - Format.Bold(submissions.First().Key.UserName)))) - .WithFooter(submissions.First().Key.Input)).SendAsync(); - return; - } - - - var i = 0; - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.acrophobia) + " - " + GetText(strs.submissions_closed)) - .WithDescription(GetText(strs.acro_nym_was( - Format.Bold(string.Join(".", game.StartingLetters)) - + "\n" - + $@"-- -{submissions.Aggregate("", (agg, cur) => agg + $"`{++i}.` **{cur.Key.Input}**\n")} ---"))) - .WithFooter(GetText(strs.acro_vote)); - - await Response().Embed(embed).SendAsync(); - } - - private async Task Game_OnEnded(AcrophobiaGame game, ImmutableArray> votes) - { - if (!votes.Any() || votes.All(x => x.Value == 0)) - { - await Response().Error(GetText(strs.acrophobia), GetText(strs.acro_no_votes_cast)).SendAsync(); - return; - } - - var table = votes.OrderByDescending(v => v.Value); - var winner = table.First(); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.acrophobia)) - .WithDescription(GetText(strs.acro_winner(Format.Bold(winner.Key.UserName), - Format.Bold(winner.Value.ToString())))) - .WithFooter(winner.Key.Input); - - await Response().Embed(embed).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs deleted file mode 100644 index ea902c2..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs +++ /dev/null @@ -1,34 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class ChatterBotCommands : EllieModule - { - private readonly DbService _db; - - public ChatterBotCommands(DbService db) - => _db = db; - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task CleverBot() - { - var channel = (ITextChannel)ctx.Channel; - - var newState = await _service.ToggleChatterBotAsync(ctx.Guild.Id); - - if (!newState) - { - await Response().Confirm(strs.chatbot_disabled).SendAsync(); - return; - } - - await Response().Confirm(strs.chatbot_enabled).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs deleted file mode 100644 index e088319..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ /dev/null @@ -1,239 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using EllieBot.Modules.Games.Common; -using EllieBot.Modules.Games.Common.ChatterBot; -using EllieBot.Modules.Patronage; -using EllieBot.Modules.Permissions; - -namespace EllieBot.Modules.Games.Services; - -public class ChatterBotService : IExecOnMessage -{ - private ConcurrentDictionary> ChatterBotGuilds { get; } - - public int Priority - => 1; - - private readonly DiscordSocketClient _client; - private readonly IPermissionChecker _perms; - private readonly IBotCredentials _creds; - private readonly IHttpClientFactory _httpFactory; - private readonly GamesConfigService _gcs; - private readonly IMessageSenderService _sender; - private readonly DbService _db; - public readonly IPatronageService _ps; - - public ChatterBotService( - DiscordSocketClient client, - IPermissionChecker perms, - IBot bot, - IPatronageService ps, - IHttpClientFactory factory, - IBotCredentials creds, - GamesConfigService gcs, - IMessageSenderService sender, - DbService db) - { - _client = client; - _perms = perms; - _creds = creds; - _sender = sender; - _db = db; - _httpFactory = factory; - _perms = perms; - _gcs = gcs; - _ps = ps; - - ChatterBotGuilds = new(bot.AllGuildConfigs - .Where(gc => gc.CleverbotEnabled) - .ToDictionary(gc => gc.GuildId, - _ => new Lazy(() => CreateSession(), true))); - } - - public IChatterBotSession CreateSession() - { - switch (_gcs.Data.ChatBot) - { - case ChatBotImplementation.Cleverbot: - if (!string.IsNullOrWhiteSpace(_creds.CleverbotApiKey)) - return new OfficialCleverbotSession(_creds.CleverbotApiKey, _httpFactory); - - Log.Information("Cleverbot will not work as the api key is missing"); - return null; - case ChatBotImplementation.OpenAi: - var data = _gcs.Data; - if (!string.IsNullOrWhiteSpace(_creds.Gpt3ApiKey)) - return new OpenAiApiSession( - data.ChatGpt.ApiUrl, - _creds.Gpt3ApiKey, - data.ChatGpt.ModelName, - data.ChatGpt.ChatHistory, - data.ChatGpt.MaxTokens, - data.ChatGpt.MinTokens, - data.ChatGpt.PersonalityPrompt, - _client.CurrentUser.Username, - _httpFactory); - - Log.Information("Openai Api will likely not work as the api key is missing"); - return null; - default: - return null; - } - } - - public IChatterBotSession GetOrCreateSession(ulong guildId) - { - if (ChatterBotGuilds.TryGetValue(guildId, out var lazyChatBot)) - return lazyChatBot.Value; - - lazyChatBot = new(() => CreateSession(), true); - ChatterBotGuilds.TryAdd(guildId, lazyChatBot); - return lazyChatBot.Value; - } - - public string PrepareMessage(IUserMessage msg) - { - var ellieId = _client.CurrentUser.Id; - var normalMention = $"<@{ellieId}> "; - var nickMention = $"<@!{ellieId}> "; - string message; - if (msg.Content.StartsWith(normalMention, StringComparison.InvariantCulture)) - message = msg.Content[normalMention.Length..].Trim(); - else if (msg.Content.StartsWith(nickMention, StringComparison.InvariantCulture)) - message = msg.Content[nickMention.Length..].Trim(); - else if (msg.ReferencedMessage?.Author.Id == ellieId) - message = msg.Content; - else - return null; - - return message; - } - - public async Task ExecOnMessageAsync(IGuild guild, IUserMessage usrMsg) - { - if (guild is not SocketGuild sg) - return false; - - var channel = usrMsg.Channel as ITextChannel; - if (channel is null) - return false; - - if (!ChatterBotGuilds.TryGetValue(channel.Guild.Id, out var lazyChatBot)) - return false; - - var chatBot = lazyChatBot.Value; - var message = PrepareMessage(usrMsg); - if (message is null) - return false; - - return await RunChatterBot(sg, usrMsg, channel, chatBot, message); - } - - public async Task RunChatterBot( - SocketGuild guild, - IUserMessage usrMsg, - ITextChannel channel, - IChatterBotSession chatBot, - string message) - { - try - { - var res = await _perms.CheckPermsAsync(guild, - usrMsg.Channel, - usrMsg.Author, - CleverBotResponseStr.CLEVERBOT_RESPONSE, - CleverBotResponseStr.CLEVERBOT_RESPONSE); - - if (!res.IsAllowed) - return false; - - if (!await _ps.LimitHitAsync(LimitedFeatureName.ChatBot, usrMsg.Author.Id, 2048 / 2)) - { - // limit exceeded - return false; - } - - _ = channel.TriggerTypingAsync(); - var response = await chatBot.Think(message, usrMsg.Author.ToString()); - - if (response.TryPickT0(out var result, out var error)) - { - // calculate the diff in case we overestimated user's usage - var inTokens = (result.TokensIn - 2048) / 2; - - // add the output tokens to the limit - await _ps.LimitForceHit(LimitedFeatureName.ChatBot, - usrMsg.Author.Id, - (inTokens) + (result.TokensOut / 2 * 3)); - - await _sender.Response(channel) - .Confirm(result.Text) - .SendAsync(); - } - else - { - Log.Warning("Error in chatterbot: {Error}", error.Value); - } - - Log.Information(""" - CleverBot Executed - Server: {GuildName} [{GuildId}] - Channel: {ChannelName} [{ChannelId}] - UserId: {Author} [{AuthorId}] - Message: {Content} - """, - guild.Name, - guild.Id, - usrMsg.Channel?.Name, - usrMsg.Channel?.Id, - usrMsg.Author, - usrMsg.Author.Id, - usrMsg.Content); - - return true; - } - catch (Exception ex) - { - Log.Warning(ex, "Error in cleverbot"); - } - - return false; - } - - public async Task ToggleChatterBotAsync(ulong guildId) - { - if (ChatterBotGuilds.TryRemove(guildId, out _)) - { - await using var uow = _db.GetDbContext(); - await uow.Set() - .ToLinqToDBTable() - .Where(x => x.GuildId == guildId) - .UpdateAsync((gc) => new GuildConfig() - { - CleverbotEnabled = false - }); - await uow.SaveChangesAsync(); - return false; - } - - ChatterBotGuilds.TryAdd(guildId, new(() => CreateSession(), true)); - - await using (var uow = _db.GetDbContext()) - { - await uow.Set() - .ToLinqToDBTable() - .Where(x => x.GuildId == guildId) - .UpdateAsync((gc) => new GuildConfig() - { - CleverbotEnabled = true - }); - - await uow.SaveChangesAsync(); - } - - return true; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs deleted file mode 100644 index c1290dd..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class Choice -{ - [JsonPropertyName("message")] - public required Message Message { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/CleverbotResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/CleverbotResponse.cs deleted file mode 100644 index 2f83164..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/CleverbotResponse.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class CleverbotResponse -{ - public string Cs { get; set; } - public string Output { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/IChatterBotSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/IChatterBotSession.cs deleted file mode 100644 index 0372c87..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/IChatterBotSession.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -using OneOf; -using OneOf.Types; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public interface IChatterBotSession -{ - Task>> Think(string input, string username); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs deleted file mode 100644 index df26315..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class Message -{ - [JsonPropertyName("content")] - public required string Content { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialCleverbotSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialCleverbotSession.cs deleted file mode 100644 index b20f1d0..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OfficialCleverbotSession.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable disable -using Newtonsoft.Json; -using OneOf; -using OneOf.Types; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OfficialCleverbotSession : IChatterBotSession -{ - private string QueryString - => $"https://www.cleverbot.com/getreply?key={_apiKey}" + "&wrapper=elliebot" + "&input={0}" + "&cs={1}"; - - private readonly string _apiKey; - private readonly IHttpClientFactory _httpFactory; - private string cs; - - public OfficialCleverbotSession(string apiKey, IHttpClientFactory factory) - { - _apiKey = apiKey; - _httpFactory = factory; - } - - public async Task>> Think(string input, string username) - { - using var http = _httpFactory.CreateClient(); - var dataString = await http.GetStringAsync(string.Format(QueryString, input, cs ?? "")); - try - { - var data = JsonConvert.DeserializeObject(dataString); - - cs = data?.Cs; - return new ThinkResult - { - Text = data?.Output, - TokensIn = 2, - TokensOut = 1 - }; - } - catch - { - Log.Warning("Unexpected response from CleverBot: {ResponseString}", dataString); - return new Error("Unexpected CleverBot response received"); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs deleted file mode 100644 index 20ee90d..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OpenAiApiMessage -{ - [JsonPropertyName("role")] - public required string Role { get; init; } - - [JsonPropertyName("content")] - public required string Content { get; init; } - - [JsonPropertyName("name")] - public required string Name { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs deleted file mode 100644 index 3ab7d68..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OpenAiApiRequest -{ - [JsonPropertyName("model")] - public required string Model { get; init; } - - [JsonPropertyName("messages")] - public required List Messages { get; init; } - - [JsonPropertyName("temperature")] - public required int Temperature { get; init; } - - [JsonPropertyName("max_tokens")] - public required int MaxTokens { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs deleted file mode 100644 index 1525dac..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OpenAiApiUsageData -{ - [JsonPropertyName("prompt_tokens")] - public int PromptTokens { get; set; } - - [JsonPropertyName("completion_tokens")] - public int CompletionTokens { get; set; } - - [JsonPropertyName("total_tokens")] - public int TotalTokens { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs deleted file mode 100644 index 1b7bdcf..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public class OpenAiCompletionResponse -{ - [JsonPropertyName("choices")] - public Choice[] Choices { get; set; } - - [JsonPropertyName("usage")] - public OpenAiApiUsageData Usage { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs deleted file mode 100644 index 42afd22..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApiSession.cs +++ /dev/null @@ -1,147 +0,0 @@ -#nullable disable -using Newtonsoft.Json; -using OneOf.Types; -using SharpToken; -using System.Net.Http.Json; -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public partial class OpenAiApiSession : IChatterBotSession -{ - private readonly string _baseUrl; - private readonly string _apiKey; - private readonly string _model; - private readonly int _maxHistory; - private readonly int _maxTokens; - private readonly int _minTokens; - private readonly string _ellieUsername; - private readonly GptEncoding _encoding; - private List messages = new(); - private readonly IHttpClientFactory _httpFactory; - - - public OpenAiApiSession( - string url, - string apiKey, - string model, - int chatHistory, - int maxTokens, - int minTokens, - string personality, - string ellieUsername, - IHttpClientFactory factory) - { - if (string.IsNullOrWhiteSpace(url) || !Uri.TryCreate(url, UriKind.Absolute, out _)) - { - throw new ArgumentException("Invalid OpenAi api url provided", nameof(url)); - } - - _baseUrl = url.TrimEnd('/'); - - _apiKey = apiKey; - _model = model; - _httpFactory = factory; - _maxHistory = chatHistory; - _maxTokens = maxTokens; - _minTokens = minTokens; - _ellieUsername = UsernameCleaner().Replace(ellieUsername, ""); - _encoding = GptEncoding.GetEncodingForModel("gpt-4o"); - if (!string.IsNullOrWhiteSpace(personality)) - { - messages.Add(new() - { - Role = "system", - Content = personality, - Name = _ellieUsername - }); - } - } - - - [GeneratedRegex("[^a-zA-Z0-9_-]")] - private static partial Regex UsernameCleaner(); - - public async Task>> Think(string input, string username) - { - username = UsernameCleaner().Replace(username, ""); - - messages.Add(new() - { - Role = "user", - Content = input, - Name = username - }); - - while (messages.Count > _maxHistory + 2) - { - messages.RemoveAt(1); - } - - var tokensUsed = messages.Sum(message => _encoding.Encode(message.Content).Count); - - tokensUsed *= 2; - - //check if we have the minimum number of tokens available to use. Remove messages until we have enough, otherwise exit out and inform the user why. - while (_maxTokens - tokensUsed <= _minTokens) - { - if (messages.Count > 2) - { - var tokens = _encoding.Encode(messages[1].Content).Count * 2; - tokensUsed -= tokens; - messages.RemoveAt(1); - } - else - { - return new Error( - "Token count exceeded, please increase the number of tokens in the bot config and restart."); - } - } - - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Authorization = new("Bearer", _apiKey); - - var data = await http.PostAsJsonAsync($"{_baseUrl}/v1/chat/completions", - new OpenAiApiRequest() - { - Model = _model, - Messages = messages, - MaxTokens = _maxTokens - tokensUsed, - Temperature = 1, - }); - - var dataString = await data.Content.ReadAsStringAsync(); - try - { - var response = JsonConvert.DeserializeObject(dataString); - - // Log.Information("Received response: {Response} ", dataString); - var res = response?.Choices?[0]; - var message = res?.Message?.Content; - - if (message is null) - { - return new Error("ChatGpt: Received no response."); - } - - messages.Add(new() - { - Role = "assistant", - Content = message, - Name = _ellieUsername - }); - - return new ThinkResult() - { - Text = message, - TokensIn = response.Usage.PromptTokens, - TokensOut = response.Usage.CompletionTokens - }; - } - catch - { - Log.Warning("Unexpected response received from OpenAI: {ResponseString}", dataString); - return new Error("Unexpected response received"); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs deleted file mode 100644 index d6aa75e..0000000 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Common.ChatterBot; - -public sealed class ThinkResult -{ - public string Text { get; set; } - public int TokensIn { get; set; } - public int TokensOut { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Games.cs b/src/EllieBot/Modules/Games/Games.cs deleted file mode 100644 index c14d6ee..0000000 --- a/src/EllieBot/Modules/Games/Games.cs +++ /dev/null @@ -1,47 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -/* more games -- Shiritori -- Simple RPG adventure -*/ -public partial class Games : EllieModule -{ - private readonly IImageCache _images; - private readonly IHttpClientFactory _httpFactory; - private readonly Random _rng = new(); - - public Games(IImageCache images, IHttpClientFactory factory) - { - _images = images; - _httpFactory = factory; - } - - [Cmd] - public async Task Choose([Leftover] string list = null) - { - if (string.IsNullOrWhiteSpace(list)) - return; - var listArr = list.Split(';'); - if (listArr.Length < 2) - return; - var rng = new EllieRandom(); - await Response().Confirm("🤔", listArr[rng.Next(0, listArr.Length)]).SendAsync(); - } - - [Cmd] - public async Task EightBall([Leftover] string question = null) - { - if (string.IsNullOrWhiteSpace(question)) - return; - - var res = _service.GetEightballResponse(ctx.User.Id, question); - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithDescription(ctx.User.ToString()) - .AddField("❓ " + GetText(strs.question), question) - .AddField("🎱 " + GetText(strs._8ball), res)).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GamesConfig.cs b/src/EllieBot/Modules/Games/GamesConfig.cs deleted file mode 100644 index 9308329..0000000 --- a/src/EllieBot/Modules/Games/GamesConfig.cs +++ /dev/null @@ -1,195 +0,0 @@ -#nullable disable -using Cloneable; -using EllieBot.Common.Yml; - -namespace EllieBot.Modules.Games.Common; - -[Cloneable] -public sealed partial class GamesConfig : ICloneable -{ - [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 5; - - [Comment("Hangman related settings (.hangman command)")] - public HangmanConfig Hangman { get; set; } = new() - { - CurrencyReward = 0 - }; - - [Comment("Trivia related settings (.t command)")] - public TriviaConfig Trivia { get; set; } = new() - { - CurrencyReward = 0, - MinimumWinReq = 1 - }; - - [Comment("List of responses for the .8ball command. A random one will be selected every time")] - public List EightBallResponses { get; set; } = - [ - "Most definitely yes.", - "For sure.", - "Totally!", - "Of course!", - "As I see it, yes.", - "My sources say yes.", - "Yes.", - "Most likely.", - "Perhaps...", - "Maybe...", - "Hm, not sure.", - "It is uncertain.", - "Ask me again later.", - "Don't count on it.", - "Probably not.", - "Very doubtful.", - "Most likely no.", - "Nope.", - "No.", - "My sources say no.", - "Don't even think about it.", - "Definitely no.", - "NO - It may cause disease contraction!" - ]; - - [Comment("List of animals which will be used for the animal race game (.race)")] - public List RaceAnimals { get; set; } = - [ - new() - { - Icon = "🐼", - Name = "Panda" - }, - - new() - { - Icon = "🐻", - Name = "Bear" - }, - - new() - { - Icon = "🐧", - Name = "Pengu" - }, - - new() - { - Icon = "🐨", - Name = "Koala" - }, - - new() - { - Icon = "🐬", - Name = "Dolphin" - }, - - new() - { - Icon = "🐞", - Name = "Ladybird" - }, - - new() - { - Icon = "🦀", - Name = "Crab" - }, - - new() - { - Icon = "🦄", - Name = "Unicorn" - } - ]; - - [Comment( - """ - Which chatbot API should bot use. - 'cleverbot' - bot will use Cleverbot API. - 'openai' - bot will use OpenAi API - """)] - public ChatBotImplementation ChatBot { get; set; } = ChatBotImplementation.OpenAi; - - public ChatGptConfig ChatGpt { get; set; } = new(); -} - -[Cloneable] -public sealed partial class ChatGptConfig -{ - [Comment(""" - Url to any openai api compatible url. - Make sure to modify the modelName appropriately - DO NOT add /v1/chat/completions suffix to the url - """)] - public string ApiUrl { get; set; } = "https://api.openai.com"; - - [Comment(""" - Which GPT Model should bot use. - gpt-3.5-turbo - cheapest - gpt-4o - more expensive, higher quality - - If you are using another openai compatible api, you may use any of the models supported by that api - """)] - public string ModelName { get; set; } = "gpt-3.5-turbo"; - - [Comment(""" - How should the chatbot behave, what's its personality? - This will be sent as a system message. - Usage of this counts towards the max tokens. - """)] - public string PersonalityPrompt { get; set; } = - "You are a chat bot willing to have a conversation with anyone about anything."; - - [Comment( - """ - The maximum number of messages in a conversation that can be remembered. - This will increase the number of tokens used. - """)] - public int ChatHistory { get; set; } = 5; - - [Comment(@"The maximum number of tokens to use per OpenAi API call")] - public int MaxTokens { get; set; } = 100; - - [Comment(@"The minimum number of tokens to use per GPT API call, such that chat history is removed to make room.")] - public int MinTokens { get; set; } = 30; -} - -[Cloneable] -public sealed partial class HangmanConfig -{ - [Comment("The amount of currency awarded to the winner of a hangman game")] - public long CurrencyReward { get; set; } -} - -[Cloneable] -public sealed partial class TriviaConfig -{ - [Comment("The amount of currency awarded to the winner of the trivia game.")] - public long CurrencyReward { get; set; } - - [Comment(""" - Users won't be able to start trivia games which have - a smaller win requirement than the one specified by this setting. - """)] - public int MinimumWinReq { get; set; } = 1; -} - -[Cloneable] -public sealed partial class RaceAnimal -{ - public string Icon { get; set; } - public string Name { get; set; } -} - -public enum ChatBotImplementation -{ - Cleverbot, - OpenAi = 1, - - [Obsolete] - Gpt = 1, - - [Obsolete] - Gpt3 = 1, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GamesConfigService.cs b/src/EllieBot/Modules/Games/GamesConfigService.cs deleted file mode 100644 index f6ff635..0000000 --- a/src/EllieBot/Modules/Games/GamesConfigService.cs +++ /dev/null @@ -1,120 +0,0 @@ -#nullable disable -using EllieBot.Common.Configs; -using EllieBot.Modules.Games.Common; - -namespace EllieBot.Modules.Games.Services; - -public sealed class GamesConfigService : ConfigServiceBase -{ - private const string FILE_PATH = "data/games.yml"; - private static readonly TypedKey _changeKey = new("config.games.updated"); - public override string Name { get; } = "games"; - - public GamesConfigService(IConfigSeria serializer, IPubSub pubSub) - : base(FILE_PATH, serializer, pubSub, _changeKey) - { - AddParsedProp("trivia.min_win_req", - gs => gs.Trivia.MinimumWinReq, - int.TryParse, - ConfigPrinters.ToString, - val => val > 0); - AddParsedProp("trivia.currency_reward", - gs => gs.Trivia.CurrencyReward, - long.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - AddParsedProp("hangman.currency_reward", - gs => gs.Hangman.CurrencyReward, - long.TryParse, - ConfigPrinters.ToString, - val => val >= 0); - AddParsedProp("chatbot", - gs => gs.ChatBot, - ConfigParsers.InsensitiveEnum, - ConfigPrinters.ToString); - - AddParsedProp("gpt.apiUrl", - gs => gs.ChatGpt.ApiUrl, - ConfigParsers.String, - ConfigPrinters.ToString); - - AddParsedProp("gpt.modelName", - gs => gs.ChatGpt.ModelName, - ConfigParsers.String, - ConfigPrinters.ToString); - - AddParsedProp("gpt.personality", - gs => gs.ChatGpt.PersonalityPrompt, - ConfigParsers.String, - ConfigPrinters.ToString); - - Migrate(); - } - - private void Migrate() - { - if (data.Version < 1) - { - ModifyConfig(c => - { - c.Version = 1; - c.Hangman = new() - { - CurrencyReward = 0 - }; - }); - } - - if (data.Version < 3) - { - ModifyConfig(c => - { - c.Version = 3; - c.ChatGpt.ModelName = "gpt35turbo"; - }); - } - - if (data.Version < 4) - { - ModifyConfig(c => - { - c.Version = 4; -#pragma warning disable CS0612 // Type or member is obsolete - c.ChatGpt.ModelName = - c.ChatGpt.ModelName.Equals("gpt4", StringComparison.OrdinalIgnoreCase) - || c.ChatGpt.ModelName.Equals("gpt432k", StringComparison.OrdinalIgnoreCase) - ? "gpt-4o" - : "gpt-3.5-turbo"; -#pragma warning restore CS0612 // Type or member is obsolete - }); - } - - if (data.Version < 5) - { - ModifyConfig(c => - { - c.Version = 5; - c.ChatBot = c.ChatBot == ChatBotImplementation.OpenAi - ? ChatBotImplementation.OpenAi - : c.ChatBot; - - if (c.ChatGpt.ModelName.Equals("gpt4o", StringComparison.OrdinalIgnoreCase)) - { - c.ChatGpt.ModelName = "gpt-4o"; - } - else if (c.ChatGpt.ModelName.Equals("gpt35turbo", StringComparison.OrdinalIgnoreCase)) - { - c.ChatGpt.ModelName = "gpt-3.5-turbo"; - } - else - { - Log.Warning( - "Unknown OpenAI api model name: {ModelName}. " - + "It will be reset to 'gpt-3.5-turbo' only this time", - c.ChatGpt.ModelName); - c.ChatGpt.ModelName = "gpt-3.5-turbo"; - } - }); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GamesService.cs b/src/EllieBot/Modules/Games/GamesService.cs deleted file mode 100644 index 1436285..0000000 --- a/src/EllieBot/Modules/Games/GamesService.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable disable -using Microsoft.Extensions.Caching.Memory; -using EllieBot.Modules.Games.Common; -using EllieBot.Modules.Games.Common.Acrophobia; -using EllieBot.Modules.Games.Common.Nunchi; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Games.Services; - -public class GamesService : IEService -{ - private const string TYPING_ARTICLES_PATH = "data/typing_articles3.json"; - - - public IReadOnlyList EightBallResponses - => _gamesConfig.Data.EightBallResponses; - - public List TypingArticles { get; } = new(); - - //channelId, game - public ConcurrentDictionary AcrophobiaGames { get; } = new(); - public Dictionary TicTacToeGames { get; } = new(); - public ConcurrentDictionary RunningContests { get; } = new(); - public ConcurrentDictionary NunchiGames { get; } = new(); - - private readonly GamesConfigService _gamesConfig; - - private readonly IHttpClientFactory _httpFactory; - private readonly IMemoryCache _8BallCache; - private readonly Random _rng; - - public GamesService(GamesConfigService gamesConfig, IHttpClientFactory httpFactory) - { - _gamesConfig = gamesConfig; - _httpFactory = httpFactory; - _8BallCache = new MemoryCache(new MemoryCacheOptions - { - SizeLimit = 500_000 - }); - - _rng = new EllieRandom(); - - try - { - TypingArticles = JsonConvert.DeserializeObject>(File.ReadAllText(TYPING_ARTICLES_PATH)); - } - catch (Exception ex) - { - Log.Warning(ex, "Error while loading typing articles: {ErrorMessage}", ex.Message); - TypingArticles = new(); - } - } - - public void AddTypingArticle(IUser user, string text) - { - TypingArticles.Add(new() - { - Source = user.ToString(), - Extra = $"Text added on {DateTime.UtcNow} by {user}.", - Text = text.SanitizeMentions(true) - }); - - File.WriteAllText(TYPING_ARTICLES_PATH, JsonConvert.SerializeObject(TypingArticles)); - } - - public string GetEightballResponse(ulong userId, string question) - => _8BallCache.GetOrCreate($"8ball:{userId}:{question}", - e => - { - e.Size = question.Length; - e.AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(12); - return EightBallResponses[_rng.Next(0, EightBallResponses.Count)]; - }); - - public TypingArticle RemoveTypingArticle(int index) - { - var articles = TypingArticles; - if (index < 0 || index >= articles.Count) - return null; - - var removed = articles[index]; - TypingArticles.RemoveAt(index); - - File.WriteAllText(TYPING_ARTICLES_PATH, JsonConvert.SerializeObject(articles)); - return removed; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/DefaultHangmanSource.cs b/src/EllieBot/Modules/Games/Hangman/DefaultHangmanSource.cs deleted file mode 100644 index 333e8f0..0000000 --- a/src/EllieBot/Modules/Games/Hangman/DefaultHangmanSource.cs +++ /dev/null @@ -1,64 +0,0 @@ -using EllieBot.Common.Yml; -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Games.Hangman; - -public sealed class DefaultHangmanSource : IHangmanSource -{ - private IReadOnlyDictionary termsDict = new Dictionary(); - private readonly Random _rng; - - public DefaultHangmanSource() - { - _rng = new EllieRandom(); - Reload(); - } - - public void Reload() - { - if (!Directory.Exists("data/hangman")) - { - Log.Error("Hangman game won't work. Folder 'data/hangman' is missing"); - return; - } - - var qs = new Dictionary(); - foreach (var file in Directory.EnumerateFiles("data/hangman/", "*.yml")) - { - try - { - var data = Yaml.Deserializer.Deserialize(File.ReadAllText(file)); - qs[Path.GetFileNameWithoutExtension(file).ToLowerInvariant()] = data; - } - catch (Exception ex) - { - Log.Error(ex, "Loading {HangmanFile} failed", file); - } - } - - termsDict = qs; - - Log.Information("Loaded {HangmanCategoryCount} hangman categories", qs.Count); - } - - public IReadOnlyCollection GetCategories() - => termsDict.Keys.ToList(); - - public bool GetTerm(string? category, [NotNullWhen(true)] out HangmanTerm? term) - { - if (category is null) - { - var cats = GetCategories(); - category = cats.ElementAt(_rng.Next(0, cats.Count)); - } - - if (termsDict.TryGetValue(category, out var terms)) - { - term = terms[_rng.Next(0, terms.Length)]; - return true; - } - - term = null; - return false; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/HangmanCommands.cs b/src/EllieBot/Modules/Games/Hangman/HangmanCommands.cs deleted file mode 100644 index acc0323..0000000 --- a/src/EllieBot/Modules/Games/Hangman/HangmanCommands.cs +++ /dev/null @@ -1,76 +0,0 @@ -using EllieBot.Modules.Games.Hangman; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class HangmanCommands : EllieModule - { - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Hangmanlist() - => await Response().Confirm(GetText(strs.hangman_types(prefix)), _service.GetHangmanTypes().Join('\n')).SendAsync(); - - private static string Draw(HangmanGame.State state) - => $""" - . ┌─────┐ - .┃...............┋ - .┃...............┋ - .┃{(state.Errors > 0 ? ".............😲" : "")} - .┃{(state.Errors > 1 ? "............./" : "")} {(state.Errors > 2 ? "|" : "")} {(state.Errors > 3 ? "\\" : "")} - .┃{(state.Errors > 4 ? "............../" : "")} {(state.Errors > 5 ? "\\" : "")} - /-\ - """; - - public static EmbedBuilder GetEmbed(IMessageSenderService sender, HangmanGame.State state) - { - if (state.Phase == HangmanGame.Phase.Running) - { - return sender.CreateEmbed() - .WithOkColor() - .AddField("Hangman", Draw(state)) - .AddField("Guess", Format.Code(state.Word)) - .WithFooter(state.MissedLetters.Join(' ')); - } - - if (state.Phase == HangmanGame.Phase.Ended && state.Failed) - { - return sender.CreateEmbed() - .WithErrorColor() - .AddField("Hangman", Draw(state)) - .AddField("Guess", Format.Code(state.Word)) - .WithFooter(state.MissedLetters.Join(' ')); - } - - return sender.CreateEmbed() - .WithOkColor() - .AddField("Hangman", Draw(state)) - .AddField("Guess", Format.Code(state.Word)) - .WithFooter(state.MissedLetters.Join(' ')); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Hangman([Leftover] string? type = null) - { - if (!_service.StartHangman(ctx.Channel.Id, type, out var hangman)) - { - await Response().Error(strs.hangman_running).SendAsync(); - return; - } - - var eb = GetEmbed(_sender, hangman); - eb.WithDescription(GetText(strs.hangman_game_started)); - await Response().Embed(eb).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task HangmanStop() - { - if (await _service.StopHangman(ctx.Channel.Id)) - await Response().Confirm(strs.hangman_stopped).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs b/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs deleted file mode 100644 index 1625b55..0000000 --- a/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs +++ /dev/null @@ -1,111 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Hangman; - -public sealed class HangmanGame -{ - public enum GuessResult { NoAction, AlreadyTried, Incorrect, Guess, Win } - - public enum Phase { Running, Ended } - - private Phase CurrentPhase { get; set; } - - private readonly HashSet _incorrect = new(); - private readonly HashSet _correct = new(); - private readonly HashSet _remaining = new(); - - private readonly string _word; - private readonly string _imageUrl; - - public HangmanGame(HangmanTerm term) - { - _word = term.Word; - _imageUrl = term.ImageUrl; - - _remaining = _word.ToLowerInvariant().Where(x => char.IsLetter(x)).Select(char.ToLowerInvariant).ToHashSet(); - } - - public State GetState(GuessResult guessResult = GuessResult.NoAction) - => new(_incorrect.Count, - CurrentPhase, - CurrentPhase == Phase.Ended ? _word : GetScrambledWord(), - guessResult, - _incorrect.ToList(), - CurrentPhase == Phase.Ended ? _imageUrl : string.Empty); - - private string GetScrambledWord() - { - Span output = stackalloc char[_word.Length * 2]; - for (var i = 0; i < _word.Length; i++) - { - var ch = _word[i]; - if (ch == ' ') - output[i * 2] = ' '; - if (!char.IsLetter(ch) || !_remaining.Contains(char.ToLowerInvariant(ch))) - output[i * 2] = ch; - else - output[i * 2] = '_'; - - output[(i * 2) + 1] = ' '; - } - - return new(output); - } - - public State Guess(string guess) - { - if (CurrentPhase != Phase.Running) - return GetState(); - - guess = guess.Trim(); - if (guess.Length > 1) - { - if (guess.Equals(_word, StringComparison.InvariantCultureIgnoreCase)) - { - CurrentPhase = Phase.Ended; - return GetState(GuessResult.Win); - } - - return GetState(); - } - - var charGuess = guess[0]; - if (!char.IsLetter(charGuess)) - return GetState(); - - if (_incorrect.Contains(charGuess) || _correct.Contains(charGuess)) - return GetState(GuessResult.AlreadyTried); - - if (_remaining.Remove(charGuess)) - { - if (_remaining.Count == 0) - { - CurrentPhase = Phase.Ended; - return GetState(GuessResult.Win); - } - - _correct.Add(charGuess); - return GetState(GuessResult.Guess); - } - - _incorrect.Add(charGuess); - if (_incorrect.Count > 5) - { - CurrentPhase = Phase.Ended; - return GetState(GuessResult.Incorrect); - } - - return GetState(GuessResult.Incorrect); - } - - public record State( - int Errors, - Phase Phase, - string Word, - GuessResult GuessResult, - List MissedLetters, - string ImageUrl) - { - public bool Failed - => Errors > 5; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/HangmanService.cs b/src/EllieBot/Modules/Games/Hangman/HangmanService.cs deleted file mode 100644 index 0b5c9c0..0000000 --- a/src/EllieBot/Modules/Games/Hangman/HangmanService.cs +++ /dev/null @@ -1,136 +0,0 @@ -using Microsoft.Extensions.Caching.Memory; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Games.Services; -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Games.Hangman; - -public sealed class HangmanService : IHangmanService, IExecNoCommand -{ - private readonly ConcurrentDictionary _hangmanGames = new(); - private readonly IHangmanSource _source; - private readonly IMessageSenderService _sender; - private readonly GamesConfigService _gcs; - private readonly ICurrencyService _cs; - private readonly IMemoryCache _cdCache; - private readonly object _locker = new(); - - public HangmanService( - IHangmanSource source, - IMessageSenderService sender, - GamesConfigService gcs, - ICurrencyService cs, - IMemoryCache cdCache) - { - _source = source; - _sender = sender; - _gcs = gcs; - _cs = cs; - _cdCache = cdCache; - } - - public bool StartHangman(ulong channelId, string? category, [NotNullWhen(true)] out HangmanGame.State? state) - { - state = null; - if (!_source.GetTerm(category, out var term)) - return false; - - - var game = new HangmanGame(term); - lock (_locker) - { - var hc = _hangmanGames.GetOrAdd(channelId, game); - if (hc == game) - { - state = hc.GetState(); - return true; - } - - return false; - } - } - - public ValueTask StopHangman(ulong channelId) - { - lock (_locker) - { - if (_hangmanGames.TryRemove(channelId, out _)) - return new(true); - } - - return new(false); - } - - public IReadOnlyCollection GetHangmanTypes() - => _source.GetCategories(); - - public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - { - if (_hangmanGames.ContainsKey(msg.Channel.Id)) - { - if (string.IsNullOrWhiteSpace(msg.Content)) - return; - - if (_cdCache.TryGetValue(msg.Author.Id, out _)) - return; - - HangmanGame.State state; - long rew = 0; - lock (_locker) - { - if (!_hangmanGames.TryGetValue(msg.Channel.Id, out var game)) - return; - - state = game.Guess(msg.Content.ToLowerInvariant()); - - if (state.GuessResult == HangmanGame.GuessResult.NoAction) - return; - - if (state.GuessResult is HangmanGame.GuessResult.Incorrect or HangmanGame.GuessResult.AlreadyTried) - { - _cdCache.Set(msg.Author.Id, - string.Empty, - new MemoryCacheEntryOptions - { - AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(3) - }); - } - - if (state.Phase == HangmanGame.Phase.Ended) - { - if (_hangmanGames.TryRemove(msg.Channel.Id, out _)) - rew = _gcs.Data.Hangman.CurrencyReward; - } - } - - if (rew > 0) - await _cs.AddAsync(msg.Author, rew, new("hangman", "win")); - - await SendState((ITextChannel)msg.Channel, msg.Author, msg.Content, state); - } - } - - private Task SendState( - ITextChannel channel, - IUser user, - string content, - HangmanGame.State state) - { - var embed = Games.HangmanCommands.GetEmbed(_sender, state); - if (state.GuessResult == HangmanGame.GuessResult.Guess) - embed.WithDescription($"{user} guessed the letter {content}!").WithOkColor(); - else if (state.GuessResult == HangmanGame.GuessResult.Incorrect && state.Failed) - embed.WithDescription($"{user} Letter {content} doesn't exist! Game over!").WithErrorColor(); - else if (state.GuessResult == HangmanGame.GuessResult.Incorrect) - embed.WithDescription($"{user} Letter {content} doesn't exist!").WithErrorColor(); - else if (state.GuessResult == HangmanGame.GuessResult.AlreadyTried) - embed.WithDescription($"{user} Letter {content} has already been used.").WithPendingColor(); - else if (state.GuessResult == HangmanGame.GuessResult.Win) - embed.WithDescription($"{user} won!").WithOkColor(); - - if (!string.IsNullOrWhiteSpace(state.ImageUrl) && Uri.IsWellFormedUriString(state.ImageUrl, UriKind.Absolute)) - embed.WithImageUrl(state.ImageUrl); - - return _sender.Response(channel).Embed(embed).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/HangmanTerm.cs b/src/EllieBot/Modules/Games/Hangman/HangmanTerm.cs deleted file mode 100644 index 22e5144..0000000 --- a/src/EllieBot/Modules/Games/Hangman/HangmanTerm.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Hangman; - -public sealed class HangmanTerm -{ - public string Word { get; set; } - public string ImageUrl { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/IHangmanService.cs b/src/EllieBot/Modules/Games/Hangman/IHangmanService.cs deleted file mode 100644 index da8d027..0000000 --- a/src/EllieBot/Modules/Games/Hangman/IHangmanService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Games.Hangman; - -public interface IHangmanService -{ - bool StartHangman(ulong channelId, string? category, [NotNullWhen(true)] out HangmanGame.State? hangmanController); - ValueTask StopHangman(ulong channelId); - IReadOnlyCollection GetHangmanTypes(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/IHangmanSource.cs b/src/EllieBot/Modules/Games/Hangman/IHangmanSource.cs deleted file mode 100644 index d28199b..0000000 --- a/src/EllieBot/Modules/Games/Hangman/IHangmanSource.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Games.Hangman; - -public interface IHangmanSource : IEService -{ - public IReadOnlyCollection GetCategories(); - public void Reload(); - public bool GetTerm(string? category, [NotNullWhen(true)] out HangmanTerm? term); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Nunchi/Nunchi.cs b/src/EllieBot/Modules/Games/Nunchi/Nunchi.cs deleted file mode 100644 index 6fa579c..0000000 --- a/src/EllieBot/Modules/Games/Nunchi/Nunchi.cs +++ /dev/null @@ -1,183 +0,0 @@ -#nullable disable -using System.Collections.Immutable; - -namespace EllieBot.Modules.Games.Common.Nunchi; - -public sealed class NunchiGame : IDisposable -{ - public enum Phase - { - Joining, - Playing, - WaitingForNextRound, - Ended - } - - private const int KILL_TIMEOUT = 20 * 1000; - private const int NEXT_ROUND_TIMEOUT = 5 * 1000; - - public event Func OnGameStarted; - public event Func OnRoundStarted; - public event Func OnUserGuessed; - public event Func OnRoundEnded; // tuple of the user who failed - public event Func OnGameEnded; // name of the user who won - - public int CurrentNumber { get; private set; } = new EllieRandom().Next(0, 100); - public Phase CurrentPhase { get; private set; } = Phase.Joining; - - public ImmutableArray<(ulong Id, string Name)> Participants - => participants.ToImmutableArray(); - - public int ParticipantCount - => participants.Count; - - private readonly SemaphoreSlim _locker = new(1, 1); - - private HashSet<(ulong Id, string Name)> participants = []; - private readonly HashSet<(ulong Id, string Name)> _passed = []; - private Timer killTimer; - - public NunchiGame(ulong creatorId, string creatorName) - => participants.Add((creatorId, creatorName)); - - public async Task Join(ulong userId, string userName) - { - await _locker.WaitAsync(); - try - { - if (CurrentPhase != Phase.Joining) - return false; - - return participants.Add((userId, userName)); - } - finally { _locker.Release(); } - } - - public async Task Initialize() - { - CurrentPhase = Phase.Joining; - await Task.Delay(30000); - await _locker.WaitAsync(); - try - { - if (participants.Count < 3) - { - CurrentPhase = Phase.Ended; - return false; - } - - killTimer = new(async _ => - { - await _locker.WaitAsync(); - try - { - if (CurrentPhase != Phase.Playing) - return; - - //if some players took too long to type a number, boot them all out and start a new round - participants = new HashSet<(ulong, string)>(_passed); - EndRound(); - } - finally { _locker.Release(); } - }, - null, - KILL_TIMEOUT, - KILL_TIMEOUT); - - CurrentPhase = Phase.Playing; - _ = OnGameStarted?.Invoke(this); - _ = OnRoundStarted?.Invoke(this, CurrentNumber); - return true; - } - finally { _locker.Release(); } - } - - public async Task Input(ulong userId, string userName, int input) - { - await _locker.WaitAsync(); - try - { - if (CurrentPhase != Phase.Playing) - return; - - var userTuple = (Id: userId, Name: userName); - - // if the user is not a member of the race, - // or he already successfully typed the number - // ignore the input - if (!participants.Contains(userTuple) || !_passed.Add(userTuple)) - return; - - //if the number is correct - if (CurrentNumber == input - 1) - { - //increment current number - ++CurrentNumber; - if (_passed.Count == participants.Count - 1) - { - // if only n players are left, and n - 1 type the correct number, round is over - - // if only 2 players are left, game is over - if (participants.Count == 2) - { - killTimer.Change(Timeout.Infinite, Timeout.Infinite); - CurrentPhase = Phase.Ended; - _ = OnGameEnded?.Invoke(this, userTuple.Name); - } - else // else just start the new round without the user who was the last - { - var failure = participants.Except(_passed).First(); - - OnUserGuessed?.Invoke(this); - EndRound(failure); - return; - } - } - - OnUserGuessed?.Invoke(this); - } - else - { - //if the user failed - - EndRound(userTuple); - } - } - finally { _locker.Release(); } - } - - private void EndRound((ulong, string)? failure = null) - { - killTimer.Change(KILL_TIMEOUT, KILL_TIMEOUT); - CurrentNumber = new EllieRandom().Next(0, 100); // reset the counter - _passed.Clear(); // reset all users who passed (new round starts) - if (failure is not null) - participants.Remove(failure.Value); // remove the dude who failed from the list of players - - _ = OnRoundEnded?.Invoke(this, failure); - if (participants.Count <= 1) // means we have a winner or everyone was booted out - { - killTimer.Change(Timeout.Infinite, Timeout.Infinite); - CurrentPhase = Phase.Ended; - _ = OnGameEnded?.Invoke(this, participants.Count > 0 ? participants.First().Name : null); - return; - } - - CurrentPhase = Phase.WaitingForNextRound; - Task.Run(async () => - { - await Task.Delay(NEXT_ROUND_TIMEOUT); - CurrentPhase = Phase.Playing; - _ = OnRoundStarted?.Invoke(this, CurrentNumber); - }); - } - - public void Dispose() - { - OnGameEnded = null; - OnGameStarted = null; - OnRoundEnded = null; - OnRoundStarted = null; - OnUserGuessed = null; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs b/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs deleted file mode 100644 index 80e6c42..0000000 --- a/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs +++ /dev/null @@ -1,114 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Common.Nunchi; -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class NunchiCommands : EllieModule - { - private readonly DiscordSocketClient _client; - - public NunchiCommands(DiscordSocketClient client) - => _client = client; - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Nunchi() - { - var newNunchi = new NunchiGame(ctx.User.Id, ctx.User.ToString()); - NunchiGame nunchi; - - //if a game was already active - if ((nunchi = _service.NunchiGames.GetOrAdd(ctx.Guild.Id, newNunchi)) != newNunchi) - { - // join it - // if you failed joining, that means game is running or just ended - if (!await nunchi.Join(ctx.User.Id, ctx.User.ToString())) - return; - - await Response().Error(strs.nunchi_joined(nunchi.ParticipantCount)).SendAsync(); - return; - } - - - try { await Response().Confirm(strs.nunchi_created).SendAsync(); } - catch { } - - nunchi.OnGameEnded += NunchiOnGameEnded; - //nunchi.OnGameStarted += Nunchi_OnGameStarted; - nunchi.OnRoundEnded += Nunchi_OnRoundEnded; - nunchi.OnUserGuessed += Nunchi_OnUserGuessed; - nunchi.OnRoundStarted += Nunchi_OnRoundStarted; - _client.MessageReceived += ClientMessageReceived; - - var success = await nunchi.Initialize(); - if (!success) - { - if (_service.NunchiGames.TryRemove(ctx.Guild.Id, out var game)) - game.Dispose(); - await Response().Confirm(strs.nunchi_failed_to_start).SendAsync(); - } - - Task ClientMessageReceived(SocketMessage arg) - { - _ = Task.Run(async () => - { - if (arg.Channel.Id != ctx.Channel.Id) - return; - - if (!int.TryParse(arg.Content, out var number)) - return; - try - { - await nunchi.Input(arg.Author.Id, arg.Author.ToString(), number); - } - catch - { - } - }); - return Task.CompletedTask; - } - - Task NunchiOnGameEnded(NunchiGame arg1, string arg2) - { - if (_service.NunchiGames.TryRemove(ctx.Guild.Id, out var game)) - { - _client.MessageReceived -= ClientMessageReceived; - game.Dispose(); - } - - if (arg2 is null) - return Response().Confirm(strs.nunchi_ended_no_winner).SendAsync(); - return Response().Confirm(strs.nunchi_ended(Format.Bold(arg2))).SendAsync(); - } - } - - private Task Nunchi_OnRoundStarted(NunchiGame arg, int cur) - => Response() - .Confirm(strs.nunchi_round_started(Format.Bold(arg.ParticipantCount.ToString()), - Format.Bold(cur.ToString()))) - .SendAsync(); - - private Task Nunchi_OnUserGuessed(NunchiGame arg) - => Response().Confirm(strs.nunchi_next_number(Format.Bold(arg.CurrentNumber.ToString()))).SendAsync(); - - private Task Nunchi_OnRoundEnded(NunchiGame arg1, (ulong Id, string Name)? arg2) - { - if (arg2.HasValue) - return Response().Confirm(strs.nunchi_round_ended(Format.Bold(arg2.Value.Name))).SendAsync(); - return Response() - .Confirm(strs.nunchi_round_ended_boot( - Format.Bold("\n" - + string.Join("\n, ", - arg1.Participants.Select(x - => x.Name))))) - .SendAsync(); // this won't work if there are too many users - } - - private Task Nunchi_OnGameStarted(NunchiGame arg) - => Response().Confirm(strs.nunchi_started(Format.Bold(arg.ParticipantCount.ToString()))).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs b/src/EllieBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs deleted file mode 100644 index 65b8bbd..0000000 --- a/src/EllieBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs +++ /dev/null @@ -1,105 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Common; -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class SpeedTypingCommands : EllieModule - { - private readonly GamesService _games; - private readonly DiscordSocketClient _client; - - public SpeedTypingCommands(DiscordSocketClient client, GamesService games) - { - _games = games; - _client = client; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public async Task TypeStart(params string[] args) - { - var (options, _) = OptionsParser.ParseFrom(new TypingGame.Options(), args); - var channel = (ITextChannel)ctx.Channel; - - var game = _service.RunningContests.GetOrAdd(ctx.Guild.Id, - _ => new(_games, _client, channel, prefix, options, _sender)); - - if (game.IsActive) - await Response().Error($"Contest already running in {game.Channel.Mention} channel.").SendAsync(); - else - await game.Start(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task TypeStop() - { - if (_service.RunningContests.TryRemove(ctx.Guild.Id, out var game)) - { - await game.Stop(); - return; - } - - await Response().Error("No contest to stop on this channel.").SendAsync(); - } - - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task Typeadd([Leftover] string text) - { - if (string.IsNullOrWhiteSpace(text)) - return; - - _games.AddTypingArticle(ctx.User, text); - - await Response().Confirm("Added new article for typing game.").SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Typelist(int page = 1) - { - if (page < 1) - return; - - var articles = _games.TypingArticles.Skip((page - 1) * 15).Take(15).ToArray(); - - if (!articles.Any()) - { - await Response().Error($"{ctx.User.Mention} `No articles found on that page.`").SendAsync(); - return; - } - - var i = (page - 1) * 15; - await Response() - .Confirm("List of articles for Type Race", - string.Join("\n", articles.Select(a => $"`#{++i}` - {a.Text.TrimTo(50)}"))) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task Typedel(int index) - { - var removed = _service.RemoveTypingArticle(--index); - - if (removed is null) - return; - - var embed = _sender.CreateEmbed() - .WithTitle($"Removed typing article #{index + 1}") - .WithDescription(removed.Text.TrimTo(50)) - .WithOkColor(); - - await Response().Embed(embed).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/SpeedTyping/TypingArticle.cs b/src/EllieBot/Modules/Games/SpeedTyping/TypingArticle.cs deleted file mode 100644 index cb55893..0000000 --- a/src/EllieBot/Modules/Games/SpeedTyping/TypingArticle.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Games.Common; - -public class TypingArticle -{ - public string Source { get; set; } - public string Extra { get; set; } - public string Text { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/SpeedTyping/TypingGame.cs b/src/EllieBot/Modules/Games/SpeedTyping/TypingGame.cs deleted file mode 100644 index d712525..0000000 --- a/src/EllieBot/Modules/Games/SpeedTyping/TypingGame.cs +++ /dev/null @@ -1,197 +0,0 @@ -#nullable disable -using CommandLine; -using EllieBot.Modules.Games.Services; -using System.Diagnostics; - -namespace EllieBot.Modules.Games.Common; - -public class TypingGame -{ - public const float WORD_VALUE = 4.5f; - public ITextChannel Channel { get; } - public string CurrentSentence { get; private set; } - public bool IsActive { get; private set; } - private readonly Stopwatch _sw; - private readonly List _finishedUserIds; - private readonly DiscordSocketClient _client; - private readonly GamesService _games; - private readonly string _prefix; - private readonly Options _options; - private readonly IMessageSenderService _sender; - - public TypingGame( - GamesService games, - DiscordSocketClient client, - ITextChannel channel, - string prefix, - Options options, - IMessageSenderService sender) - { - _games = games; - _client = client; - _prefix = prefix; - _options = options; - _sender = sender; - - Channel = channel; - IsActive = false; - _sw = new(); - _finishedUserIds = new(); - } - - public async Task Stop() - { - if (!IsActive) - return false; - _client.MessageReceived -= AnswerReceived; - _finishedUserIds.Clear(); - IsActive = false; - _sw.Stop(); - _sw.Reset(); - try - { - await _sender.Response(Channel) - .Confirm("Typing contest stopped.") - .SendAsync(); - } - catch - { - } - - return true; - } - - public async Task Start() - { - if (IsActive) - return; // can't start running game - IsActive = true; - CurrentSentence = GetRandomSentence(); - var i = (int)(CurrentSentence.Length / WORD_VALUE * 1.7f); - try - { - await _sender.Response(Channel) - .Confirm( - $":clock2: Next contest will last for {i} seconds. Type the bolded text as fast as you can.") - .SendAsync(); - - - var time = _options.StartTime; - - var msg = await _sender.Response(Channel).Confirm($"Starting new typing contest in **{time}**...").SendAsync(); - - do - { - await Task.Delay(2000); - time -= 2; - try { await msg.ModifyAsync(m => m.Content = $"Starting new typing contest in **{time}**.."); } - catch { } - } while (time > 2); - - await msg.ModifyAsync(m => - { - m.Content = CurrentSentence.Replace(" ", " \x200B", StringComparison.InvariantCulture); - }); - _sw.Start(); - HandleAnswers(); - - while (i > 0) - { - await Task.Delay(1000); - i--; - if (!IsActive) - return; - } - } - catch { } - finally - { - await Stop(); - } - } - - public string GetRandomSentence() - { - if (_games.TypingArticles.Any()) - return _games.TypingArticles[new EllieRandom().Next(0, _games.TypingArticles.Count)].Text; - return $"No typing articles found. Use {_prefix}typeadd command to add a new article for typing."; - } - - private void HandleAnswers() - => _client.MessageReceived += AnswerReceived; - - private Task AnswerReceived(SocketMessage imsg) - { - _ = Task.Run(async () => - { - try - { - if (imsg.Author.IsBot) - return; - if (imsg is not SocketUserMessage msg) - return; - - if (Channel is null || Channel.Id != msg.Channel.Id) - return; - - var guess = msg.Content; - - var distance = CurrentSentence.LevenshteinDistance(guess); - var decision = Judge(distance, guess.Length); - if (decision && !_finishedUserIds.Contains(msg.Author.Id)) - { - var elapsed = _sw.Elapsed; - var wpm = CurrentSentence.Length / WORD_VALUE / elapsed.TotalSeconds * 60; - _finishedUserIds.Add(msg.Author.Id); - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{msg.Author} finished the race!") - .AddField("Place", $"#{_finishedUserIds.Count}", true) - .AddField("WPM", $"{wpm:F1} *[{elapsed.TotalSeconds:F2}sec]*", true) - .AddField("Errors", distance.ToString(), true); - - await _sender.Response(Channel) - .Embed(embed) - .SendAsync(); - - if (_finishedUserIds.Count % 4 == 0) - { - await _sender.Response(Channel) - .Confirm( - $""" - :exclamation: A lot of people finished, here is the text for those still typing: - - **{Format.Sanitize(CurrentSentence.Replace(" ", " \x200B", StringComparison.InvariantCulture)).SanitizeMentions(true)}** - """) - .SendAsync(); - } - } - } - catch (Exception ex) - { - Log.Warning(ex, "Error receiving typing game answer: {ErrorMessage}", ex.Message); - } - }); - return Task.CompletedTask; - } - - private static bool Judge(int errors, int textLength) - => errors <= textLength / 25; - - public class Options : IEllieCommandOptions - { - [Option('s', - "start-time", - Default = 5, - Required = false, - HelpText = "How long does it take for the race to start. Default 5.")] - public int StartTime { get; set; } = 5; - - public void NormalizeOptions() - { - if (StartTime is < 3 or > 30) - StartTime = 5; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/TicTacToe/TicTacToe.cs b/src/EllieBot/Modules/Games/TicTacToe/TicTacToe.cs deleted file mode 100644 index fa8070d..0000000 --- a/src/EllieBot/Modules/Games/TicTacToe/TicTacToe.cs +++ /dev/null @@ -1,307 +0,0 @@ -#nullable disable -using CommandLine; -using System.Text; - -namespace EllieBot.Modules.Games.Common; - -public class TicTacToe -{ - public event Action OnEnded; - private readonly ITextChannel _channel; - private readonly IGuildUser[] _users; - private readonly int?[,] _state; - private Phase phase; - private int curUserIndex; - private readonly SemaphoreSlim _moveLock; - - private IGuildUser winner; - - private readonly string[] _numbers = - [ - ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" - ]; - - private IUserMessage previousMessage; - private Timer timeoutTimer; - private readonly IBotStrings _strings; - private readonly DiscordSocketClient _client; - private readonly Options _options; - private readonly IMessageSenderService _sender; - - public TicTacToe( - IBotStrings strings, - DiscordSocketClient client, - ITextChannel channel, - IGuildUser firstUser, - Options options, - IMessageSenderService sender) - { - _channel = channel; - _strings = strings; - _client = client; - _options = options; - _sender = sender; - - _users = [firstUser, null]; - _state = new int?[,] { { null, null, null }, { null, null, null }, { null, null, null } }; - - phase = Phase.Starting; - _moveLock = new(1, 1); - } - - private string GetText(LocStr key) - => _strings.GetText(key, _channel.GuildId); - - public string GetState() - { - var sb = new StringBuilder(); - for (var i = 0; i < _state.GetLength(0); i++) - { - for (var j = 0; j < _state.GetLength(1); j++) - { - sb.Append(_state[i, j] is null ? _numbers[(i * 3) + j] : GetIcon(_state[i, j])); - if (j < _state.GetLength(1) - 1) - sb.Append("┃"); - } - - if (i < _state.GetLength(0) - 1) - sb.AppendLine("\n──────────"); - } - - return sb.ToString(); - } - - public EmbedBuilder GetEmbed(string title = null) - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(Environment.NewLine + GetState()) - .WithAuthor(GetText(strs.vs(_users[0], _users[1]))); - - if (!string.IsNullOrWhiteSpace(title)) - embed.WithTitle(title); - - if (winner is null) - { - if (phase == Phase.Ended) - embed.WithFooter(GetText(strs.ttt_no_moves)); - else - embed.WithFooter(GetText(strs.ttt_users_move(_users[curUserIndex]))); - } - else - embed.WithFooter(GetText(strs.ttt_has_won(winner))); - - return embed; - } - - private static string GetIcon(int? val) - { - switch (val) - { - case 0: - return "❌"; - case 1: - return "⭕"; - case 2: - return "❎"; - case 3: - return "🅾"; - default: - return "⬛"; - } - } - - public async Task Start(IGuildUser user) - { - if (phase is Phase.Started or Phase.Ended) - { - await _sender.Response(_channel).Error(user.Mention + GetText(strs.ttt_already_running)).SendAsync(); - return; - } - - if (_users[0] == user) - { - await _sender.Response(_channel).Error(user.Mention + GetText(strs.ttt_against_yourself)).SendAsync(); - return; - } - - _users[1] = user; - - phase = Phase.Started; - - timeoutTimer = new(async _ => - { - await _moveLock.WaitAsync(); - try - { - if (phase == Phase.Ended) - return; - - phase = Phase.Ended; - if (_users[1] is not null) - { - winner = _users[curUserIndex ^= 1]; - var del = previousMessage?.DeleteAsync(); - try - { - await _sender.Response(_channel).Embed(GetEmbed(GetText(strs.ttt_time_expired))).SendAsync(); - if (del is not null) - await del; - } - catch { } - } - - OnEnded?.Invoke(this); - } - catch { } - finally - { - _moveLock.Release(); - } - }, - null, - _options.TurnTimer * 1000, - Timeout.Infinite); - - _client.MessageReceived += Client_MessageReceived; - - - previousMessage = await _sender.Response(_channel).Embed(GetEmbed(GetText(strs.game_started))).SendAsync(); - } - - private bool IsDraw() - { - for (var i = 0; i < 3; i++) - for (var j = 0; j < 3; j++) - { - if (_state[i, j] is null) - return false; - } - - return true; - } - - private Task Client_MessageReceived(SocketMessage msg) - { - _ = Task.Run(async () => - { - await _moveLock.WaitAsync(); - try - { - var curUser = _users[curUserIndex]; - if (phase == Phase.Ended || msg.Author?.Id != curUser.Id) - return; - - if (int.TryParse(msg.Content, out var index) - && --index >= 0 - && index <= 9 - && _state[index / 3, index % 3] is null) - { - _state[index / 3, index % 3] = curUserIndex; - - // i'm lazy - if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) - { - _state[index / 3, 0] = curUserIndex + 2; - _state[index / 3, 1] = curUserIndex + 2; - _state[index / 3, 2] = curUserIndex + 2; - - phase = Phase.Ended; - } - else if (_state[0, index % 3] == _state[1, index % 3] - && _state[1, index % 3] == _state[2, index % 3]) - { - _state[0, index % 3] = curUserIndex + 2; - _state[1, index % 3] = curUserIndex + 2; - _state[2, index % 3] = curUserIndex + 2; - - phase = Phase.Ended; - } - else if (curUserIndex == _state[0, 0] - && _state[0, 0] == _state[1, 1] - && _state[1, 1] == _state[2, 2]) - { - _state[0, 0] = curUserIndex + 2; - _state[1, 1] = curUserIndex + 2; - _state[2, 2] = curUserIndex + 2; - - phase = Phase.Ended; - } - else if (curUserIndex == _state[0, 2] - && _state[0, 2] == _state[1, 1] - && _state[1, 1] == _state[2, 0]) - { - _state[0, 2] = curUserIndex + 2; - _state[1, 1] = curUserIndex + 2; - _state[2, 0] = curUserIndex + 2; - - phase = Phase.Ended; - } - - var reason = string.Empty; - - if (phase == Phase.Ended) // if user won, stop receiving moves - { - reason = GetText(strs.ttt_matched_three); - winner = _users[curUserIndex]; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - else if (IsDraw()) - { - reason = GetText(strs.ttt_a_draw); - phase = Phase.Ended; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - - _ = Task.Run(async () => - { - var del1 = msg.DeleteAsync(); - var del2 = previousMessage?.DeleteAsync(); - try { previousMessage = await _sender.Response(_channel).Embed(GetEmbed(reason)).SendAsync(); } - catch { } - - try { await del1; } - catch { } - - try - { - if (del2 is not null) - await del2; - } - catch { } - }); - curUserIndex ^= 1; - - timeoutTimer.Change(_options.TurnTimer * 1000, Timeout.Infinite); - } - } - finally - { - _moveLock.Release(); - } - }); - - return Task.CompletedTask; - } - - public class Options : IEllieCommandOptions - { - [Option('t', "turn-timer", Required = false, Default = 15, HelpText = "Turn time in seconds. Default 15.")] - public int TurnTimer { get; set; } = 15; - - public void NormalizeOptions() - { - if (TurnTimer is < 5 or > 60) - TurnTimer = 15; - } - } - - private enum Phase - { - Starting, - Started, - Ended - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/TicTacToe/TicTacToeCommands.cs b/src/EllieBot/Modules/Games/TicTacToe/TicTacToeCommands.cs deleted file mode 100644 index 904f8db..0000000 --- a/src/EllieBot/Modules/Games/TicTacToe/TicTacToeCommands.cs +++ /dev/null @@ -1,54 +0,0 @@ -#nullable disable -using EllieBot.Modules.Games.Common; -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class TicTacToeCommands : EllieModule - { - private readonly SemaphoreSlim _sem = new(1, 1); - private readonly DiscordSocketClient _client; - - public TicTacToeCommands(DiscordSocketClient client) - => _client = client; - - [Cmd] - [RequireContext(ContextType.Guild)] - [EllieOptions] - public async Task TicTacToe(params string[] args) - { - var (options, _) = OptionsParser.ParseFrom(new TicTacToe.Options(), args); - var channel = (ITextChannel)ctx.Channel; - - await _sem.WaitAsync(1000); - try - { - if (_service.TicTacToeGames.TryGetValue(channel.Id, out var game)) - { - _ = Task.Run(async () => - { - await game.Start((IGuildUser)ctx.User); - }); - return; - } - - game = new(Strings, _client, channel, (IGuildUser)ctx.User, options, _sender); - _service.TicTacToeGames.Add(channel.Id, game); - await Response().Confirm(strs.ttt_created(ctx.User)).SendAsync(); - - game.OnEnded += _ => - { - _service.TicTacToeGames.Remove(channel.Id); - _sem.Dispose(); - }; - } - finally - { - _sem.Release(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs b/src/EllieBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs deleted file mode 100644 index b82dd62..0000000 --- a/src/EllieBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace EllieBot.Modules.Games.Common.Trivia; - -public sealed class DefaultQuestionPool : IQuestionPool -{ - private readonly ILocalDataCache _cache; - private readonly EllieRandom _rng; - - public DefaultQuestionPool(ILocalDataCache cache) - { - _cache = cache; - _rng = new EllieRandom(); - } - public async Task GetQuestionAsync() - { - var pool = await _cache.GetTriviaQuestionsAsync(); - - if(pool is null or {Length: 0}) - return default; - - return new(pool[_rng.Next(0, pool.Length)]); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs b/src/EllieBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs deleted file mode 100644 index 636ae16..0000000 --- a/src/EllieBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Games.Common.Trivia; - -public interface IQuestionPool -{ - Task GetQuestionAsync(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs b/src/EllieBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs deleted file mode 100644 index 53f56cf..0000000 --- a/src/EllieBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace EllieBot.Modules.Games.Common.Trivia; - -public sealed class PokemonQuestionPool : IQuestionPool -{ - public int QuestionsCount => 905; // xd - private readonly EllieRandom _rng; - private readonly ILocalDataCache _cache; - - public PokemonQuestionPool(ILocalDataCache cache) - { - _cache = cache; - _rng = new EllieRandom(); - } - - public async Task GetQuestionAsync() - { - var pokes = await _cache.GetPokemonMapAsync(); - - if (pokes is null or { Count: 0 }) - return default; - - var num = _rng.Next(1, QuestionsCount + 1); - return new(new() - { - Question = "Who's That Pokémon?", - Answer = pokes[num].ToTitleCase(), - Category = "Pokemon", - ImageUrl = $@"https://nadeko.bot/images/pokemon/shadows/{num}.png", - AnswerImageUrl = $@"https://nadeko.bot/images/pokemon/real/{num}.png" - }); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs b/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs deleted file mode 100644 index 72b4eb4..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs +++ /dev/null @@ -1,282 +0,0 @@ -using System.Net; -using System.Text; -using EllieBot.Modules.Games.Common.Trivia; -using EllieBot.Modules.Games.Services; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - [Group] - public partial class TriviaCommands : EllieModule - { - private readonly ILocalDataCache _cache; - private readonly ICurrencyService _cs; - private readonly GamesConfigService _gamesConfig; - private readonly DiscordSocketClient _client; - - public TriviaCommands( - DiscordSocketClient client, - ILocalDataCache cache, - ICurrencyService cs, - GamesConfigService gamesConfig) - { - _cache = cache; - _cs = cs; - _gamesConfig = gamesConfig; - _client = client; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - [EllieOptions] - public async Task Trivia(params string[] args) - { - var (opts, _) = OptionsParser.ParseFrom(new TriviaOptions(), args); - - var config = _gamesConfig.Data; - if (opts.WinRequirement != 0 - && config.Trivia.MinimumWinReq > 0 - && config.Trivia.MinimumWinReq > opts.WinRequirement) - return; - - var trivia = new TriviaGame(opts, _cache); - if (_service.RunningTrivias.TryAdd(ctx.Guild.Id, trivia)) - { - RegisterEvents(trivia); - await trivia.RunAsync(); - return; - } - - if (_service.RunningTrivias.TryGetValue(ctx.Guild.Id, out var tg)) - { - await Response().Error(strs.trivia_already_running).SendAsync(); - await tg.TriggerQuestionAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Tl() - { - if (_service.RunningTrivias.TryGetValue(ctx.Guild.Id, out var trivia)) - { - await trivia.TriggerStatsAsync(); - return; - } - - await Response().Error(strs.trivia_none).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Tq() - { - var channel = (ITextChannel)ctx.Channel; - - if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out var trivia)) - { - if (trivia.Stop()) - { - try - { - await Response() - .Confirm(GetText(strs.trivia_game), GetText(strs.trivia_stopping)) - .SendAsync(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error sending trivia stopping message"); - } - } - - return; - } - - await Response().Error(strs.trivia_none).SendAsync(); - } - - private string GetLeaderboardString(TriviaGame tg) - { - var sb = new StringBuilder(); - - foreach (var (id, pts) in tg.GetLeaderboard()) - sb.AppendLine(GetText(strs.trivia_points(Format.Bold($"<@{id}>"), pts))); - - return sb.ToString(); - } - - private EmbedBuilder? questionEmbed; - private IUserMessage? questionMessage; - private bool showHowToQuit; - - private void RegisterEvents(TriviaGame trivia) - { - trivia.OnQuestion += OnTriviaQuestion; - trivia.OnHint += OnTriviaHint; - trivia.OnGuess += OnTriviaGuess; - trivia.OnEnded += OnTriviaEnded; - trivia.OnStats += OnTriviaStats; - trivia.OnTimeout += OnTriviaTimeout; - } - - private void UnregisterEvents(TriviaGame trivia) - { - trivia.OnQuestion -= OnTriviaQuestion; - trivia.OnHint -= OnTriviaHint; - trivia.OnGuess -= OnTriviaGuess; - trivia.OnEnded -= OnTriviaEnded; - trivia.OnStats -= OnTriviaStats; - trivia.OnTimeout -= OnTriviaTimeout; - } - - private async Task OnTriviaHint(TriviaGame game, TriviaQuestion question) - { - try - { - if (questionMessage is null) - { - game.Stop(); - return; - } - - if (questionEmbed is not null) - await questionMessage.ModifyAsync(m - => m.Embed = questionEmbed.WithFooter(question.GetHint()).Build()); - } - catch (HttpException ex) when (ex.HttpCode is HttpStatusCode.NotFound or HttpStatusCode.Forbidden) - { - Log.Warning("Unable to edit message to show hint. Stopping trivia"); - game.Stop(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error editing trivia message"); - } - } - - private async Task OnTriviaQuestion(TriviaGame game, TriviaQuestion question) - { - try - { - questionEmbed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.trivia_game)) - .AddField(GetText(strs.category), question.Category) - .AddField(GetText(strs.question), question.Question); - - showHowToQuit = !showHowToQuit; - if (showHowToQuit) - questionEmbed.WithFooter(GetText(strs.trivia_quit($"{prefix}tq"))); - - if (Uri.IsWellFormedUriString(question.ImageUrl, UriKind.Absolute)) - questionEmbed.WithImageUrl(question.ImageUrl); - - questionMessage = await Response().Embed(questionEmbed).SendAsync(); - } - catch (HttpException ex) when (ex.HttpCode is HttpStatusCode.NotFound - or HttpStatusCode.Forbidden - or HttpStatusCode.BadRequest) - { - Log.Warning("Unable to send trivia questions. Stopping immediately"); - game.Stop(); - throw; - } - } - - private async Task OnTriviaTimeout(TriviaGame _, TriviaQuestion question) - { - try - { - var embed = _sender.CreateEmbed() - .WithErrorColor() - .WithTitle(GetText(strs.trivia_game)) - .WithDescription(GetText(strs.trivia_times_up(Format.Bold(question.Answer)))); - - if (Uri.IsWellFormedUriString(question.AnswerImageUrl, UriKind.Absolute)) - embed.WithImageUrl(question.AnswerImageUrl); - - await Response().Embed(embed).SendAsync(); - } - catch - { - // ignored - } - } - - private async Task OnTriviaStats(TriviaGame game) - { - try - { - await Response().Confirm(GetText(strs.leaderboard), GetLeaderboardString(game)).SendAsync(); - } - catch - { - // ignored - } - } - - private async Task OnTriviaEnded(TriviaGame game) - { - try - { - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(strs.trivia_ended)) - .WithTitle(GetText(strs.leaderboard)) - .WithDescription(GetLeaderboardString(game))).SendAsync(); - } - catch - { - // ignored - } - finally - { - _service.RunningTrivias.TryRemove(ctx.Guild.Id, out _); - } - - UnregisterEvents(game); - } - - private async Task OnTriviaGuess( - TriviaGame _, - TriviaUser user, - TriviaQuestion question, - bool isWin) - { - try - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.trivia_game)) - .WithDescription(GetText(strs.trivia_win(user.Name, - Format.Bold(question.Answer)))); - - if (Uri.IsWellFormedUriString(question.AnswerImageUrl, UriKind.Absolute)) - embed.WithImageUrl(question.AnswerImageUrl); - - - if (isWin) - { - await Response().Embed(embed).SendAsync(); - - var reward = _gamesConfig.Data.Trivia.CurrencyReward; - if (reward > 0) - await _cs.AddAsync(user.Id, reward, new("trivia", "win")); - - return; - } - - embed.WithDescription(GetText(strs.trivia_guess(user.Name, - Format.Bold(question.Answer)))); - - await Response().Embed(embed).SendAsync(); - } - catch - { - // ignored - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs b/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs deleted file mode 100644 index 07c4ab4..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System.Threading.Channels; -using Exception = System.Exception; - -namespace EllieBot.Modules.Games.Common.Trivia; - -public sealed class TriviaGame -{ - private readonly TriviaOptions _opts; - - - private readonly IQuestionPool _questionPool; - - #region Events - - public event Func OnQuestion = static delegate { return Task.CompletedTask; }; - public event Func OnHint = static delegate { return Task.CompletedTask; }; - public event Func OnStats = static delegate { return Task.CompletedTask; }; - - public event Func OnGuess = static delegate - { - return Task.CompletedTask; - }; - - public event Func OnTimeout = static delegate { return Task.CompletedTask; }; - public event Func OnEnded = static delegate { return Task.CompletedTask; }; - - #endregion - - private bool _isStopped; - - public TriviaQuestion? CurrentQuestion { get; set; } - - - private readonly ConcurrentDictionary _users = new(); - - private readonly Channel<(TriviaUser User, string Input)> _inputs - = Channel.CreateUnbounded<(TriviaUser, string)>(new UnboundedChannelOptions - { - AllowSynchronousContinuations = true, - SingleReader = true, - SingleWriter = false, - }); - - public TriviaGame(TriviaOptions options, ILocalDataCache cache) - { - _opts = options; - - _questionPool = _opts.IsPokemon - ? new PokemonQuestionPool(cache) - : new DefaultQuestionPool(cache); - } - - public async Task RunAsync() - { - await GameLoop(); - } - - private async Task GameLoop() - { - Task TimeOutFactory() - => Task.Delay(_opts.QuestionTimer * 1000 / 2); - - var errorCount = 0; - var inactivity = 0; - - // loop until game is stopped - // each iteration is one round - var firstRun = true; - try - { - while (!_isStopped) - { - if (errorCount >= 5) - { - Log.Warning("Trivia errored 5 times and will quit"); - break; - } - - // wait for 3 seconds before posting the next question - if (firstRun) - { - firstRun = false; - } - else - { - await Task.Delay(3000); - } - - var maybeQuestion = await _questionPool.GetQuestionAsync(); - - if (maybeQuestion is not { } question) - { - // if question is null (ran out of question, or other bugg ) - stop - break; - } - - CurrentQuestion = question; - try - { - // clear out all of the past guesses - while (_inputs.Reader.TryRead(out _)) - { - } - - await OnQuestion(this, question); - } - catch (Exception ex) - { - Log.Warning(ex, "Error executing OnQuestion: {Message}", ex.Message); - errorCount++; - continue; - } - - - // just keep looping through user inputs until someone guesses the answer - // or the timer expires - var halfGuessTimerTask = TimeOutFactory(); - var hintSent = false; - var guessed = false; - while (true) - { - using var readCancel = new CancellationTokenSource(); - var readTask = _inputs.Reader.ReadAsync(readCancel.Token).AsTask(); - - // wait for either someone to attempt to guess - // or for timeout - var task = await Task.WhenAny(readTask, halfGuessTimerTask); - - // if the task which completed is the timeout task - if (task == halfGuessTimerTask) - { - readCancel.Cancel(); - - // if hint is already sent, means time expired - // break (end the round) - if (hintSent) - break; - - // else, means half time passed, send a hint - hintSent = true; - // start a new countdown of the same length - halfGuessTimerTask = TimeOutFactory(); - if (!_opts.NoHint) - { - // send a hint out - await OnHint(this, question); - } - - continue; - } - - // otherwise, read task is successful, and we're gonna - // get the user input data - var (user, input) = await readTask; - - // check the guess - if (question.IsAnswerCorrect(input)) - { - // add 1 point to the user - var val = _users.AddOrUpdate(user.Id, 1, (_, points) => ++points); - guessed = true; - - // reset inactivity counter - inactivity = 0; - errorCount = 0; - - var isWin = false; - // if user won the game, tell the game to stop - if (_opts.WinRequirement != 0 && val >= _opts.WinRequirement) - { - _isStopped = true; - isWin = true; - } - - // call onguess - await OnGuess(this, user, question, isWin); - break; - } - } - - if (!guessed) - { - await OnTimeout(this, question); - - if (_opts.Timeout != 0 && ++inactivity >= _opts.Timeout) - { - Log.Information("Trivia game is stopping due to inactivity"); - break; - } - } - } - } - catch (Exception ex) - { - Log.Error(ex, "Fatal error in trivia game: {ErrorMessage}", ex.Message); - } - finally - { - // make sure game is set as ended - _isStopped = true; - _ = OnEnded(this); - } - } - - public IReadOnlyList<(ulong User, int points)> GetLeaderboard() - => _users.Select(x => (x.Key, x.Value)).ToArray(); - - public ValueTask InputAsync(TriviaUser user, string input) - => _inputs.Writer.WriteAsync((user, input)); - - public bool Stop() - { - var isStopped = _isStopped; - _isStopped = true; - return !isStopped; - } - - public async ValueTask TriggerStatsAsync() - { - await OnStats(this); - } - - public async Task TriggerQuestionAsync() - { - if (CurrentQuestion is TriviaQuestion q) - await OnQuestion(this, q); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaGamesService.cs b/src/EllieBot/Modules/Games/Trivia/TriviaGamesService.cs deleted file mode 100644 index 6fc4ab6..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaGamesService.cs +++ /dev/null @@ -1,37 +0,0 @@ -#nullable disable -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Games.Common.Trivia; - -namespace EllieBot.Modules.Games; - -public sealed class TriviaGamesService : IReadyExecutor, IEService -{ - private readonly DiscordSocketClient _client; - public ConcurrentDictionary RunningTrivias { get; } = new(); - - public TriviaGamesService(DiscordSocketClient client) - { - _client = client; - } - - public Task OnReadyAsync() - { - _client.MessageReceived += OnMessageReceived; - - return Task.CompletedTask; - } - - private async Task OnMessageReceived(SocketMessage msg) - { - if (msg.Author.IsBot) - return; - - var umsg = msg as SocketUserMessage; - - if (umsg?.Channel is not IGuildChannel gc) - return; - - if (RunningTrivias.TryGetValue(gc.GuildId, out var tg)) - await tg.InputAsync(new(umsg.Author.Mention, umsg.Author.Id), umsg.Content); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaOptions.cs b/src/EllieBot/Modules/Games/Trivia/TriviaOptions.cs deleted file mode 100644 index 47bdc0b..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaOptions.cs +++ /dev/null @@ -1,44 +0,0 @@ -#nullable disable -using CommandLine; - -namespace EllieBot.Modules.Games.Common.Trivia; - -public class TriviaOptions : IEllieCommandOptions -{ - [Option('p', "pokemon", Required = false, Default = false, HelpText = "Whether it's 'Who's that pokemon?' trivia.")] - public bool IsPokemon { get; set; } = false; - - [Option("nohint", Required = false, Default = false, HelpText = "Don't show any hints.")] - public bool NoHint { get; set; } = false; - - [Option('w', - "win-req", - Required = false, - Default = 10, - HelpText = "Winning requirement. Set 0 for an infinite game. Default 10.")] - public int WinRequirement { get; set; } = 10; - - [Option('q', - "question-timer", - Required = false, - Default = 30, - HelpText = "How long until the question ends. Default 30.")] - public int QuestionTimer { get; set; } = 30; - - [Option('t', - "timeout", - Required = false, - Default = 10, - HelpText = "Number of questions of inactivity in order stop. Set 0 for never. Default 10.")] - public int Timeout { get; set; } = 10; - - public void NormalizeOptions() - { - if (WinRequirement < 0) - WinRequirement = 10; - if (QuestionTimer is < 10 or > 300) - QuestionTimer = 30; - if (Timeout is < 0 or > 20) - Timeout = 10; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaQuestion.cs b/src/EllieBot/Modules/Games/Trivia/TriviaQuestion.cs deleted file mode 100644 index 299c762..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaQuestion.cs +++ /dev/null @@ -1,115 +0,0 @@ -#nullable disable -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Games.Common.Trivia; - -public class TriviaQuestion -{ - public const int MAX_STRING_LENGTH = 22; - - //represents the min size to judge levDistance with - private static readonly HashSet> _strictness = - [ - new(9, 0), - new(14, 1), - new(19, 2), - new(22, 3) - ]; - - public string Category - => _qModel.Category; - - public string Question - => _qModel.Question; - - public string ImageUrl - => _qModel.ImageUrl; - - public string AnswerImageUrl - => _qModel.AnswerImageUrl ?? ImageUrl; - - public string Answer - => _qModel.Answer; - - public string CleanAnswer - => cleanAnswer ?? (cleanAnswer = Clean(Answer)); - - private string cleanAnswer; - private readonly TriviaQuestionModel _qModel; - - public TriviaQuestion(TriviaQuestionModel qModel) - { - _qModel = qModel; - } - - public string GetHint() - => Scramble(Answer); - - public bool IsAnswerCorrect(string guess) - { - if (Answer.Equals(guess, StringComparison.InvariantCulture)) - return true; - var cleanGuess = Clean(guess); - if (CleanAnswer.Equals(cleanGuess, StringComparison.InvariantCulture)) - return true; - - var levDistanceClean = CleanAnswer.LevenshteinDistance(cleanGuess); - var levDistanceNormal = Answer.LevenshteinDistance(guess); - return JudgeGuess(CleanAnswer.Length, cleanGuess.Length, levDistanceClean) - || JudgeGuess(Answer.Length, guess.Length, levDistanceNormal); - } - - private static bool JudgeGuess(int guessLength, int answerLength, int levDistance) - { - foreach (var level in _strictness) - { - if (guessLength <= level.Item1 || answerLength <= level.Item1) - { - if (levDistance <= level.Item2) - return true; - return false; - } - } - - return false; - } - - private static string Clean(string str) - { - str = " " + str.ToLowerInvariant() + " "; - str = Regex.Replace(str, @"\s+", " "); - str = Regex.Replace(str, @"[^\w\d\s]", ""); - //Here's where custom modification can be done - str = Regex.Replace(str, @"\s(a|an|the|of|in|for|to|as|at|be)\s", " "); - //End custom mod and cleanup whitespace - str = Regex.Replace(str, @"^\s+", ""); - str = Regex.Replace(str, @"\s+$", ""); - //Trim the really long answers - str = str.Length <= MAX_STRING_LENGTH ? str : str[..MAX_STRING_LENGTH]; - return str; - } - - private static string Scramble(string word) - { - var letters = word.ToCharArray(); - var count = 0; - for (var i = 0; i < letters.Length; i++) - { - if (letters[i] == ' ') - continue; - - count++; - if (count <= letters.Length / 5) - continue; - - if (count % 3 == 0) - continue; - - if (letters[i] != ' ') - letters[i] = '_'; - } - - return string.Join(" ", - new string(letters).Replace(" ", " \u2000", StringComparison.InvariantCulture).AsEnumerable()); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaUser.cs b/src/EllieBot/Modules/Games/Trivia/TriviaUser.cs deleted file mode 100644 index b61e827..0000000 --- a/src/EllieBot/Modules/Games/Trivia/TriviaUser.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace EllieBot.Modules.Games.Common.Trivia; - -public record class TriviaUser(string Name, ulong Id); \ No newline at end of file diff --git a/src/EllieBot/Modules/Help/CommandJsonObject.cs b/src/EllieBot/Modules/Help/CommandJsonObject.cs deleted file mode 100644 index 062a0b9..0000000 --- a/src/EllieBot/Modules/Help/CommandJsonObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Help; - -internal class CommandJsonObject -{ - public string[] Aliases { get; set; } - public string Description { get; set; } - public string[] Usage { get; set; } - public string Submodule { get; set; } - public string Module { get; set; } - public List Options { get; set; } - public string[] Requirements { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Help/CommandsOptions.cs b/src/EllieBot/Modules/Help/CommandsOptions.cs deleted file mode 100644 index ecbb06c..0000000 --- a/src/EllieBot/Modules/Help/CommandsOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -#nullable disable -using CommandLine; - -namespace EllieBot.Modules.Help.Common; - -public class CommandsOptions : IEllieCommandOptions -{ - public enum ViewType - { - Hide, - Cross, - All - } - - [Option('v', - "view", - Required = false, - Default = ViewType.Hide, - HelpText = - "Specifies how to output the list of commands. 0 - Hide commands which you can't use, 1 - Cross out commands which you can't use, 2 - Show all.")] - public ViewType View { get; set; } = ViewType.Hide; - - public void NormalizeOptions() - { - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Help/Help.cs b/src/EllieBot/Modules/Help/Help.cs deleted file mode 100644 index aedb8e8..0000000 --- a/src/EllieBot/Modules/Help/Help.cs +++ /dev/null @@ -1,590 +0,0 @@ -#nullable disable -using EllieBot.Modules.Help.Common; -using EllieBot.Modules.Help.Services; -using Newtonsoft.Json; -using System.Text; -using Ellie.Common.Marmalade; - -namespace EllieBot.Modules.Help; - -public sealed partial class Help : EllieModule -{ - public const string PATREON_URL = "https://patreon.com/elliebot"; - public const string PAYPAL_URL = "https://paypal.me/toastiet0ast"; - - private readonly ICommandsUtilityService _cus; - private readonly CommandService _cmds; - private readonly BotConfigService _bss; - private readonly IPermissionChecker _perms; - private readonly IServiceProvider _services; - private readonly DiscordSocketClient _client; - private readonly IBotStrings _strings; - - private readonly AsyncLazy _lazyClientId; - private readonly IMarmaladeLoaderService _marmalades; - - public Help( - ICommandsUtilityService _cus, - IPermissionChecker perms, - CommandService cmds, - BotConfigService bss, - IServiceProvider services, - DiscordSocketClient client, - IBotStrings strings, - IMarmaladeLoaderService marmalades) - { - this._cus = _cus; - _cmds = cmds; - _bss = bss; - _perms = perms; - _services = services; - _client = client; - _strings = strings; - _marmalades = marmalades; - - _lazyClientId = new(async () => (await _client.GetApplicationInfoAsync()).Id); - } - - public async Task GetHelpString() - { - var botSettings = _bss.Data; - if (string.IsNullOrWhiteSpace(botSettings.HelpText) || botSettings.HelpText == "-") - return default; - - var clientId = await _lazyClientId.Value; - var repCtx = new ReplacementContext(Context) - .WithOverride("{0}", () => clientId.ToString()) - .WithOverride("{1}", () => prefix) - .WithOverride("%prefix%", () => prefix) - .WithOverride("%bot.prefix%", () => prefix); - - var text = SmartText.CreateFrom(botSettings.HelpText); - return await repSvc.ReplaceAsync(text, repCtx); - } - - [Cmd] - public async Task Modules(int page = 1) - { - if (--page < 0) - return; - - var topLevelModules = new List(); - foreach (var m in _cmds.Modules.GroupBy(x => x.GetTopLevelModule()).OrderBy(x => x.Key.Name).Select(x => x.Key)) - { - var result = await _perms.CheckPermsAsync(ctx.Guild, - ctx.Channel, - ctx.User, - m.Name, - null); - -#if GLOBAL_ELLIE - if (m.Preconditions.Any(x => x is NoPublicBotAttribute)) - continue; -#endif - - if (result.IsAllowed) - topLevelModules.Add(m); - } - - var menu = new SelectMenuBuilder() - .WithPlaceholder("Select a module to see its commands") - .WithCustomId("cmds:modules_select"); - - foreach (var m in topLevelModules) - menu.AddOption(m.Name, m.Name, GetModuleEmoji(m.Name)); - - var inter = _inter.Create(ctx.User.Id, - menu, - async (smc) => - { - await smc.DeferAsync(); - var val = smc.Data.Values.FirstOrDefault(); - if (val is null) - return; - - await Commands(val); - }); - - await Response() - .Paginated() - .Items(topLevelModules) - .PageSize(12) - .CurrentPage(page) - .Interaction(inter) - .AddFooter(false) - .Page((items, _) => - { - var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.list_of_modules)); - - if (!items.Any()) - { - embed = embed.WithOkColor().WithDescription(GetText(strs.module_page_empty)); - return embed; - } - - items - .ToList() - .ForEach(module => embed.AddField($"{GetModuleEmoji(module.Name)} {module.Name}", - GetModuleDescription(module.Name) - + "\n" - + Format.Code(GetText(strs.module_footer(prefix, module.Name.ToLowerInvariant()))), - true)); - - return embed; - }) - .SendAsync(); - } - - private string GetModuleDescription(string moduleName) - { - var key = GetModuleLocStr(moduleName); - - if (key.Key == strs.module_description_missing.Key) - { - var desc = _marmalades - .GetLoadedMarmalades(Culture) - .FirstOrDefault(m => m.Canaries - .Any(x => x.Name.Equals(moduleName, - StringComparison.InvariantCultureIgnoreCase))) - ?.Description; - - if (desc is not null) - return desc; - } - - return GetText(key); - } - - private LocStr GetModuleLocStr(string moduleName) - { - switch (moduleName.ToLowerInvariant()) - { - case "help": - return strs.module_description_help; - case "administration": - return strs.module_description_administration; - case "expressions": - return strs.module_description_expressions; - case "searches": - return strs.module_description_searches; - case "utility": - return strs.module_description_utility; - case "games": - return strs.module_description_games; - case "gambling": - return strs.module_description_gambling; - case "music": - return strs.module_description_music; - case "permissions": - return strs.module_description_permissions; - case "xp": - return strs.module_description_xp; - case "marmalade": - return strs.module_description_marmalade; - case "patronage": - return strs.module_description_patronage; - default: - return strs.module_description_missing; - } - } - - private string GetModuleEmoji(string moduleName) - { - moduleName = moduleName.ToLowerInvariant(); - switch (moduleName) - { - case "help": - return "❓"; - case "administration": - return "🛠️"; - case "expressions": - return "🗣️"; - case "searches": - return "🔍"; - case "utility": - return "🔧"; - case "games": - return "🎲"; - case "gambling": - return "💰"; - case "music": - return "🎶"; - case "permissions": - return "🚓"; - case "xp": - return "📝"; - case "patronage": - return "💝"; - default: - return "📖"; - } - } - - [Cmd] - [EllieOptions] - public async Task Commands(string module = null, params string[] args) - { - if (string.IsNullOrWhiteSpace(module)) - { - await Modules(); - return; - } - - var (opts, _) = OptionsParser.ParseFrom(new CommandsOptions(), args); - - // Find commands for that module - // don't show commands which are blocked - // order by name - var allowed = new List(); - - var mdls = _cmds.Commands - .Where(c => c.Module.GetTopLevelModule() - .Name - .StartsWith(module, StringComparison.InvariantCultureIgnoreCase)) - .ToArray(); - - if (mdls.Length == 0) - { - var group = _cmds.Modules - .Where(x => x.Parent is not null) - .FirstOrDefault(x => string.Equals(x.Name.Replace("Commands", ""), - module, - StringComparison.InvariantCultureIgnoreCase)); - - if (group is not null) - { - await Group(group); - return; - } - } - - foreach (var cmd in mdls) - { - var result = await _perms.CheckPermsAsync(ctx.Guild, - ctx.Channel, - ctx.User, - cmd.Module.GetTopLevelModule().Name, - cmd.Name); - - if (result.IsAllowed) - allowed.Add(cmd); - } - - - var cmds = allowed.OrderBy(c => c.Aliases[0]) - .DistinctBy(x => x.Aliases[0]) - .ToList(); - - - // check preconditions for all commands, but only if it's not 'all' - // because all will show all commands anyway, no need to check - var succ = new HashSet(); - if (opts.View != CommandsOptions.ViewType.All) - { - succ = - [ - ..(await cmds.Select(async x => - { - var pre = await x.CheckPreconditionsAsync(Context, _services); - return (Cmd: x, Succ: pre.IsSuccess); - }) - .WhenAll()).Where(x => x.Succ) - .Select(x => x.Cmd) - ]; - - if (opts.View == CommandsOptions.ViewType.Hide) - // if hidden is specified, completely remove these commands from the list - cmds = cmds.Where(x => succ.Contains(x)).ToList(); - } - - var cmdsWithGroup = cmds.GroupBy(c => c.Module.GetGroupName()) - .OrderBy(x => x.Key == x.First().Module.Name ? int.MaxValue : x.Count()) - .ToList(); - - if (cmdsWithGroup.Count == 0) - { - if (opts.View != CommandsOptions.ViewType.Hide) - await Response().Error(strs.module_not_found).SendAsync(); - else - await Response().Error(strs.module_not_found_or_cant_exec).SendAsync(); - return; - } - - var sb = new SelectMenuBuilder() - .WithCustomId("cmds:submodule_select") - .WithPlaceholder("Select a submodule to see detailed commands"); - - var groups = cmdsWithGroup.ToArray(); - var embed = _sender.CreateEmbed().WithOkColor(); - foreach (var g in groups) - { - sb.AddOption(g.Key, g.Key); - var transformed = g - .Select(x => - { - //if cross is specified, and the command doesn't satisfy the requirements, cross it out - if (opts.View == CommandsOptions.ViewType.Cross) - { - return $"{(succ.Contains(x) ? "✅" : "❌")} {prefix + x.Aliases[0]}"; - } - - - if (x.Aliases.Count == 1) - return prefix + x.Aliases[0]; - - return prefix + x.Aliases[0] + " | " + prefix + x.Aliases[1]; - }); - - embed.AddField(g.Key, "" + string.Join("\n", transformed) + "", true); - } - - embed.WithFooter(GetText(strs.commands_instr(prefix))); - - - var inter = _inter.Create(ctx.User.Id, - sb, - async (smc) => - { - var groupName = smc.Data.Values.FirstOrDefault(); - var mdl = _cmds.Modules.FirstOrDefault(x - => string.Equals(x.Name.Replace("Commands", ""), groupName, StringComparison.InvariantCultureIgnoreCase)); - await smc.DeferAsync(); - await Group(mdl); - } - ); - - await Response().Embed(embed).Interaction(inter).SendAsync(); - } - - private async Task Group(ModuleInfo group) - { - var menu = new SelectMenuBuilder() - .WithCustomId("cmds:group_select") - .WithPlaceholder("Select a command to see its details"); - - foreach (var cmd in group.Commands.DistinctBy(x => x.Aliases[0])) - { - menu.AddOption(prefix + cmd.Aliases[0], cmd.Aliases[0]); - } - - var inter = _inter.Create(ctx.User.Id, - menu, - async (smc) => - { - await smc.DeferAsync(); - - await H(smc.Data.Values.FirstOrDefault()); - }); - - await Response() - .Paginated() - .Items(group.Commands.DistinctBy(x => x.Aliases[0]).ToArray()) - .PageSize(25) - .Interaction(inter) - .Page((items, _) => - { - var eb = _sender.CreateEmbed() - .WithTitle(GetText(strs.cmd_group_commands(group.Name))) - .WithOkColor(); - - foreach (var cmd in items) - { - string cmdName; - if (cmd.Aliases.Count > 1) - cmdName = Format.Code(prefix + cmd.Aliases[0]) + " | " + Format.Code(prefix + cmd.Aliases[1]); - else - cmdName = Format.Code(prefix + cmd.Aliases.First()); - - eb.AddField(cmdName, cmd.RealSummary(_strings, _marmalades, Culture, prefix)); - } - - return eb; - }) - .SendAsync(); - } - - [Cmd] - [Priority(0)] - public async Task H([Leftover] string fail) - { - var prefixless = - _cmds.Commands.FirstOrDefault(x => x.Aliases.Any(cmdName => cmdName.ToLowerInvariant() == fail)); - if (prefixless is not null) - { - await H(prefixless); - return; - } - - if (fail.StartsWith(prefix)) - fail = fail.Substring(prefix.Length); - - var group = _cmds.Modules - .SelectMany(x => x.Submodules) - .FirstOrDefault(x => string.Equals(x.Group, - fail, - StringComparison.InvariantCultureIgnoreCase)); - - if (group is not null) - { - await Group(group); - return; - } - - await Response().Error(strs.command_not_found).SendAsync(); - } - - [Cmd] - [Priority(1)] - public async Task H([Leftover] CommandInfo com = null) - { - var channel = ctx.Channel; - if (com is null) - { - try - { - var ch = channel is ITextChannel ? await ctx.User.CreateDMChannelAsync() : channel; - var data = await GetHelpString(); - if (data == default) - return; - - await Response().Channel(ch).Text(data).SendAsync(); - try - { - await ctx.OkAsync(); - } - catch - { - } // ignore if bot can't react - } - catch (Exception) - { - await Response().Error(strs.cant_dm).SendAsync(); - } - - return; - } - - var embed = _cus.GetCommandHelp(com, ctx.Guild); - await _sender.Response(channel).Embed(embed).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task GenCmdList() - { - _ = ctx.Channel.TriggerTypingAsync(); - - // order commands by top level module name - // and make a dictionary of > - var cmdData = _cmds.Commands.GroupBy(x => x.Module.GetTopLevelModule().Name) - .OrderBy(x => x.Key) - .ToDictionary(x => x.Key, - x => x.DistinctBy(c => c.Aliases.First()) - .Select(com => - { - List optHelpStr = null; - - var opt = CommandsUtilityService.GetEllieOptionType(com.Attributes); - if (opt is not null) - optHelpStr = CommandsUtilityService.GetCommandOptionHelpList(opt); - - return new CommandJsonObject - { - Aliases = com.Aliases.Select(alias => prefix + alias).ToArray(), - Description = com.RealSummary(_strings, _marmalades, Culture, prefix), - Usage = com.RealRemarksArr(_strings, _marmalades, Culture, prefix), - Submodule = com.Module.Name, - Module = com.Module.GetTopLevelModule().Name, - Options = optHelpStr, - Requirements = CommandsUtilityService.GetCommandRequirements(com) - }; - }) - .ToList()); - - var readableData = JsonConvert.SerializeObject(cmdData, Formatting.Indented); - - // send the indented file to chat - await using var rDataStream = new MemoryStream(Encoding.ASCII.GetBytes(readableData)); - await File.WriteAllTextAsync("data/commandlist.json", readableData); - await ctx.Channel.SendFileAsync(rDataStream, "cmds.json", GetText(strs.commandlist_regen)); - } - - [Cmd] - public async Task Guide() - => await Response() - .Confirm(strs.guide("https://commands.elliebot.net", - "https://docs.elliebot.net/")) - .SendAsync(); - - - private Task SelfhostAction(SocketMessageComponent smc) - => smc.RespondConfirmAsync(_sender, - """ - - In case you don't want or cannot Donate to EllieBot project, but you - - EllieBot is a free and [open source](https://toastielab.dev/Emotions-stuff/elliebot) project which means you can run your own "selfhosted" instance on your computer. - - *Keep in mind that running the bot on your computer means that the bot will be offline when you turn off your computer* - - - You can find the selfhosting guides by using the `.guide` command and clicking on the second link that pops up. - - If you decide to selfhost the bot, still consider [supporting the project](https://patreon.com/join/elliebot) to keep the development going :) - """, - true); - - [Cmd] - [OnlyPublicBot] - public async Task Donate() - { - var selfhostInter = _inter.Create(ctx.User.Id, - new ButtonBuilder( - emote: new Emoji("🖥️"), - customId: "donate:selfhosting", - label: "Selfhosting"), - SelfhostAction); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("Thank you for considering to donate to the EllieBot project!"); - - eb - .WithDescription(""" - EllieBot relies on donations to keep the servers, services and APIs running. - Donating will give you access to some exclusive features. You can read about them on the [patreon page](https://patreon.com/join/elliebot) - """) - .AddField("Donation Instructions", - $""" - 🗒️ Before pledging it is recommended to open your DMs as Ellie will send you a welcome message with instructions after you pledge has been processed and confirmed. - - **Step 1:** ❤️ Pledge on Patreon ❤️ - - `1.` Go to and choose a tier. - `2.` Make sure your payment is processed and accepted. - - **Step 2** 🤝 Connect your Discord account 🤝 - - `1.` Go to your profile settings on Patreon and connect your Discord account to it. - *please make sure you're logged into the correct Discord account* - - If you do not know how to do it, you may [follow instructions here](https://support.patreon.com/hc/en-us/articles/212052266-How-do-I-connect-Discord-to-Patreon-Patron-) - - **Step 3** ⏰ Wait a short while (usually 1-3 minutes) ⏰ - - Ellie will DM you the welcome instructions, and you will receive your rewards! - 🎉 **Enjoy!** 🎉 - """); - - try - { - await Response() - .Channel(await ctx.User.CreateDMChannelAsync()) - .Embed(eb) - .Interaction(selfhostInter) - .SendAsync(); - - _ = ctx.OkAsync(); - } - catch - { - await Response().Error(strs.cant_dm).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Help/HelpService.cs b/src/EllieBot/Modules/Help/HelpService.cs deleted file mode 100644 index fd1b18b..0000000 --- a/src/EllieBot/Modules/Help/HelpService.cs +++ /dev/null @@ -1,44 +0,0 @@ -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.Modules.Help.Services; - -public class HelpService : IExecNoCommand, IEService -{ - private readonly BotConfigService _bss; - private readonly IReplacementService _rs; - private readonly IMessageSenderService _sender; - - public HelpService(BotConfigService bss, IReplacementService repSvc, IMessageSenderService sender) - { - _bss = bss; - _rs = repSvc; - _sender = sender; - } - - public async Task ExecOnNoCommandAsync(IGuild? guild, IUserMessage msg) - { - var settings = _bss.Data; - if (guild is null) - { - if (string.IsNullOrWhiteSpace(settings.DmHelpText) || settings.DmHelpText == "-") - return; - - // only send dm help text if it contains one of the keywords, if they're specified - // if they're not, then reply to every DM - if (settings.DmHelpTextKeywords is not null - && !settings.DmHelpTextKeywords.Any(k => msg.Content.Contains(k))) - { - return; - } - - var repCtx = new ReplacementContext(guild: guild, channel: msg.Channel, user: msg.Author) - .WithOverride("%prefix%", () => _bss.Data.Prefix) - .WithOverride("%bot.prefix%", () => _bss.Data.Prefix); - - var text = SmartText.CreateFrom(settings.DmHelpText); - text = await _rs.ReplaceAsync(text, repCtx); - - await _sender.Response(msg.Channel).Text(text).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Marmalades/IMarmaladesRepositoryService.cs b/src/EllieBot/Modules/Marmalades/IMarmaladesRepositoryService.cs deleted file mode 100644 index 155f56b..0000000 --- a/src/EllieBot/Modules/Marmalades/IMarmaladesRepositoryService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules; - -public interface IMarmaladesRepositoryService -{ - Task> GetModuleItemsAsync(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Marmalades/Marmalade.cs b/src/EllieBot/Modules/Marmalades/Marmalade.cs deleted file mode 100644 index 530b23f..0000000 --- a/src/EllieBot/Modules/Marmalades/Marmalade.cs +++ /dev/null @@ -1,243 +0,0 @@ -using Ellie.Common.Marmalade; - -namespace EllieBot.Modules; - -[OwnerOnly] -[NoPublicBot] -public partial class Marmalade : EllieModule -{ - private readonly IMarmaladesRepositoryService _repo; - - public Marmalade(IMarmaladesRepositoryService repo) - { - _repo = repo; - } - - [Cmd] - [OwnerOnly] - public async Task MarmaladeLoad(string? name = null) - { - if (string.IsNullOrWhiteSpace(name)) - { - var loaded = _service.GetLoadedMarmalades() - .Select(x => x.Name) - .ToHashSet(); - - var unloaded = _service.GetAllMarmalades() - .Where(x => !loaded.Contains(x)) - .Select(x => Format.Code(x.ToString())) - .ToArray(); - - if (unloaded.Length == 0) - { - await Response().Pending(strs.no_marmalade_available).SendAsync(); - return; - } - - await Response() - .Paginated() - .Items(unloaded) - .PageSize(10) - .Page((items, _) => - { - return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.list_of_unloaded)) - .WithDescription(items.Join('\n')); - }) - .SendAsync(); - return; - } - - var res = await _service.LoadMarmaladeAsync(name); - if (res == MarmaladeLoadResult.Success) - await Response().Confirm(strs.marmalade_loaded(Format.Code(name))).SendAsync(); - else - { - var locStr = res switch - { - MarmaladeLoadResult.Empty => strs.marmalade_empty, - MarmaladeLoadResult.AlreadyLoaded => strs.marmalade_already_loaded(Format.Code(name)), - MarmaladeLoadResult.NotFound => strs.marmalade_invalid_not_found, - MarmaladeLoadResult.UnknownError => strs.error_occured, - _ => strs.error_occured - }; - - await Response().Error(locStr).SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task MarmaladeUnload(string? name = null) - { - if (string.IsNullOrWhiteSpace(name)) - { - var loaded = _service.GetLoadedMarmalades(); - if (loaded.Count == 0) - { - await Response().Pending(strs.no_marmalade_loaded).SendAsync(); - return; - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.loaded_marmalades)) - .WithDescription(loaded.Select(x => x.Name) - .Join("\n"))) - .SendAsync(); - - return; - } - - var res = await _service.UnloadMarmaladeAsync(name); - if (res == MarmaladeUnloadResult.Success) - await Response().Confirm(strs.marmalade_unloaded(Format.Code(name))).SendAsync(); - else - { - var locStr = res switch - { - MarmaladeUnloadResult.NotLoaded => strs.marmalade_not_loaded, - MarmaladeUnloadResult.PossiblyUnable => strs.marmalade_possibly_cant_unload, - _ => strs.error_occured - }; - - await Response().Error(locStr).SendAsync(); - } - } - - [Cmd] - [OwnerOnly] - public async Task MarmaladeList() - { - var all = _service.GetAllMarmalades(); - - if (all.Count == 0) - { - await Response().Pending(strs.no_marmalade_available).SendAsync(); - return; - } - - var loaded = _service.GetLoadedMarmalades() - .Select(x => x.Name) - .ToHashSet(); - - var output = all - .Select(m => - { - var emoji = loaded.Contains(m) ? "`✅`" : "`🔴`"; - return $"{emoji} `{m}`"; - }) - .ToArray(); - - - await Response() - .Paginated() - .Items(output) - .PageSize(10) - .Page((items, _) => _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.list_of_marmalades)) - .WithDescription(items.Join('\n'))) - .SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task MarmaladeInfo(string? name = null) - { - var marmalades = _service.GetLoadedMarmalades(); - - if (name is not null) - { - var found = marmalades.FirstOrDefault(x => string.Equals(x.Name, - name, - StringComparison.InvariantCultureIgnoreCase)); - - if (found is null) - { - await Response().Error(strs.marmalade_name_not_found).SendAsync(); - return; - } - - var cmdCount = found.Canaries.Sum(x => x.Commands.Count); - var cmdNames = found.Canaries - .SelectMany(x => Format.Code(string.IsNullOrWhiteSpace(x.Prefix) - ? x.Name - : $"{x.Prefix} {x.Name}")) - .Join("\n"); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(strs.marmalade_info)) - .WithTitle(found.Name) - .WithDescription(found.Description) - .AddField(GetText(strs.canaries_count(found.Canaries.Count)), - found.Canaries.Count == 0 - ? "-" - : found.Canaries.Select(x => x.Name).Join('\n'), - true) - .AddField(GetText(strs.commands_count(cmdCount)), - string.IsNullOrWhiteSpace(cmdNames) - ? "-" - : cmdNames, - true); - - await Response().Embed(eb).SendAsync(); - return; - } - - if (marmalades.Count == 0) - { - await Response().Pending(strs.no_marmalade_loaded).SendAsync(); - return; - } - - await Response() - .Paginated() - .Items(marmalades) - .PageSize(9) - .CurrentPage(0) - .Page((items, _) => - { - var eb = _sender.CreateEmbed() - .WithOkColor(); - - foreach (var marmalade in items) - { - eb.AddField(marmalade.Name, - $""" - `Canaries:` {marmalade.Canaries.Count} - `Commands:` {marmalade.Canaries.Sum(x => x.Commands.Count)} - -- - {marmalade.Description} - """); - } - - return eb; - }) - .SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task MarmaladeSearch() - { - var eb = _sender.CreateEmbed() - .WithTitle(GetText(strs.list_of_marmalades)) - .WithOkColor(); - - foreach (var item in await _repo.GetModuleItemsAsync()) - { - eb.AddField(item.Name, - $""" - {item.Description} - `{item.Command}` - """, - true); - } - - await Response().Embed(eb).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Marmalades/MarmaladeItem.cs b/src/EllieBot/Modules/Marmalades/MarmaladeItem.cs deleted file mode 100644 index 54c2889..0000000 --- a/src/EllieBot/Modules/Marmalades/MarmaladeItem.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules; - -public sealed class ModuleItem -{ - public required string Name { get; init; } - public required string Description { get; init; } - public required string Command { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Marmalades/MarmaladesRepositoryService.cs b/src/EllieBot/Modules/Marmalades/MarmaladesRepositoryService.cs deleted file mode 100644 index 6cc12b5..0000000 --- a/src/EllieBot/Modules/Marmalades/MarmaladesRepositoryService.cs +++ /dev/null @@ -1,67 +0,0 @@ -namespace EllieBot.Modules; - -public class MarmaladesRepositoryService : IMarmaladesRepositoryService, IEService -{ - public async Task> GetModuleItemsAsync() - { - // Simulate retrieving data from a database or API - await Task.Delay(100); - return - [ - new() - { - Name = "RSS Reader", - Description = "Keep up to date with your favorite websites", - Command = ".mainstall rss" - }, - new() - { - Name = "Password Manager", - Description = "Safely store and manage all your passwords", - Command = ".mainstall passwordmanager" - }, - new() - { - Name = "Browser Extension", - Description = "Enhance your browsing experience with useful tools", - Command = ".mainstall browserextension" - }, - new() - { - Name = "Video Downloader", - Description = "Download videos from popular websites", - Command = ".mainstall videodownloader" - }, - new() - { - Name = "Virtual Private Network", - Description = "Securely browse the web and protect your privacy", - Command = ".mainstall vpn" - }, - new() - { - Name = "Ad Blocker", - Description = "Block annoying ads and improve page load times", - Command = ".mainstall adblocker" - }, - new() - { - Name = "Cloud Storage", - Description = "Store and share your files online", - Command = ".mainstall cloudstorage" - }, - new() - { - Name = "Social Media Manager", - Description = "Manage all your social media accounts in one place", - Command = ".mainstall socialmediamanager" - }, - new() - { - Name = "Code Editor", - Description = "Write and edit code online", - Command = ".mainstall codeeditor" - } - ]; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/Music.cs b/src/EllieBot/Modules/Music/Music.cs deleted file mode 100644 index 3b1393c..0000000 --- a/src/EllieBot/Modules/Music/Music.cs +++ /dev/null @@ -1,755 +0,0 @@ -#nullable disable -using EllieBot.Modules.Music.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Music; - -[NoPublicBot] -public sealed partial class Music : EllieModule -{ - public enum All { All = -1 } - - public enum InputRepeatType - { - N = 0, No = 0, None = 0, - T = 1, Track = 1, S = 1, Song = 1, - Q = 2, Queue = 2, Playlist = 2, Pl = 2 - } - - public const string MUSIC_ICON_URL = "https://i.imgur.com/nhKS3PT.png"; - - private const int LQ_ITEMS_PER_PAGE = 9; - - private static readonly SemaphoreSlim _voiceChannelLock = new(1, 1); - private readonly ILogCommandService _logService; - - public Music(ILogCommandService logService) - => _logService = logService; - - private async Task ValidateAsync() - { - var user = (IGuildUser)ctx.User; - var userVoiceChannelId = user.VoiceChannel?.Id; - - if (userVoiceChannelId is null) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return false; - } - - var currentUser = await ctx.Guild.GetCurrentUserAsync(); - if (currentUser.VoiceChannel?.Id != userVoiceChannelId) - { - await Response().Error(strs.not_with_bot_in_voice).SendAsync(); - return false; - } - - return true; - } - - private async Task EnsureBotInVoiceChannelAsync(ulong voiceChannelId, IGuildUser botUser = null) - { - botUser ??= await ctx.Guild.GetCurrentUserAsync(); - await _voiceChannelLock.WaitAsync(); - try - { - if (botUser.VoiceChannel?.Id is null || !_service.TryGetMusicPlayer(ctx.Guild.Id, out _)) - await _service.JoinVoiceChannelAsync(ctx.Guild.Id, voiceChannelId); - } - finally - { - _voiceChannelLock.Release(); - } - } - - private async Task QueuePreconditionInternalAsync() - { - var user = (IGuildUser)ctx.User; - var voiceChannelId = user.VoiceChannel?.Id; - - if (voiceChannelId is null) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return false; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var botUser = await ctx.Guild.GetCurrentUserAsync(); - await EnsureBotInVoiceChannelAsync(voiceChannelId!.Value, botUser); - - if (botUser.VoiceChannel?.Id != voiceChannelId) - { - await Response().Error(strs.not_with_bot_in_voice).SendAsync(); - return false; - } - - return true; - } - - private async Task QueueByQuery(string query, bool asNext = false, MusicPlatform? forcePlatform = null) - { - var succ = await QueuePreconditionInternalAsync(); - if (!succ) - return; - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - var (trackInfo, index) = await mp.TryEnqueueTrackAsync(query, ctx.User.ToString(), asNext, forcePlatform); - if (trackInfo is null) - { - await Response().Error(strs.track_not_found).SendAsync(); - return; - } - - try - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(strs.queued_track) + " #" + (index + 1), MUSIC_ICON_URL) - .WithDescription($"{trackInfo.PrettyName()}\n{GetText(strs.queue)} ") - .WithFooter(trackInfo.Platform.ToString()); - - if (!string.IsNullOrWhiteSpace(trackInfo.Thumbnail)) - embed.WithThumbnailUrl(trackInfo.Thumbnail); - - var queuedMessage = await _service.SendToOutputAsync(ctx.Guild.Id, embed); - queuedMessage?.DeleteAfter(10, _logService); - if (mp.IsStopped) - { - var msg = await Response().Pending(strs.queue_stopped(Format.Code(prefix + "play"))).SendAsync(); - msg.DeleteAfter(10, _logService); - } - } - catch - { - // ignored - } - } - - private async Task MoveToIndex(int index) - { - if (--index < 0) - return; - - var succ = await QueuePreconditionInternalAsync(); - if (!succ) - return; - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - mp.MoveTo(index); - } - - // join vc - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Join() - { - var user = (IGuildUser)ctx.User; - - var voiceChannelId = user.VoiceChannel?.Id; - - if (voiceChannelId is null) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return; - } - - await _service.JoinVoiceChannelAsync(user.GuildId, voiceChannelId.Value); - } - - // leave vc (destroy) - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Destroy() - { - var valid = await ValidateAsync(); - if (!valid) - return; - - await _service.LeaveVoiceChannelAsync(ctx.Guild.Id); - } - - // play - no args = next - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(2)] - public Task Play() - => Next(); - - // play - index = skip to that index - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public Task Play(int index) - => MoveToIndex(index); - - // play - query = q(query) - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public Task Play([Leftover] string query) - => QueueByQuery(query); - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Queue([Leftover] string query) - => QueueByQuery(query); - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task QueueNext([Leftover] string query) - => QueueByQuery(query, true); - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Volume(int vol) - { - if (vol is < 0 or > 100) - { - await Response().Error(strs.volume_input_invalid).SendAsync(); - return; - } - - var valid = await ValidateAsync(); - if (!valid) - return; - - await _service.SetVolumeAsync(ctx.Guild.Id, vol); - await Response().Confirm(strs.volume_set(vol)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Next() - { - var valid = await ValidateAsync(); - if (!valid) - return; - - var success = await _service.PlayAsync(ctx.Guild.Id, ((IGuildUser)ctx.User).VoiceChannel.Id); - if (!success) - await Response().Error(strs.no_player).SendAsync(); - } - - // list queue, relevant page - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ListQueue() - { - // show page with the current track - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp)) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - await ListQueue((mp.CurrentIndex / LQ_ITEMS_PER_PAGE) + 1); - } - - // list queue, specify page - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ListQueue(int page) - { - if (--page < 0) - return; - - IReadOnlyCollection tracks; - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp) || (tracks = mp.GetQueuedTracks()).Count == 0) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - EmbedBuilder PrintAction(IReadOnlyList tracks, int curPage) - { - var desc = string.Empty; - var current = mp.GetCurrentTrack(out var currentIndex); - if (current is not null) - desc = $"`🔊` {current.PrettyFullName()}\n\n" + desc; - - var repeatType = mp.Repeat; - var add = string.Empty; - if (mp.IsStopped) - add += Format.Bold(GetText(strs.queue_stopped(Format.Code(prefix + "play")))) + "\n"; - // var mps = mp.MaxPlaytimeSeconds; - // if (mps > 0) - // add += Format.Bold(GetText(strs.song_skips_after(TimeSpan.FromSeconds(mps).ToString("HH\\:mm\\:ss")))) + "\n"; - if (repeatType == PlayerRepeatType.Track) - add += "🔂 " + GetText(strs.repeating_track) + "\n"; - else - { - if (mp.AutoPlay) - add += "↪ " + GetText(strs.autoplaying) + "\n"; - // if (mp.FairPlay && !mp.Autoplay) - // add += " " + GetText(strs.fairplay) + "\n"; - if (repeatType == PlayerRepeatType.Queue) - add += "🔁 " + GetText(strs.repeating_queue) + "\n"; - } - - - desc += tracks - .Select((v, index) => - { - index += LQ_ITEMS_PER_PAGE * curPage; - if (index == currentIndex) - return $"**⇒**`{index + 1}.` {v.PrettyFullName()}"; - - return $"`{index + 1}.` {v.PrettyFullName()}"; - }) - .Join('\n'); - - if (!string.IsNullOrWhiteSpace(add)) - desc = add + "\n" + desc; - - var embed = _sender.CreateEmbed() - .WithAuthor( - GetText(strs.player_queue(curPage + 1, (tracks.Count / LQ_ITEMS_PER_PAGE) + 1)), - MUSIC_ICON_URL) - .WithDescription(desc) - .WithFooter( - $" {mp.PrettyVolume()} | 🎶 {tracks.Count} | ⌛ {mp.PrettyTotalTime()} ") - .WithOkColor(); - - return embed; - } - - await Response() - .Paginated() - .Items(tracks) - .PageSize(LQ_ITEMS_PER_PAGE) - .CurrentPage(page) - .AddFooter(false) - .Page(PrintAction) - .SendAsync(); - } - - // search - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task QueueSearch([Leftover] string query) - { - _ = ctx.Channel.TriggerTypingAsync(); - - var videos = await _service.SearchVideosAsync(query); - - if (videos.Count == 0) - { - await Response().Error(strs.track_not_found).SendAsync(); - return; - } - - - var embeds = videos.Select((x, i) => _sender.CreateEmbed() - .WithOkColor() - .WithThumbnailUrl(x.Thumbnail) - .WithDescription($"`{i + 1}.` {Format.Bold(x.Title)}\n\t{x.Url}")) - .ToList(); - - var msg = await Response() - .Text(strs.queue_search_results) - .Embeds(embeds) - .SendAsync(); - - try - { - var input = await GetUserInputAsync(ctx.User.Id, ctx.Channel.Id, str => int.TryParse(str, out _)); - if (input is null || !int.TryParse(input, out var index) || (index -= 1) < 0 || index >= videos.Count) - { - _logService.AddDeleteIgnore(msg.Id); - try - { - await msg.DeleteAsync(); - } - catch - { - } - - return; - } - - query = videos[index].Url; - - await Play(query); - } - finally - { - _logService.AddDeleteIgnore(msg.Id); - try - { - await msg.DeleteAsync(); - } - catch - { - } - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public async Task TrackRemove(int index) - { - if (index < 1) - { - await Response().Error(strs.removed_track_error).SendAsync(); - return; - } - - var valid = await ValidateAsync(); - if (!valid) - return; - - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp)) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - if (!mp.TryRemoveTrackAt(index - 1, out var track)) - { - await Response().Error(strs.removed_track_error).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithAuthor(GetText(strs.removed_track) + " #" + index, MUSIC_ICON_URL) - .WithDescription(track.PrettyName()) - .WithFooter(track.PrettyInfo()) - .WithErrorColor(); - - await _service.SendToOutputAsync(ctx.Guild.Id, embed); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public async Task TrackRemove(All _ = All.All) - { - var valid = await ValidateAsync(); - if (!valid) - return; - - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp)) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - mp.Clear(); - await Response().Confirm(strs.queue_cleared).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Stop() - { - var valid = await ValidateAsync(); - if (!valid) - return; - - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp)) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - mp.Stop(); - } - - private PlayerRepeatType InputToDbType(InputRepeatType type) - => type switch - { - InputRepeatType.None => PlayerRepeatType.None, - InputRepeatType.Queue => PlayerRepeatType.Queue, - InputRepeatType.Track => PlayerRepeatType.Track, - _ => PlayerRepeatType.Queue - }; - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task QueueRepeat(InputRepeatType type = InputRepeatType.Queue) - { - var valid = await ValidateAsync(); - if (!valid) - return; - - await _service.SetRepeatAsync(ctx.Guild.Id, InputToDbType(type)); - - if (type == InputRepeatType.None) - await Response().Confirm(strs.repeating_none).SendAsync(); - else if (type == InputRepeatType.Queue) - await Response().Confirm(strs.repeating_queue).SendAsync(); - else - await Response().Confirm(strs.repeating_track).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Pause() - { - var valid = await ValidateAsync(); - if (!valid) - return; - - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp) || mp.GetCurrentTrack(out _) is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - mp.TogglePause(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public Task Radio(string radioLink) - => QueueByQuery(radioLink, false, MusicPlatform.Radio); - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public Task Local([Leftover] string path) - => QueueByQuery(path, false, MusicPlatform.Local); - - [Cmd] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task LocalPlaylist([Leftover] string dirPath) - { - if (string.IsNullOrWhiteSpace(dirPath)) - return; - - var user = (IGuildUser)ctx.User; - var voiceChannelId = user.VoiceChannel?.Id; - - if (voiceChannelId is null) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var botUser = await ctx.Guild.GetCurrentUserAsync(); - await EnsureBotInVoiceChannelAsync(voiceChannelId!.Value, botUser); - - if (botUser.VoiceChannel?.Id != voiceChannelId) - { - await Response().Error(strs.not_with_bot_in_voice).SendAsync(); - return; - } - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - await _service.EnqueueDirectoryAsync(mp, dirPath, ctx.User.ToString()); - - await Response().Confirm(strs.dir_queue_complete).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task TrackMove(int from, int to) - { - if (--from < 0 || --to < 0 || from == to) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - var valid = await ValidateAsync(); - if (!valid) - return; - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - var track = mp.MoveTrack(from, to); - if (track is null) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithTitle(track.Title.TrimTo(65)) - .WithAuthor(GetText(strs.track_moved), MUSIC_ICON_URL) - .AddField(GetText(strs.from_position), $"#{from + 1}", true) - .AddField(GetText(strs.to_position), $"#{to + 1}", true) - .WithOkColor(); - - if (Uri.IsWellFormedUriString(track.Url, UriKind.Absolute)) - embed.WithUrl(track.Url); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Playlist([Leftover] string playlistQuery) - { - if (string.IsNullOrWhiteSpace(playlistQuery)) - return; - - var succ = await QueuePreconditionInternalAsync(); - if (!succ) - return; - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - - var queuedCount = await _service.EnqueueYoutubePlaylistAsync(mp, playlistQuery, ctx.User.ToString()); - if (queuedCount == 0) - { - await Response().Error(strs.no_search_results).SendAsync(); - return; - } - - await ctx.OkAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task NowPlaying() - { - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - var currentTrack = mp.GetCurrentTrack(out _); - if (currentTrack is null) - return; - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(strs.now_playing), MUSIC_ICON_URL) - .WithDescription(currentTrack.PrettyName()) - .WithThumbnailUrl(currentTrack.Thumbnail) - .WithFooter( - $"{mp.PrettyVolume()} | {mp.PrettyTotalTime()} | {currentTrack.Platform} | {currentTrack.Queuer}"); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task PlaylistShuffle() - { - var valid = await ValidateAsync(); - if (!valid) - return; - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - mp.ShuffleQueue(); - await Response().Confirm(strs.queue_shuffled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task SetMusicChannel() - { - await _service.SetMusicChannelAsync(ctx.Guild.Id, ctx.Channel.Id); - - await Response().Confirm(strs.set_music_channel).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task UnsetMusicChannel() - { - await _service.SetMusicChannelAsync(ctx.Guild.Id, null); - - await Response().Confirm(strs.unset_music_channel).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AutoDisconnect() - { - var newState = await _service.ToggleAutoDisconnectAsync(ctx.Guild.Id); - - if (newState) - await Response().Confirm(strs.autodc_enable).SendAsync(); - else - await Response().Confirm(strs.autodc_disable).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task MusicQuality() - { - var quality = await _service.GetMusicQualityAsync(ctx.Guild.Id); - await Response().Confirm(strs.current_music_quality(Format.Bold(quality.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task MusicQuality(QualityPreset preset) - { - await _service.SetMusicQualityAsync(ctx.Guild.Id, preset); - await Response().Confirm(strs.music_quality_set(Format.Bold(preset.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task QueueAutoPlay() - { - var newValue = await _service.ToggleQueueAutoPlayAsync(ctx.Guild.Id); - if (newValue) - await Response().Confirm(strs.music_autoplay_on).SendAsync(); - else - await Response().Confirm(strs.music_autoplay_off).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task QueueFairplay() - { - var newValue = await _service.FairplayAsync(ctx.Guild.Id); - if (newValue) - await Response().Confirm(strs.music_fairplay).SendAsync(); - else - await Response().Error(strs.no_player).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/PlaylistCommands.cs b/src/EllieBot/Modules/Music/PlaylistCommands.cs deleted file mode 100644 index d64e931..0000000 --- a/src/EllieBot/Modules/Music/PlaylistCommands.cs +++ /dev/null @@ -1,245 +0,0 @@ -#nullable disable -using LinqToDB; -using EllieBot.Modules.Music.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Music; - -public sealed partial class Music -{ - [Group] - public sealed partial class PlaylistCommands : EllieModule - { - private static readonly SemaphoreSlim _playlistLock = new(1, 1); - private readonly DbService _db; - private readonly IBotCredentials _creds; - - public PlaylistCommands(DbService db, IBotCredentials creds) - { - _db = db; - _creds = creds; - } - - private async Task EnsureBotInVoiceChannelAsync(ulong voiceChannelId, IGuildUser botUser = null) - { - botUser ??= await ctx.Guild.GetCurrentUserAsync(); - await _voiceChannelLock.WaitAsync(); - try - { - if (botUser.VoiceChannel?.Id is null || !_service.TryGetMusicPlayer(ctx.Guild.Id, out _)) - await _service.JoinVoiceChannelAsync(ctx.Guild.Id, voiceChannelId); - } - finally - { - _voiceChannelLock.Release(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Playlists([Leftover] int num = 1) - { - if (num <= 0) - return; - - List playlists; - - await using (var uow = _db.GetDbContext()) - { - playlists = uow.Set().GetPlaylistsOnPage(num); - } - - var embed = _sender.CreateEmbed() - .WithAuthor(GetText(strs.playlists_page(num)), MUSIC_ICON_URL) - .WithDescription(string.Join("\n", - playlists.Select(r => GetText(strs.playlists(r.Id, r.Name, r.Author, r.Songs.Count))))) - .WithOkColor(); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task DeletePlaylist([Leftover] int id) - { - var success = false; - try - { - await using var uow = _db.GetDbContext(); - var pl = uow.Set().FirstOrDefault(x => x.Id == id); - - if (pl is not null) - { - if (_creds.IsOwner(ctx.User) || pl.AuthorId == ctx.User.Id) - { - uow.Set().Remove(pl); - await uow.SaveChangesAsync(); - success = true; - } - } - } - catch (Exception ex) - { - Log.Warning(ex, "Error deleting playlist"); - } - - if (!success) - await Response().Error(strs.playlist_delete_fail).SendAsync(); - else - await Response().Confirm(strs.playlist_deleted).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task PlaylistShow(int id, int page = 1) - { - if (page-- < 1) - return; - - MusicPlaylist mpl; - await using (var uow = _db.GetDbContext()) - { - mpl = uow.Set().GetWithSongs(id); - } - - await Response() - .Paginated() - .Items(mpl.Songs) - .PageSize(20) - .CurrentPage(page) - .Page((items, _) => - { - var i = 0; - var str = string.Join("\n", - items - .Select(x => $"`{++i}.` [{x.Title.TrimTo(45)}]({x.Query}) `{x.Provider}`")); - return _sender.CreateEmbed().WithTitle($"\"{mpl.Name}\" by {mpl.Author}") - .WithOkColor() - .WithDescription(str); - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Save([Leftover] string name) - { - if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp)) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - var songs = mp.GetQueuedTracks() - .Select(s => new PlaylistSong - { - Provider = s.Platform.ToString(), - ProviderType = (MusicType)s.Platform, - Title = s.Title, - Query = s.Url - }) - .ToList(); - - MusicPlaylist playlist; - await using (var uow = _db.GetDbContext()) - { - playlist = new() - { - Name = name, - Author = ctx.User.Username, - AuthorId = ctx.User.Id, - Songs = songs.ToList() - }; - uow.Set().Add(playlist); - await uow.SaveChangesAsync(); - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.playlist_saved)) - .AddField(GetText(strs.name), name) - .AddField(GetText(strs.id), playlist.Id.ToString())) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Load([Leftover] int id) - { - // expensive action, 1 at a time - await _playlistLock.WaitAsync(); - try - { - var user = (IGuildUser)ctx.User; - var voiceChannelId = user.VoiceChannel?.Id; - - if (voiceChannelId is null) - { - await Response().Error(strs.must_be_in_voice).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var botUser = await ctx.Guild.GetCurrentUserAsync(); - await EnsureBotInVoiceChannelAsync(voiceChannelId!.Value, botUser); - - if (botUser.VoiceChannel?.Id != voiceChannelId) - { - await Response().Error(strs.not_with_bot_in_voice).SendAsync(); - return; - } - - var mp = await _service.GetOrCreateMusicPlayerAsync((ITextChannel)ctx.Channel); - if (mp is null) - { - await Response().Error(strs.no_player).SendAsync(); - return; - } - - MusicPlaylist mpl; - await using (var uow = _db.GetDbContext()) - { - mpl = uow.Set().GetWithSongs(id); - } - - if (mpl is null) - { - await Response().Error(strs.playlist_id_not_found).SendAsync(); - return; - } - - IUserMessage msg = null; - try - { - msg = await Response() - .Pending(strs.attempting_to_queue(Format.Bold(mpl.Songs.Count.ToString()))) - .SendAsync(); - } - catch (Exception) - { - } - - await mp.EnqueueManyAsync(mpl.Songs.Select(x => (x.Query, (MusicPlatform)x.ProviderType)), - ctx.User.ToString()); - - if (msg is not null) - await msg.ModifyAsync(m => m.Content = GetText(strs.playlist_queue_complete)); - } - finally - { - _playlistLock.Release(); - } - } - - [Cmd] - [OwnerOnly] - public async Task DeletePlaylists() - { - await using var uow = _db.GetDbContext(); - await uow.Set().DeleteAsync(); - await uow.SaveChangesAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/Services/AyuVoiceStateService.cs b/src/EllieBot/Modules/Music/Services/AyuVoiceStateService.cs deleted file mode 100644 index ff47354..0000000 --- a/src/EllieBot/Modules/Music/Services/AyuVoiceStateService.cs +++ /dev/null @@ -1,217 +0,0 @@ -#nullable disable -using EllieBot.Voice; -using System.Reflection; - -namespace EllieBot.Modules.Music.Services; - -public sealed class AyuVoiceStateService : IEService -{ - // public delegate Task VoiceProxyUpdatedDelegate(ulong guildId, IVoiceProxy proxy); - // public event VoiceProxyUpdatedDelegate OnVoiceProxyUpdate = delegate { return Task.CompletedTask; }; - - private readonly ConcurrentDictionary _voiceProxies = new(); - private readonly ConcurrentDictionary _voiceGatewayLocks = new(); - - private readonly DiscordSocketClient _client; - private readonly MethodInfo _sendVoiceStateUpdateMethodInfo; - private readonly object _dnetApiClient; - private readonly ulong _currentUserId; - - public AyuVoiceStateService(DiscordSocketClient client) - { - _client = client; - _currentUserId = _client.CurrentUser.Id; - - var prop = _client.GetType() - .GetProperties(BindingFlags.NonPublic | BindingFlags.Instance) - .First(x => x.Name == "ApiClient" && x.PropertyType.Name == "DiscordSocketApiClient"); - _dnetApiClient = prop.GetValue(_client, null); - _sendVoiceStateUpdateMethodInfo = _dnetApiClient.GetType() - .GetMethod("SendVoiceStateUpdateAsync", - [ - typeof(ulong), typeof(ulong?), typeof(bool), - typeof(bool), typeof(RequestOptions) - ]); - - _client.LeftGuild += ClientOnLeftGuild; - } - - private Task ClientOnLeftGuild(SocketGuild guild) - { - if (_voiceProxies.TryRemove(guild.Id, out var proxy)) - { - proxy.StopGateway(); - proxy.SetGateway(null); - } - - return Task.CompletedTask; - } - - private Task InvokeSendVoiceStateUpdateAsync( - ulong guildId, - ulong? channelId = null, - bool isDeafened = false, - bool isMuted = false) - // return _voiceStateUpdate(guildId, channelId, isDeafened, isMuted); - => (Task)_sendVoiceStateUpdateMethodInfo.Invoke(_dnetApiClient, - [guildId, channelId, isMuted, isDeafened, null]); - - private Task SendLeaveVoiceChannelInternalAsync(ulong guildId) - => InvokeSendVoiceStateUpdateAsync(guildId); - - private Task SendJoinVoiceChannelInternalAsync(ulong guildId, ulong channelId) - => InvokeSendVoiceStateUpdateAsync(guildId, channelId); - - private SemaphoreSlim GetVoiceGatewayLock(ulong guildId) - => _voiceGatewayLocks.GetOrAdd(guildId, new SemaphoreSlim(1, 1)); - - private async Task LeaveVoiceChannelInternalAsync(ulong guildId) - { - var complete = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - - Task OnUserVoiceStateUpdated(SocketUser user, SocketVoiceState oldState, SocketVoiceState newState) - { - if (user is SocketGuildUser guildUser && guildUser.Guild.Id == guildId && newState.VoiceChannel?.Id is null) - complete.TrySetResult(true); - - return Task.CompletedTask; - } - - try - { - _client.UserVoiceStateUpdated += OnUserVoiceStateUpdated; - - if (_voiceProxies.TryGetValue(guildId, out var proxy)) - { - _ = proxy.StopGateway(); - proxy.SetGateway(null); - } - - await SendLeaveVoiceChannelInternalAsync(guildId); - await Task.WhenAny(Task.Delay(1500), complete.Task); - } - finally - { - _client.UserVoiceStateUpdated -= OnUserVoiceStateUpdated; - } - } - - public async Task LeaveVoiceChannel(ulong guildId) - { - var gwLock = GetVoiceGatewayLock(guildId); - await gwLock.WaitAsync(); - try - { - await LeaveVoiceChannelInternalAsync(guildId); - } - finally - { - gwLock.Release(); - } - } - - private async Task InternalConnectToVcAsync(ulong guildId, ulong channelId) - { - var voiceStateUpdatedSource = - new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var voiceServerUpdatedSource = - new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - - Task OnUserVoiceStateUpdated(SocketUser user, SocketVoiceState oldState, SocketVoiceState newState) - { - if (user is SocketGuildUser guildUser && guildUser.Guild.Id == guildId) - { - if (newState.VoiceChannel?.Id == channelId) - voiceStateUpdatedSource.TrySetResult(newState.VoiceSessionId); - - voiceStateUpdatedSource.TrySetResult(null); - } - - return Task.CompletedTask; - } - - Task OnVoiceServerUpdated(SocketVoiceServer data) - { - if (data.Guild.Id == guildId) - voiceServerUpdatedSource.TrySetResult(data); - - return Task.CompletedTask; - } - - try - { - _client.VoiceServerUpdated += OnVoiceServerUpdated; - _client.UserVoiceStateUpdated += OnUserVoiceStateUpdated; - - await SendJoinVoiceChannelInternalAsync(guildId, channelId); - - // create a delay task, how much to wait for gateway response - using var cts = new CancellationTokenSource(); - var delayTask = Task.Delay(2500, cts.Token); - - // either delay or successful voiceStateUpdate - var maybeUpdateTask = Task.WhenAny(delayTask, voiceStateUpdatedSource.Task); - // either delay or successful voiceServerUpdate - var maybeServerTask = Task.WhenAny(delayTask, voiceServerUpdatedSource.Task); - - // wait for both to end (max 1s) and check if either of them is a delay task - var results = await Task.WhenAll(maybeUpdateTask, maybeServerTask); - if (results[0] == delayTask || results[1] == delayTask) - // if either is delay, return null - connection unsuccessful - return null; - else - cts.Cancel(); - - // if both are succesful, that means we can safely get - // the values from completion sources - - var session = await voiceStateUpdatedSource.Task; - - // session can be null. Means we disconnected, or connected to the wrong channel (?!) - if (session is null) - return null; - - var voiceServerData = await voiceServerUpdatedSource.Task; - - VoiceGateway CreateVoiceGatewayLocal() - { - return new(guildId, _currentUserId, session, voiceServerData.Token, voiceServerData.Endpoint); - } - - var current = _voiceProxies.AddOrUpdate(guildId, - _ => new VoiceProxy(CreateVoiceGatewayLocal()), - (gid, currentProxy) => - { - _ = currentProxy.StopGateway(); - currentProxy.SetGateway(CreateVoiceGatewayLocal()); - return currentProxy; - }); - - _ = current.StartGateway(); // don't await, this blocks until gateway is closed - return current; - } - finally - { - _client.VoiceServerUpdated -= OnVoiceServerUpdated; - _client.UserVoiceStateUpdated -= OnUserVoiceStateUpdated; - } - } - - public async Task JoinVoiceChannel(ulong guildId, ulong channelId, bool forceReconnect = true) - { - var gwLock = GetVoiceGatewayLock(guildId); - await gwLock.WaitAsync(); - try - { - await LeaveVoiceChannelInternalAsync(guildId); - return await InternalConnectToVcAsync(guildId, channelId); - } - finally - { - gwLock.Release(); - } - } - - public bool TryGetProxy(ulong guildId, out IVoiceProxy proxy) - => _voiceProxies.TryGetValue(guildId, out proxy); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/Services/IMusicService.cs b/src/EllieBot/Modules/Music/Services/IMusicService.cs deleted file mode 100644 index 43bad99..0000000 --- a/src/EllieBot/Modules/Music/Services/IMusicService.cs +++ /dev/null @@ -1,36 +0,0 @@ -using EllieBot.Db.Models; -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Music.Services; - -public interface IMusicService -{ - /// - /// Leave voice channel in the specified guild if it's connected to one - /// - /// Id of the guild - public Task LeaveVoiceChannelAsync(ulong guildId); - - /// - /// Joins the voice channel with the specified id - /// - /// Id of the guild where the voice channel is - /// Id of the voice channel - public Task JoinVoiceChannelAsync(ulong guildId, ulong voiceChannelId); - - Task GetOrCreateMusicPlayerAsync(ITextChannel contextChannel); - bool TryGetMusicPlayer(ulong guildId, [MaybeNullWhen(false)] out IMusicPlayer musicPlayer); - Task EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string playlistId, string queuer); - Task EnqueueDirectoryAsync(IMusicPlayer mp, string dirPath, string queuer); - Task SendToOutputAsync(ulong guildId, EmbedBuilder embed); - Task PlayAsync(ulong guildId, ulong voiceChannelId); - Task> SearchVideosAsync(string query); - Task SetMusicChannelAsync(ulong guildId, ulong? channelId); - Task SetRepeatAsync(ulong guildId, PlayerRepeatType repeatType); - Task SetVolumeAsync(ulong guildId, int value); - Task ToggleAutoDisconnectAsync(ulong guildId); - Task GetMusicQualityAsync(ulong guildId); - Task SetMusicQualityAsync(ulong guildId, QualityPreset preset); - Task ToggleQueueAutoPlayAsync(ulong guildId); - Task FairplayAsync(ulong guildId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/Services/MusicService.cs b/src/EllieBot/Modules/Music/Services/MusicService.cs deleted file mode 100644 index 89c848d..0000000 --- a/src/EllieBot/Modules/Music/Services/MusicService.cs +++ /dev/null @@ -1,438 +0,0 @@ -using EllieBot.Db.Models; -using EllieBot.Modules.Music.Resolvers; -using System.Diagnostics.CodeAnalysis; - -namespace EllieBot.Modules.Music.Services; - -public sealed class MusicService : IMusicService, IPlaceholderProvider -{ - private readonly AyuVoiceStateService _voiceStateService; - private readonly ITrackResolveProvider _trackResolveProvider; - private readonly DbService _db; - private readonly IYoutubeResolverFactory _ytResolver; - private readonly ILocalTrackResolver _localResolver; - private readonly DiscordSocketClient _client; - private readonly IBotStrings _strings; - private readonly IGoogleApiService _googleApiService; - private readonly YtLoader _ytLoader; - private readonly IMessageSenderService _sender; - - private readonly ConcurrentDictionary _players; - private readonly ConcurrentDictionary _outputChannels; - private readonly ConcurrentDictionary _settings; - - public MusicService( - AyuVoiceStateService voiceStateService, - ITrackResolveProvider trackResolveProvider, - DbService db, - IYoutubeResolverFactory ytResolver, - ILocalTrackResolver localResolver, - DiscordSocketClient client, - IBotStrings strings, - IGoogleApiService googleApiService, - YtLoader ytLoader, - IMessageSenderService sender) - { - _voiceStateService = voiceStateService; - _trackResolveProvider = trackResolveProvider; - _db = db; - _ytResolver = ytResolver; - _localResolver = localResolver; - _client = client; - _strings = strings; - _googleApiService = googleApiService; - _ytLoader = ytLoader; - _sender = sender; - - _players = new(); - _outputChannels = new ConcurrentDictionary(); - _settings = new(); - - _client.LeftGuild += ClientOnLeftGuild; - } - - private void DisposeMusicPlayer(IMusicPlayer musicPlayer) - { - musicPlayer.Kill(); - _ = Task.Delay(10_000).ContinueWith(_ => musicPlayer.Dispose()); - } - - private void RemoveMusicPlayer(ulong guildId) - { - _outputChannels.TryRemove(guildId, out _); - if (_players.TryRemove(guildId, out var mp)) - DisposeMusicPlayer(mp); - } - - private Task ClientOnLeftGuild(SocketGuild guild) - { - RemoveMusicPlayer(guild.Id); - return Task.CompletedTask; - } - - public async Task LeaveVoiceChannelAsync(ulong guildId) - { - RemoveMusicPlayer(guildId); - await _voiceStateService.LeaveVoiceChannel(guildId); - } - - public Task JoinVoiceChannelAsync(ulong guildId, ulong voiceChannelId) - => _voiceStateService.JoinVoiceChannel(guildId, voiceChannelId); - - public async Task GetOrCreateMusicPlayerAsync(ITextChannel contextChannel) - { - var newPLayer = await CreateMusicPlayerInternalAsync(contextChannel.GuildId, contextChannel); - if (newPLayer is null) - return null; - - return _players.GetOrAdd(contextChannel.GuildId, newPLayer); - } - - public bool TryGetMusicPlayer(ulong guildId, [MaybeNullWhen(false)] out IMusicPlayer musicPlayer) - => _players.TryGetValue(guildId, out musicPlayer); - - public async Task EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string query, string queuer) - { - var count = 0; - await foreach (var track in _ytResolver.GetYoutubeResolver().ResolveTracksFromPlaylistAsync(query)) - { - if (mp.IsKilled) - break; - - mp.EnqueueTrack(track, queuer); - ++count; - } - - return count; - } - - public async Task EnqueueDirectoryAsync(IMusicPlayer mp, string dirPath, string queuer) - { - await foreach (var track in _localResolver.ResolveDirectoryAsync(dirPath)) - { - if (mp.IsKilled) - break; - - mp.EnqueueTrack(track, queuer); - } - } - - private async Task CreateMusicPlayerInternalAsync(ulong guildId, ITextChannel defaultChannel) - { - var queue = new MusicQueue(); - var resolver = _trackResolveProvider; - - if (!_voiceStateService.TryGetProxy(guildId, out var proxy)) - return null; - - var settings = await GetSettingsInternalAsync(guildId); - - ITextChannel? overrideChannel = null; - if (settings.MusicChannelId is { } channelId) - { - overrideChannel = _client.GetGuild(guildId)?.GetTextChannel(channelId); - - if (overrideChannel is null) - Log.Warning("Saved music output channel doesn't exist, falling back to current channel"); - } - - _outputChannels[guildId] = (defaultChannel, overrideChannel); - - var mp = new MusicPlayer(queue, - resolver, - _ytResolver, - proxy, - _googleApiService, - settings.QualityPreset, - settings.AutoPlay); - - mp.SetRepeat(settings.PlayerRepeat); - - if (settings.Volume is >= 0 and <= 100) - mp.SetVolume(settings.Volume); - else - Log.Error("Saved Volume is outside of valid range >= 0 && <=100 ({Volume})", settings.Volume); - - mp.OnCompleted += OnTrackCompleted(guildId); - mp.OnStarted += OnTrackStarted(guildId); - mp.OnQueueStopped += OnQueueStopped(guildId); - - return mp; - } - - public async Task SendToOutputAsync(ulong guildId, EmbedBuilder embed) - { - if (_outputChannels.TryGetValue(guildId, out var chan)) - { - var msg = await _sender.Response(chan.Override ?? chan.Default) - .Embed(embed) - .SendAsync(); - return msg; - } - - return null; - } - - private Func OnTrackCompleted(ulong guildId) - { - IUserMessage? lastFinishedMessage = null; - return async (mp, trackInfo) => - { - _ = lastFinishedMessage?.DeleteAsync(); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(guildId, strs.finished_track), Music.MUSIC_ICON_URL) - .WithDescription(trackInfo.PrettyName()) - .WithFooter(trackInfo.PrettyTotalTime()); - - lastFinishedMessage = await SendToOutputAsync(guildId, embed); - }; - } - - private Func OnTrackStarted(ulong guildId) - { - IUserMessage? lastPlayingMessage = null; - return async (mp, trackInfo, index) => - { - _ = lastPlayingMessage?.DeleteAsync(); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(GetText(guildId, strs.playing_track(index + 1)), Music.MUSIC_ICON_URL) - .WithDescription(trackInfo.PrettyName()) - .WithFooter($"{mp.PrettyVolume()} | {trackInfo.PrettyInfo()}"); - - lastPlayingMessage = await SendToOutputAsync(guildId, embed); - }; - } - - private Func OnQueueStopped(ulong guildId) - => _ => - { - if (_settings.TryGetValue(guildId, out var settings)) - { - if (settings.AutoDisconnect) - return LeaveVoiceChannelAsync(guildId); - } - - return Task.CompletedTask; - }; - - // this has to be done because dragging bot to another vc isn't supported yet - public async Task PlayAsync(ulong guildId, ulong voiceChannelId) - { - if (!TryGetMusicPlayer(guildId, out var mp)) - return false; - - if (mp.IsStopped) - { - if (!_voiceStateService.TryGetProxy(guildId, out var proxy) - || proxy.State == VoiceProxy.VoiceProxyState.Stopped) - await JoinVoiceChannelAsync(guildId, voiceChannelId); - } - - mp.Next(); - return true; - } - - private async Task> SearchYtLoaderVideosAsync(string query) - { - var result = await _ytLoader.LoadResultsAsync(query); - return result.Select(x => (x.Title, x.Url, x.Thumb)).ToList(); - } - - private async Task> SearchGoogleApiVideosAsync(string query) - { - var result = await _googleApiService.GetVideoInfosByKeywordAsync(query, 5); - return result.Select(x => (x.Name, x.Url, x.Thumbnail)).ToList(); - } - - public async Task> SearchVideosAsync(string query) - { - try - { - IList<(string, string, string)> videos = await SearchYtLoaderVideosAsync(query); - if (videos.Count > 0) - return videos; - } - catch (Exception ex) - { - Log.Warning("Failed geting videos with YtLoader: {ErrorMessage}", ex.Message); - } - - try - { - return await SearchGoogleApiVideosAsync(query); - } - catch (Exception ex) - { - Log.Warning("Failed getting video results with Google Api. " - + "Probably google api key missing: {ErrorMessage}", - ex.Message); - } - - return Array.Empty<(string, string, string)>(); - } - - private string GetText(ulong guildId, LocStr str) - => _strings.GetText(str, guildId); - - public IEnumerable<(string Name, Func Func)> GetPlaceholders() - { - // random track that's playing - yield return ("%music.playing%", () => - { - var randomPlayingTrack = _players.Select(x => x.Value.GetCurrentTrack(out _)) - .Where(x => x is not null) - .Shuffle() - .FirstOrDefault(); - - if (randomPlayingTrack is null) - return "-"; - - return randomPlayingTrack.Title; - }); - - // number of servers currently listening to music - yield return ("%music.servers%", () => - { - var count = _players.Select(x => x.Value.GetCurrentTrack(out _)).Count(x => x is not null); - - return count.ToString(); - }); - - yield return ("%music.queued%", () => - { - var count = _players.Sum(x => x.Value.GetQueuedTracks().Count); - - return count.ToString(); - }); - } - - #region Settings - - private async Task GetSettingsInternalAsync(ulong guildId) - { - if (_settings.TryGetValue(guildId, out var settings)) - return settings; - - await using var uow = _db.GetDbContext(); - var toReturn = _settings[guildId] = await uow.Set().ForGuildAsync(guildId); - await uow.SaveChangesAsync(); - - return toReturn; - } - - private async Task ModifySettingsInternalAsync( - ulong guildId, - Action action, - TState state) - { - await using var uow = _db.GetDbContext(); - var ms = await uow.Set().ForGuildAsync(guildId); - action(ms, state); - await uow.SaveChangesAsync(); - _settings[guildId] = ms; - } - - public async Task SetMusicChannelAsync(ulong guildId, ulong? channelId) - { - if (channelId is null) - { - await UnsetMusicChannelAsync(guildId); - return true; - } - - var channel = _client.GetGuild(guildId)?.GetTextChannel(channelId.Value); - if (channel is null) - return false; - - await ModifySettingsInternalAsync(guildId, - (settings, chId) => { settings.MusicChannelId = chId; }, - channelId); - - _outputChannels.AddOrUpdate(guildId, (channel, channel), (_, old) => (old.Default, channel)); - - return true; - } - - public async Task UnsetMusicChannelAsync(ulong guildId) - { - await ModifySettingsInternalAsync(guildId, - (settings, _) => { settings.MusicChannelId = null; }, - (ulong?)null); - - if (_outputChannels.TryGetValue(guildId, out var old)) - _outputChannels[guildId] = (old.Default, null); - } - - public async Task SetRepeatAsync(ulong guildId, PlayerRepeatType repeatType) - { - await ModifySettingsInternalAsync(guildId, - (settings, type) => { settings.PlayerRepeat = type; }, - repeatType); - - if (TryGetMusicPlayer(guildId, out var mp)) - mp.SetRepeat(repeatType); - } - - public async Task SetVolumeAsync(ulong guildId, int value) - { - if (value is < 0 or > 100) - throw new ArgumentOutOfRangeException(nameof(value)); - - await ModifySettingsInternalAsync(guildId, - (settings, newValue) => { settings.Volume = newValue; }, - value); - - if (TryGetMusicPlayer(guildId, out var mp)) - mp.SetVolume(value); - } - - public async Task ToggleAutoDisconnectAsync(ulong guildId) - { - var newState = false; - await ModifySettingsInternalAsync(guildId, - (settings, _) => { newState = settings.AutoDisconnect = !settings.AutoDisconnect; }, - default(object)); - - return newState; - } - - public async Task GetMusicQualityAsync(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var settings = await uow.Set().ForGuildAsync(guildId); - return settings.QualityPreset; - } - - public Task SetMusicQualityAsync(ulong guildId, QualityPreset preset) - => ModifySettingsInternalAsync(guildId, - (settings, _) => { settings.QualityPreset = preset; }, - preset); - - public async Task ToggleQueueAutoPlayAsync(ulong guildId) - { - var newValue = false; - await ModifySettingsInternalAsync(guildId, - (settings, _) => newValue = settings.AutoPlay = !settings.AutoPlay, - false); - - if (TryGetMusicPlayer(guildId, out var mp)) - mp.AutoPlay = newValue; - - return newValue; - } - - public Task FairplayAsync(ulong guildId) - { - if (TryGetMusicPlayer(guildId, out var mp)) - { - mp.SetFairplay(); - return Task.FromResult(true); - } - - return Task.FromResult(false); - } - - #endregion -} diff --git a/src/EllieBot/Modules/Music/Services/extractor/Misc.cs b/src/EllieBot/Modules/Music/Services/extractor/Misc.cs deleted file mode 100644 index 68c1fca..0000000 --- a/src/EllieBot/Modules/Music/Services/extractor/Misc.cs +++ /dev/null @@ -1,74 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music.Services; - -public sealed partial class YtLoader -{ - public class InitRange - { - public string Start { get; set; } - public string End { get; set; } - } - - public class IndexRange - { - public string Start { get; set; } - public string End { get; set; } - } - - public class ColorInfo - { - public string Primaries { get; set; } - public string TransferCharacteristics { get; set; } - public string MatrixCoefficients { get; set; } - } - - public class YtAdaptiveFormat - { - public int Itag { get; set; } - public string MimeType { get; set; } - public int Bitrate { get; set; } - public int Width { get; set; } - public int Height { get; set; } - public InitRange InitRange { get; set; } - public IndexRange IndexRange { get; set; } - public string LastModified { get; set; } - public string ContentLength { get; set; } - public string Quality { get; set; } - public int Fps { get; set; } - public string QualityLabel { get; set; } - public string ProjectionType { get; set; } - public int AverageBitrate { get; set; } - public ColorInfo ColorInfo { get; set; } - public string ApproxDurationMs { get; set; } - public string SignatureCipher { get; set; } - } - - public abstract class TrackInfo - { - public abstract string Url { get; } - public abstract string Title { get; } - public abstract string Thumb { get; } - public abstract TimeSpan Duration { get; } - } - - public sealed class YtTrackInfo : TrackInfo - { - private const string BASE_YOUTUBE_URL = "https://youtube.com/watch?v="; - public override string Url { get; } - public override string Title { get; } - public override string Thumb { get; } - public override TimeSpan Duration { get; } - - private readonly string _videoId; - - public YtTrackInfo(string title, string videoId, string thumb, TimeSpan duration) - { - Title = title; - Thumb = thumb; - Url = BASE_YOUTUBE_URL + videoId; - Duration = duration; - - _videoId = videoId; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/Services/extractor/YtLoader.cs b/src/EllieBot/Modules/Music/Services/extractor/YtLoader.cs deleted file mode 100644 index a91dd11..0000000 --- a/src/EllieBot/Modules/Music/Services/extractor/YtLoader.cs +++ /dev/null @@ -1,130 +0,0 @@ -#nullable disable -using System.Globalization; -using System.Text; -using System.Text.Json; - -namespace EllieBot.Modules.Music.Services; - -public sealed partial class YtLoader : IEService -{ - private static readonly byte[] _ytResultInitialData = Encoding.UTF8.GetBytes("var ytInitialData = "); - private static readonly byte[] _ytResultJsonEnd = Encoding.UTF8.GetBytes(";<"); - - private static readonly string[] _durationFormats = - [ - @"m\:ss", @"mm\:ss", @"h\:mm\:ss", @"hh\:mm\:ss", @"hhh\:mm\:ss" - ]; - - private readonly IHttpClientFactory _httpFactory; - - public YtLoader(IHttpClientFactory httpFactory) - => _httpFactory = httpFactory; - - // public async Task LoadTrackByIdAsync(string videoId) - // { - // using var http = new HttpClient(); - // http.DefaultRequestHeaders.Add("X-YouTube-Client-Name", "1"); - // http.DefaultRequestHeaders.Add("X-YouTube-Client-Version", "2.20210520.09.00"); - // http.DefaultRequestHeaders.Add("Cookie", "CONSENT=YES+cb.20210530-19-p0.en+FX+071;"); - // - // var responseString = await http.GetStringAsync($"https://youtube.com?" + - // $"pbj=1" + - // $"&hl=en" + - // $"&v=" + videoId); - // - // var jsonDoc = JsonDocument.Parse(responseString).RootElement; - // var elem = jsonDoc.EnumerateArray() - // .FirstOrDefault(x => x.TryGetProperty("page", out var elem) && elem.GetString() == "watch"); - // - // var formatsJsonArray = elem.GetProperty("streamingdata") - // .GetProperty("formats") - // .GetRawText(); - // - // var formats = JsonSerializer.Deserialize>(formatsJsonArray); - // var result = formats - // .Where(x => x.MimeType.StartsWith("audio/")) - // .OrderByDescending(x => x.Bitrate) - // .FirstOrDefault(); - // - // if (result is null) - // return null; - // - // return new YtTrackInfo("1", "2", TimeSpan.Zero); - // } - - public async Task> LoadResultsAsync(string query) - { - query = Uri.EscapeDataString(query); - - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Add("Cookie", "CONSENT=YES+cb.20210530-19-p0.en+FX+071;"); - - byte[] response; - try - { - response = await http.GetByteArrayAsync($"https://youtube.com/results?hl=en&search_query={query}"); - } - catch (HttpRequestException ex) - { - Log.Warning("Unable to retrieve data with YtLoader: {ErrorMessage}", ex.Message); - return null; - } - - // there is a lot of useless html above the script tag, however if html gets significantly reduced - // this will result in the json being cut off - - var mem = GetScriptResponseSpan(response); - var root = JsonDocument.Parse(mem).RootElement; - - using var tracksJsonItems = root - .GetProperty("contents") - .GetProperty("twoColumnSearchResultsRenderer") - .GetProperty("primaryContents") - .GetProperty("sectionListRenderer") - .GetProperty("contents")[0] - .GetProperty("itemSectionRenderer") - .GetProperty("contents") - .EnumerateArray(); - - var tracks = new List(); - foreach (var track in tracksJsonItems) - { - if (!track.TryGetProperty("videoRenderer", out var elem)) - continue; - - var videoId = elem.GetProperty("videoId").GetString(); - var thumb = elem.GetProperty("thumbnail").GetProperty("thumbnails")[0].GetProperty("url").GetString(); - var title = elem.GetProperty("title").GetProperty("runs")[0].GetProperty("text").GetString(); - var durationString = elem.GetProperty("lengthText").GetProperty("simpleText").GetString(); - - if (!TimeSpan.TryParseExact(durationString, - _durationFormats, - CultureInfo.InvariantCulture, - out var duration)) - { - Log.Warning("Cannot parse duration: {DurationString}", durationString); - continue; - } - - tracks.Add(new YtTrackInfo(title, videoId, thumb, duration)); - if (tracks.Count >= 5) - break; - } - - return tracks; - } - - private Memory GetScriptResponseSpan(byte[] response) - { - var responseSpan = response.AsSpan()[140_000..]; - var startIndex = responseSpan.IndexOf(_ytResultInitialData); - if (startIndex == -1) - return null; // FUTURE try selecting html - startIndex += _ytResultInitialData.Length; - - var endIndex = - 140_000 + startIndex + responseSpan[(startIndex + 20_000)..].IndexOf(_ytResultJsonEnd) + 20_000; - startIndex += 140_000; - return response.AsMemory(startIndex, endIndex - startIndex); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/ICachableTrackData.cs b/src/EllieBot/Modules/Music/_common/ICachableTrackData.cs deleted file mode 100644 index 020e074..0000000 --- a/src/EllieBot/Modules/Music/_common/ICachableTrackData.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public interface ICachableTrackData -{ - string Id { get; set; } - string Url { get; set; } - string Thumbnail { get; set; } - public TimeSpan Duration { get; } - MusicPlatform Platform { get; set; } - string Title { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/ILocalTrackResolver.cs b/src/EllieBot/Modules/Music/_common/ILocalTrackResolver.cs deleted file mode 100644 index f4ea2bf..0000000 --- a/src/EllieBot/Modules/Music/_common/ILocalTrackResolver.cs +++ /dev/null @@ -1,7 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public interface ILocalTrackResolver : IPlatformQueryResolver -{ - IAsyncEnumerable ResolveDirectoryAsync(string dirPath); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IMusicPlayer.cs b/src/EllieBot/Modules/Music/_common/IMusicPlayer.cs deleted file mode 100644 index a593a57..0000000 --- a/src/EllieBot/Modules/Music/_common/IMusicPlayer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Music; - -public interface IMusicPlayer : IDisposable -{ - float Volume { get; } - bool IsPaused { get; } - bool IsStopped { get; } - bool IsKilled { get; } - int CurrentIndex { get; } - public PlayerRepeatType Repeat { get; } - bool AutoPlay { get; set; } - - void Stop(); - void Clear(); - IReadOnlyCollection GetQueuedTracks(); - IQueuedTrackInfo? GetCurrentTrack(out int index); - void Next(); - bool MoveTo(int index); - void SetVolume(int newVolume); - - void Kill(); - bool TryRemoveTrackAt(int index, out IQueuedTrackInfo? trackInfo); - - - Task<(IQueuedTrackInfo? QueuedTrack, int Index)> TryEnqueueTrackAsync( - string query, - string queuer, - bool asNext, - MusicPlatform? forcePlatform = null); - - Task EnqueueManyAsync(IEnumerable<(string Query, MusicPlatform Platform)> queries, string queuer); - bool TogglePause(); - IQueuedTrackInfo? MoveTrack(int from, int to); - void EnqueueTrack(ITrackInfo track, string queuer); - void EnqueueTracks(IEnumerable tracks, string queuer); - void SetRepeat(PlayerRepeatType type); - void ShuffleQueue(); - void SetFairplay(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IMusicQueue.cs b/src/EllieBot/Modules/Music/_common/IMusicQueue.cs deleted file mode 100644 index 5d4d24b..0000000 --- a/src/EllieBot/Modules/Music/_common/IMusicQueue.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace EllieBot.Modules.Music; - -public interface IMusicQueue -{ - int Index { get; } - int Count { get; } - IQueuedTrackInfo Enqueue(ITrackInfo trackInfo, string queuer, out int index); - IQueuedTrackInfo EnqueueNext(ITrackInfo song, string queuer, out int index); - - void EnqueueMany(IEnumerable tracks, string queuer); - - public IReadOnlyCollection List(); - IQueuedTrackInfo? GetCurrent(out int index); - void Advance(); - void Clear(); - bool SetIndex(int index); - bool TryRemoveAt(int index, out IQueuedTrackInfo? trackInfo, out bool isCurrent); - void RemoveCurrent(); - IQueuedTrackInfo? MoveTrack(int from, int to); - void Shuffle(Random rng); - bool IsLast(); - void ReorderFairly(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IPlatformQueryResolver.cs b/src/EllieBot/Modules/Music/_common/IPlatformQueryResolver.cs deleted file mode 100644 index fa282ed..0000000 --- a/src/EllieBot/Modules/Music/_common/IPlatformQueryResolver.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Music; - -public interface IPlatformQueryResolver -{ - Task ResolveByQueryAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IQueuedTrackInfo.cs b/src/EllieBot/Modules/Music/_common/IQueuedTrackInfo.cs deleted file mode 100644 index 5093cd9..0000000 --- a/src/EllieBot/Modules/Music/_common/IQueuedTrackInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public interface IQueuedTrackInfo : ITrackInfo -{ - public ITrackInfo TrackInfo { get; } - - public string Queuer { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IRadioResolver.cs b/src/EllieBot/Modules/Music/_common/IRadioResolver.cs deleted file mode 100644 index 86a6ba5..0000000 --- a/src/EllieBot/Modules/Music/_common/IRadioResolver.cs +++ /dev/null @@ -1,6 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public interface IRadioResolver : IPlatformQueryResolver -{ -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/ITrackCacher.cs b/src/EllieBot/Modules/Music/_common/ITrackCacher.cs deleted file mode 100644 index d55cd65..0000000 --- a/src/EllieBot/Modules/Music/_common/ITrackCacher.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace EllieBot.Modules.Music; - -public interface ITrackCacher -{ - Task GetOrCreateStreamLink( - string id, - MusicPlatform platform, - Func> streamUrlFactory); - - Task CacheTrackDataAsync(ICachableTrackData data); - Task GetCachedDataByIdAsync(string id, MusicPlatform platform); - Task GetCachedDataByQueryAsync(string query, MusicPlatform platform); - Task CacheTrackDataByQueryAsync(string query, ICachableTrackData data); - - Task CacheStreamUrlAsync( - string id, - MusicPlatform platform, - string url, - TimeSpan expiry); - - Task> GetPlaylistTrackIdsAsync(string playlistId, MusicPlatform platform); - Task CachePlaylistTrackIdsAsync(string playlistId, MusicPlatform platform, IEnumerable ids); - Task CachePlaylistIdByQueryAsync(string query, MusicPlatform platform, string playlistId); - Task GetPlaylistIdByQueryAsync(string query, MusicPlatform platform); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs b/src/EllieBot/Modules/Music/_common/ITrackInfo.cs deleted file mode 100644 index 3525b59..0000000 --- a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EllieBot.Modules.Music; - -public interface ITrackInfo -{ - public string Id => string.Empty; - public string Title { get; } - public string Url { get; } - public string Thumbnail { get; } - public TimeSpan Duration { get; } - public MusicPlatform Platform { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/ITrackResolveProvider.cs b/src/EllieBot/Modules/Music/_common/ITrackResolveProvider.cs deleted file mode 100644 index ae3d1e6..0000000 --- a/src/EllieBot/Modules/Music/_common/ITrackResolveProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Music; - -public interface ITrackResolveProvider -{ - Task QuerySongAsync(string query, MusicPlatform? forcePlatform); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IVoiceProxy.cs b/src/EllieBot/Modules/Music/_common/IVoiceProxy.cs deleted file mode 100644 index d88e51c..0000000 --- a/src/EllieBot/Modules/Music/_common/IVoiceProxy.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -using EllieBot.Voice; - -namespace EllieBot.Modules.Music; - -public interface IVoiceProxy -{ - VoiceProxy.VoiceProxyState State { get; } - public bool SendPcmFrame(VoiceClient vc, Span data, int length); - public void SetGateway(VoiceGateway gateway); - Task StartSpeakingAsync(); - Task StopSpeakingAsync(); - public Task StartGateway(); - Task StopGateway(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs deleted file mode 100644 index e4c2f53..0000000 --- a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Music; - -public interface IYoutubeResolver : IPlatformQueryResolver -{ - public Task ResolveByIdAsync(string id); - IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query); - Task ResolveByQueryAsync(string query, bool tryExtractingId); - Task GetStreamUrl(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/CachableTrackData.cs b/src/EllieBot/Modules/Music/_common/Impl/CachableTrackData.cs deleted file mode 100644 index 4e663ad..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/CachableTrackData.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Music; - -public sealed class CachableTrackData : ICachableTrackData -{ - public string Title { get; set; } = string.Empty; - public string Id { get; set; } = string.Empty; - public string Url { get; set; } = string.Empty; - public string Thumbnail { get; set; } = string.Empty; - public double TotalDurationMs { get; set; } - - [JsonIgnore] - public TimeSpan Duration - => TimeSpan.FromMilliseconds(TotalDurationMs); - - public MusicPlatform Platform { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MultimediaTimer.cs b/src/EllieBot/Modules/Music/_common/Impl/MultimediaTimer.cs deleted file mode 100644 index 9c8a9a3..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/MultimediaTimer.cs +++ /dev/null @@ -1,95 +0,0 @@ -#nullable disable -using System.Runtime.InteropServices; - -namespace EllieBot.Modules.Music.Common; - -public sealed class MultimediaTimer : IDisposable -{ - private LpTimeProcDelegate lpTimeProc; - private readonly uint _eventId; - private readonly Action _callback; - private readonly object _state; - - public MultimediaTimer(Action callback, object state, int period) - { - if (period <= 0) - throw new ArgumentOutOfRangeException(nameof(period), "Period must be greater than 0"); - - _callback = callback; - _state = state; - - lpTimeProc = CallbackInternal; - _eventId = timeSetEvent((uint)period, 1, lpTimeProc, 0, TimerMode.Periodic); - } - - /// - /// The timeSetEvent function starts a specified timer event. The multimedia timer runs in its own thread. - /// After the event is activated, it calls the specified callback function or sets or pulses the specified - /// event object. - /// - /// - /// Event delay, in milliseconds. If this value is not in the range of the minimum and - /// maximum event delays supported by the timer, the function returns an error. - /// - /// - /// Resolution of the timer event, in milliseconds. The resolution increases with - /// smaller values; a resolution of 0 indicates periodic events should occur with the greatest possible accuracy. - /// To reduce system overhead, however, you should use the maximum value appropriate for your application. - /// - /// - /// Pointer to a callback function that is called once upon expiration of a single event or periodically upon - /// expiration of periodic events. If fuEvent specifies the TIME_CALLBACK_EVENT_SET or TIME_CALLBACK_EVENT_PULSE - /// flag, then the lpTimeProc parameter is interpreted as a handle to an event object. The event will be set or - /// pulsed upon completion of a single event or periodically upon completion of periodic events. - /// For any other value of fuEvent, the lpTimeProc parameter is a pointer to a callback function of type - /// LPTIMECALLBACK. - /// - /// User-supplied callback data. - /// - /// Timer event type. This parameter may include one of the following values. - [DllImport("Winmm.dll")] - private static extern uint timeSetEvent( - uint uDelay, - uint uResolution, - LpTimeProcDelegate lpTimeProc, - int dwUser, - TimerMode fuEvent); - - /// - /// The timeKillEvent function cancels a specified timer event. - /// - /// - /// Identifier of the timer event to cancel. - /// This identifier was returned by the timeSetEvent function when the timer event was set up. - /// - /// Returns TIMERR_NOERROR if successful or MMSYSERR_INVALPARAM if the specified timer event does not exist. - [DllImport("Winmm.dll")] - private static extern int timeKillEvent(uint uTimerId); - - private void CallbackInternal( - uint uTimerId, - uint uMsg, - int dwUser, - int dw1, - int dw2) - => _callback(_state); - - public void Dispose() - { - lpTimeProc = default; - timeKillEvent(_eventId); - } - - private delegate void LpTimeProcDelegate( - uint uTimerId, - uint uMsg, - int dwUser, - int dw1, - int dw2); - - private enum TimerMode - { - OneShot, - Periodic - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicExtensions.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicExtensions.cs deleted file mode 100644 index cab883b..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicExtensions.cs +++ /dev/null @@ -1,57 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public static class MusicExtensions -{ - public static string PrettyTotalTime(this IMusicPlayer mp) - { - long sum = 0; - foreach (var track in mp.GetQueuedTracks()) - { - if (track.Duration == TimeSpan.MaxValue) - return "∞"; - - sum += track.Duration.Ticks; - } - - var total = new TimeSpan(sum); - - return total.ToString(@"hh\:mm\:ss"); - } - - public static string PrettyVolume(this IMusicPlayer mp) - => $"🔉 {(int)(mp.Volume * 100)}%"; - - public static string PrettyName(this ITrackInfo trackInfo) - => $"**[{trackInfo.Title.TrimTo(60).Replace("[", "\\[").Replace("]", "\\]")}]({trackInfo.Url.TrimTo(50, true)})**"; - - public static string PrettyInfo(this IQueuedTrackInfo trackInfo) - => $"{trackInfo.PrettyTotalTime()} | {trackInfo.Platform} | {trackInfo.Queuer}"; - - public static string PrettyFullName(this IQueuedTrackInfo trackInfo) - => $@"{trackInfo.PrettyName()} - `{trackInfo.PrettyTotalTime()} | {trackInfo.Platform} | {Format.Sanitize(trackInfo.Queuer.TrimTo(15))}`"; - - public static string PrettyTotalTime(this ITrackInfo trackInfo) - { - if (trackInfo.Duration == TimeSpan.Zero) - return "(?)"; - if (trackInfo.Duration == TimeSpan.MaxValue) - return "∞"; - if (trackInfo.Duration.TotalHours >= 1) - return trackInfo.Duration.ToString("""hh\:mm\:ss"""); - - return trackInfo.Duration.ToString("""mm\:ss"""); - } - - public static ICachableTrackData ToCachedData(this ITrackInfo trackInfo, string id) - => new CachableTrackData - { - TotalDurationMs = trackInfo.Duration.TotalMilliseconds, - Id = id, - Thumbnail = trackInfo.Thumbnail, - Url = trackInfo.Url, - Platform = trackInfo.Platform, - Title = trackInfo.Title - }; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicPlatform.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicPlatform.cs deleted file mode 100644 index 0d6c149..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicPlatform.cs +++ /dev/null @@ -1,9 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Music; - -public enum MusicPlatform -{ - Radio, - Youtube, - Local, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs deleted file mode 100644 index 0edd3cf..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs +++ /dev/null @@ -1,545 +0,0 @@ -using EllieBot.Voice; -using EllieBot.Db.Models; -using EllieBot.Modules.Music.Resolvers; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace EllieBot.Modules.Music; - -public sealed class MusicPlayer : IMusicPlayer -{ - public event Func? OnCompleted; - public event Func? OnStarted; - public event Func? OnQueueStopped; - public bool IsKilled { get; private set; } - public bool IsStopped { get; private set; } - public bool IsPaused { get; private set; } - public PlayerRepeatType Repeat { get; private set; } - - public int CurrentIndex - => _queue.Index; - - public float Volume { get; private set; } = 1.0f; - - private readonly AdjustVolumeDelegate _adjustVolume; - private readonly VoiceClient _vc; - - private readonly IMusicQueue _queue; - private readonly ITrackResolveProvider _trackResolveProvider; - private readonly IYoutubeResolverFactory _ytResolverFactory; - private readonly IVoiceProxy _proxy; - private readonly IGoogleApiService _googleApiService; - private readonly ISongBuffer _songBuffer; - - private bool skipped; - private int? forceIndex; - private readonly Thread _thread; - private readonly Random _rng; - - public bool AutoPlay { get; set; } - - public MusicPlayer( - IMusicQueue queue, - ITrackResolveProvider trackResolveProvider, - IYoutubeResolverFactory ytResolverFactory, - IVoiceProxy proxy, - IGoogleApiService googleApiService, - QualityPreset qualityPreset, - bool autoPlay) - { - _queue = queue; - _trackResolveProvider = trackResolveProvider; - _ytResolverFactory = ytResolverFactory; - _proxy = proxy; - _googleApiService = googleApiService; - AutoPlay = autoPlay; - _rng = new EllieRandom(); - - _vc = GetVoiceClient(qualityPreset); - if (_vc.BitDepth == 16) - _adjustVolume = AdjustVolumeInt16; - else - _adjustVolume = AdjustVolumeFloat32; - - _songBuffer = new PoopyBufferImmortalized(_vc.InputLength); - - _thread = new(async () => { await PlayLoop(); }); - _thread.Start(); - } - - private static VoiceClient GetVoiceClient(QualityPreset qualityPreset) - => qualityPreset switch - { - QualityPreset.Highest => new(), - QualityPreset.High => new(SampleRate._48k, Bitrate._128k, Channels.Two, FrameDelay.Delay40), - QualityPreset.Medium => new(SampleRate._48k, - Bitrate._96k, - Channels.Two, - FrameDelay.Delay40, - BitDepthEnum.UInt16), - QualityPreset.Low => new(SampleRate._48k, - Bitrate._64k, - Channels.Two, - FrameDelay.Delay40, - BitDepthEnum.UInt16), - _ => throw new ArgumentOutOfRangeException(nameof(qualityPreset), qualityPreset, null) - }; - - private async Task PlayLoop() - { - var sw = new Stopwatch(); - - while (!IsKilled) - { - // wait until a song is available in the queue - // or until the queue is resumed - var track = _queue.GetCurrent(out var index); - - if (track is null || IsStopped) - { - await Task.Delay(500); - continue; - } - - if (skipped) - { - skipped = false; - _queue.Advance(); - continue; - } - - using var cancellationTokenSource = new CancellationTokenSource(); - var token = cancellationTokenSource.Token; - try - { - // light up green in vc - _ = _proxy.StartSpeakingAsync(); - - _ = OnStarted?.Invoke(this, track, index); - - // make sure song buffer is ready to be (re)used - _songBuffer.Reset(); - - var streamUrl = await GetStreamUrl(track); - // start up the data source - using var source = FfmpegTrackDataSource.CreateAsync( - _vc.BitDepth, - streamUrl, - track.Platform == MusicPlatform.Local); - - // start moving data from the source into the buffer - // this method will return once the sufficient prebuffering is done - await _songBuffer.BufferAsync(source, token); - - // // Implemenation with multimedia timer. Works but a hassle because no support for switching - // // vcs, as any error in copying will cancel the song. Also no idea how to use this as an option - // // for selfhosters. - // if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - // { - // var cancelSource = new CancellationTokenSource(); - // var cancelToken = cancelSource.Token; - // using var timer = new MultimediaTimer(_ => - // { - // if (IsStopped || IsKilled) - // { - // cancelSource.Cancel(); - // return; - // } - // - // if (_skipped) - // { - // _skipped = false; - // cancelSource.Cancel(); - // return; - // } - // - // if (IsPaused) - // return; - // - // try - // { - // // this should tolerate certain number of errors - // var result = CopyChunkToOutput(_songBuffer, _vc); - // if (!result) - // cancelSource.Cancel(); - // - // } - // catch (Exception ex) - // { - // Log.Warning(ex, "Something went wrong sending voice data: {ErrorMessage}", ex.Message); - // cancelSource.Cancel(); - // } - // - // }, null, 20); - // - // while(true) - // await Task.Delay(1000, cancelToken); - // } - - // start sending data - var ticksPerMs = 1000f / Stopwatch.Frequency; - sw.Start(); - Thread.Sleep(2); - - var delay = sw.ElapsedTicks * ticksPerMs > 3f ? _vc.Delay - 16 : _vc.Delay - 3; - - var errorCount = 0; - while (!IsStopped && !IsKilled) - { - // doing the skip this way instead of in the condition - // ensures that a song will for sure be skipped - if (skipped) - { - skipped = false; - break; - } - - if (IsPaused) - { - await Task.Delay(200); - continue; - } - - sw.Restart(); - var ticks = sw.ElapsedTicks; - try - { - var result = CopyChunkToOutput(_songBuffer, _vc); - - // if song is finished - if (result is null) - break; - - if (result is true) - { - if (errorCount > 0) - { - _ = _proxy.StartSpeakingAsync(); - errorCount = 0; - } - - // FUTURE windows multimedia api - - // wait for slightly less than the latency - Thread.Sleep(delay); - - // and then spin out the rest - while ((sw.ElapsedTicks - ticks) * ticksPerMs <= _vc.Delay - 0.1f) - Thread.SpinWait(100); - } - else - { - // result is false is either when the gateway is being swapped - // or if the bot is reconnecting, or just disconnected for whatever reason - - // tolerate up to 15x200ms of failures (3 seconds) - if (++errorCount <= 15) - { - await Task.Delay(200); - continue; - } - - Log.Warning("Can't send data to voice channel"); - - IsStopped = true; - // if errors are happening for more than 3 seconds - // Stop the player - break; - } - } - catch (Exception ex) - { - Log.Warning(ex, "Something went wrong sending voice data: {ErrorMessage}", ex.Message); - } - } - } - catch (Win32Exception) - { - IsStopped = true; - Log.Error("Please install ffmpeg and make sure it's added to your " - + "PATH environment variable before trying again"); - - } - catch (OperationCanceledException) - { - Log.Information("Song skipped"); - } - catch (Exception ex) - { - Log.Error(ex, "Unknown error in music loop: {ErrorMessage}", ex.Message); - await Task.Delay(3_000); - } - finally - { - cancellationTokenSource.Cancel(); - // turn off green in vc - - _ = OnCompleted?.Invoke(this, track); - - if (AutoPlay && track.Platform == MusicPlatform.Youtube) - { - try - { - var relatedSongs = await _googleApiService.GetRelatedVideosAsync(track.TrackInfo.Id, 5); - var related = relatedSongs.Shuffle().FirstOrDefault(); - if (related is not null) - { - var relatedTrack = - await _trackResolveProvider.QuerySongAsync(related, MusicPlatform.Youtube); - if (relatedTrack is not null) - EnqueueTrack(relatedTrack, "Autoplay"); - } - } - catch (Exception ex) - { - Log.Warning(ex, "Failed queueing a related song via autoplay"); - } - } - - - HandleQueuePostTrack(); - skipped = false; - - _ = _proxy.StopSpeakingAsync(); - - await Task.Delay(100); - } - } - } - - private async Task GetStreamUrl(IQueuedTrackInfo track) - { - if (track.TrackInfo is SimpleTrackInfo sti) - return sti.StreamUrl; - - return await _ytResolverFactory.GetYoutubeResolver().GetStreamUrl(track.TrackInfo.Id); - } - - private bool? CopyChunkToOutput(ISongBuffer sb, VoiceClient vc) - { - var data = sb.Read(vc.InputLength, out var length); - - // if nothing is read from the buffer, song is finished - if (data.Length == 0) - return null; - - _adjustVolume(data, Volume); - return _proxy.SendPcmFrame(vc, data, length); - } - - private void HandleQueuePostTrack() - { - if (forceIndex is { } index) - { - _queue.SetIndex(index); - forceIndex = null; - return; - } - - var (repeat, isStopped) = (Repeat, IsStopped); - - if (repeat == PlayerRepeatType.Track || isStopped) - return; - - // if queue is being repeated, advance no matter what - if (repeat == PlayerRepeatType.None) - { - // if this is the last song, - // stop the queue - if (_queue.IsLast()) - { - IsStopped = true; - OnQueueStopped?.Invoke(this); - return; - } - - _queue.Advance(); - return; - } - - _queue.Advance(); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void AdjustVolumeInt16(Span audioSamples, float volume) - { - if (Math.Abs(volume - 1f) < 0.0001f) - return; - - var samples = MemoryMarshal.Cast(audioSamples); - - for (var i = 0; i < samples.Length; i++) - { - ref var sample = ref samples[i]; - sample = (short)(sample * volume); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void AdjustVolumeFloat32(Span audioSamples, float volume) - { - if (Math.Abs(volume - 1f) < 0.0001f) - return; - - var samples = MemoryMarshal.Cast(audioSamples); - - for (var i = 0; i < samples.Length; i++) - { - ref var sample = ref samples[i]; - sample *= volume; - } - } - - public async Task<(IQueuedTrackInfo? QueuedTrack, int Index)> TryEnqueueTrackAsync( - string query, - string queuer, - bool asNext, - MusicPlatform? forcePlatform = null) - { - var song = await _trackResolveProvider.QuerySongAsync(query, forcePlatform); - if (song is null) - return default; - - int index; - - if (asNext) - return (_queue.EnqueueNext(song, queuer, out index), index); - - return (_queue.Enqueue(song, queuer, out index), index); - } - - public async Task EnqueueManyAsync(IEnumerable<(string Query, MusicPlatform Platform)> queries, string queuer) - { - var errorCount = 0; - foreach (var chunk in queries.Chunk(5)) - { - if (IsKilled) - break; - - await chunk.Select(async data => - { - var (query, platform) = data; - try - { - await TryEnqueueTrackAsync(query, queuer, false, platform); - errorCount = 0; - } - catch (Exception ex) - { - Log.Warning(ex, "Error resolving {MusicPlatform} Track {TrackQuery}", platform, query); - ++errorCount; - } - }) - .WhenAll(); - - await Task.Delay(1000); - - // > 10 errors in a row = kill - if (errorCount > 10) - break; - } - } - - public void EnqueueTrack(ITrackInfo track, string queuer) - => _queue.Enqueue(track, queuer, out _); - - public void EnqueueTracks(IEnumerable tracks, string queuer) - => _queue.EnqueueMany(tracks, queuer); - - public void SetRepeat(PlayerRepeatType type) - => Repeat = type; - - public void ShuffleQueue() - => _queue.Shuffle(_rng); - - public void Stop() - => IsStopped = true; - - public void Clear() - { - _queue.Clear(); - skipped = true; - } - - public IReadOnlyCollection GetQueuedTracks() - => _queue.List(); - - public IQueuedTrackInfo? GetCurrentTrack(out int index) - => _queue.GetCurrent(out index); - - public void Next() - { - skipped = true; - IsStopped = false; - IsPaused = false; - } - - public bool MoveTo(int index) - { - if (_queue.SetIndex(index)) - { - forceIndex = index; - skipped = true; - IsStopped = false; - IsPaused = false; - return true; - } - - return false; - } - - public void SetVolume(int newVolume) - { - var normalizedVolume = newVolume / 100f; - if (normalizedVolume is < 0f or > 1f) - throw new ArgumentOutOfRangeException(nameof(newVolume), "Volume must be in range 0-100"); - - Volume = normalizedVolume; - } - - public void Kill() - { - IsKilled = true; - IsStopped = true; - IsPaused = false; - skipped = true; - } - - public bool TryRemoveTrackAt(int index, out IQueuedTrackInfo? trackInfo) - { - if (!_queue.TryRemoveAt(index, out trackInfo, out var isCurrent)) - return false; - - if (isCurrent) - skipped = true; - - return true; - } - - public bool TogglePause() - => IsPaused = !IsPaused; - - public IQueuedTrackInfo? MoveTrack(int from, int to) - => _queue.MoveTrack(from, to); - - public void Dispose() - { - IsKilled = true; - OnCompleted = null; - OnStarted = null; - OnQueueStopped = null; - _queue.Clear(); - _songBuffer.Dispose(); - _vc.Dispose(); - } - - private delegate void AdjustVolumeDelegate(Span data, float volume); - - public void SetFairplay() - { - _queue.ReorderFairly(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs deleted file mode 100644 index 9b1c7aa..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs +++ /dev/null @@ -1,342 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed partial class MusicQueue -{ - private sealed class QueuedTrackInfo : IQueuedTrackInfo - { - public ITrackInfo TrackInfo { get; } - public string Queuer { get; } - - public string Title - => TrackInfo.Title; - - public string Url - => TrackInfo.Url; - - public string Thumbnail - => TrackInfo.Thumbnail; - - public TimeSpan Duration - => TrackInfo.Duration; - - public MusicPlatform Platform - => TrackInfo.Platform; - - - public QueuedTrackInfo(ITrackInfo trackInfo, string queuer) - { - TrackInfo = trackInfo; - Queuer = queuer; - } - } -} - -public sealed partial class MusicQueue : IMusicQueue -{ - public int Index - { - get - { - // just make sure the internal logic runs first - // to make sure that some potential intermediate value is not returned - lock (_locker) - { - return index; - } - } - } - - public int Count - { - get - { - lock (_locker) - { - return tracks.Count; - } - } - } - - private LinkedList tracks; - - private int index; - - private readonly object _locker = new(); - - public MusicQueue() - { - index = 0; - tracks = new(); - } - - public IQueuedTrackInfo Enqueue(ITrackInfo trackInfo, string queuer, out int enqueuedAt) - { - lock (_locker) - { - var added = new QueuedTrackInfo(trackInfo, queuer); - enqueuedAt = tracks.Count; - tracks.AddLast(added); - - return added; - } - } - - - public IQueuedTrackInfo EnqueueNext(ITrackInfo trackInfo, string queuer, out int trackIndex) - { - lock (_locker) - { - if (tracks.Count == 0) - return Enqueue(trackInfo, queuer, out trackIndex); - - var currentNode = tracks.First!; - int i; - for (i = 1; i <= index; i++) - currentNode = currentNode.Next!; // can't be null because index is always in range of the count - - var added = new QueuedTrackInfo(trackInfo, queuer); - trackIndex = i; - - tracks.AddAfter(currentNode, added); - - return added; - } - } - - public void EnqueueMany(IEnumerable toEnqueue, string queuer) - { - lock (_locker) - { - foreach (var track in toEnqueue) - { - var added = new QueuedTrackInfo(track, queuer); - tracks.AddLast(added); - } - } - } - - public IReadOnlyCollection List() - { - lock (_locker) - { - return tracks.ToList(); - } - } - - public IQueuedTrackInfo? GetCurrent(out int currentIndex) - { - lock (_locker) - { - currentIndex = index; - return tracks.ElementAtOrDefault(index); - } - } - - public void Advance() - { - lock (_locker) - { - if (++index >= tracks.Count) - index = 0; - } - } - - public void Clear() - { - lock (_locker) - { - tracks.Clear(); - } - } - - public bool SetIndex(int newIndex) - { - lock (_locker) - { - if (newIndex < 0 || newIndex >= tracks.Count) - return false; - - index = newIndex; - return true; - } - } - - private void RemoveAtInternal(int remoteAtIndex, out IQueuedTrackInfo trackInfo) - { - var removedNode = tracks.First!; - int i; - for (i = 0; i < remoteAtIndex; i++) - removedNode = removedNode.Next!; - - trackInfo = removedNode.Value; - tracks.Remove(removedNode); - - if (i <= index) - --index; - - if (index < 0) - index = Count; - - // if it was the last song in the queue - // // wrap back to start - // if (_index == Count) - // _index = 0; - // else if (i <= _index) - // if (_index == 0) - // _index = Count; - // else --_index; - } - - public void RemoveCurrent() - { - lock (_locker) - { - if (index < tracks.Count) - RemoveAtInternal(index, out _); - } - } - - public IQueuedTrackInfo? MoveTrack(int from, int to) - { - ArgumentOutOfRangeException.ThrowIfNegative(from); - ArgumentOutOfRangeException.ThrowIfNegative(to); - ArgumentOutOfRangeException.ThrowIfEqual(to, from); - - lock (_locker) - { - if (from >= Count || to >= Count) - return null; - - // update current track index - if (from == index) - { - // if the song being moved is the current track - // it means that it will for sure end up on the destination - index = to; - } - else - { - // moving a track from below the current track means - // means it will drop down - if (from < index) - index--; - - // moving a track to below the current track - // means it will rise up - if (to <= index) - index++; - - - // if both from and to are below _index - net change is + 1 - 1 = 0 - // if from is below and to is above - net change is -1 (as the track is taken and put above) - // if from is above and to is below - net change is 1 (as the track is inserted under) - // if from is above and to is above - net change is 0 - } - - // get the node which needs to be moved - var fromNode = tracks.First!; - for (var i = 0; i < from; i++) - fromNode = fromNode.Next!; - - // remove it from the queue - tracks.Remove(fromNode); - - // if it needs to be added as a first node, - // add it directly and return - if (to == 0) - { - tracks.AddFirst(fromNode); - return fromNode.Value; - } - - // else find the node at the index before the specified target - var addAfterNode = tracks.First!; - for (var i = 1; i < to; i++) - addAfterNode = addAfterNode.Next!; - - // and add after it - tracks.AddAfter(addAfterNode, fromNode); - return fromNode.Value; - } - } - - public void Shuffle(Random rng) - { - lock (_locker) - { - var list = tracks.ToArray(); - rng.Shuffle(list); - tracks = new(list); - } - } - - public bool IsLast() - { - lock (_locker) - { - return index == tracks.Count // if there are no tracks - || index == tracks.Count - 1; - } - } - - public void ReorderFairly() - { - lock (_locker) - { - var groups = new Dictionary(); - var queuers = new List>(); - - foreach (var track in tracks.Skip(index).Concat(tracks.Take(index))) - { - if (!groups.TryGetValue(track.Queuer, out var qIndex)) - { - queuers.Add(new Queue()); - qIndex = queuers.Count - 1; - groups.Add(track.Queuer, qIndex); - } - - queuers[qIndex].Enqueue(track); - } - - tracks = new LinkedList(); - index = 0; - - while (true) - { - for (var i = 0; i < queuers.Count; i++) - { - var queue = queuers[i]; - tracks.AddLast(queue.Dequeue()); - - if (queue.Count == 0) - { - queuers.RemoveAt(i); - i--; - } - } - - if (queuers.Count == 0) - break; - } - } - } - - public bool TryRemoveAt(int remoteAt, out IQueuedTrackInfo? trackInfo, out bool isCurrent) - { - lock (_locker) - { - isCurrent = false; - trackInfo = null; - - if (remoteAt < 0 || remoteAt >= tracks.Count) - return false; - - if (remoteAt == index) - isCurrent = true; - - RemoveAtInternal(remoteAt, out trackInfo); - - return true; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs deleted file mode 100644 index c6fbf10..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed record RemoteTrackInfo( - string Id, - string Title, - string Url, - string Thumbnail, - TimeSpan Duration, - - MusicPlatform Platform) : ITrackInfo; \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs deleted file mode 100644 index c7828cc..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed class SimpleTrackInfo : ITrackInfo -{ - public string Title { get; } - public string Url { get; } - public string Thumbnail { get; } - public TimeSpan Duration { get; } - public MusicPlatform Platform { get; } - public string? StreamUrl { get; } - - public SimpleTrackInfo( - string title, - string url, - string thumbnail, - TimeSpan duration, - MusicPlatform platform, - string streamUrl) - { - Title = title; - Url = url; - Thumbnail = thumbnail; - Duration = duration; - Platform = platform; - StreamUrl = streamUrl; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/TrackCacher.cs b/src/EllieBot/Modules/Music/_common/Impl/TrackCacher.cs deleted file mode 100644 index 2dcffcc..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/TrackCacher.cs +++ /dev/null @@ -1,105 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed class TrackCacher : ITrackCacher -{ - private readonly IBotCache _cache; - - public TrackCacher(IBotCache cache) - => _cache = cache; - - - private TypedKey GetStreamLinkKey(MusicPlatform platform, string id) - => new($"music:stream:{platform}:{id}"); - - public async Task GetOrCreateStreamLink( - string id, - MusicPlatform platform, - Func> streamUrlFactory) - { - var key = GetStreamLinkKey(platform, id); - - var streamUrl = await _cache.GetOrDefaultAsync(key); - await _cache.RemoveAsync(key); - - if (streamUrl == default) - { - (streamUrl, _) = await streamUrlFactory(); - } - - // make a new one for later use - _ = Task.Run(async () => - { - (streamUrl, var expiry) = await streamUrlFactory(); - await CacheStreamUrlAsync(id, platform, streamUrl, expiry); - }); - - return streamUrl; - } - - public async Task CacheStreamUrlAsync( - string id, - MusicPlatform platform, - string url, - TimeSpan expiry) - => await _cache.AddAsync(GetStreamLinkKey(platform, id), url, expiry); - - // track data by id - private TypedKey GetTrackDataKey(MusicPlatform platform, string id) - => new($"music:track:{platform}:{id}"); - public async Task CacheTrackDataAsync(ICachableTrackData data) - => await _cache.AddAsync(GetTrackDataKey(data.Platform, data.Id), ToCachableTrackData(data)); - - private CachableTrackData ToCachableTrackData(ICachableTrackData data) - => new CachableTrackData() - { - Id = data.Id, - Platform = data.Platform, - Thumbnail = data.Thumbnail, - Title = data.Title, - Url = data.Url, - }; - - public async Task GetCachedDataByIdAsync(string id, MusicPlatform platform) - => await _cache.GetOrDefaultAsync(GetTrackDataKey(platform, id)); - - - // track data by query - private TypedKey GetTrackDataQueryKey(MusicPlatform platform, string query) - => new($"music:track:{platform}:q:{query}"); - - public async Task CacheTrackDataByQueryAsync(string query, ICachableTrackData data) - => await Task.WhenAll( - _cache.AddAsync(GetTrackDataQueryKey(data.Platform, query), ToCachableTrackData(data)).AsTask(), - _cache.AddAsync(GetTrackDataKey(data.Platform, data.Id), ToCachableTrackData(data)).AsTask()); - - public async Task GetCachedDataByQueryAsync(string query, MusicPlatform platform) - => await _cache.GetOrDefaultAsync(GetTrackDataQueryKey(platform, query)); - - - // playlist track ids by playlist id - private TypedKey> GetPlaylistTracksCacheKey(string playlist, MusicPlatform platform) - => new($"music:playlist_tracks:{platform}:{playlist}"); - - public async Task CachePlaylistTrackIdsAsync(string playlistId, MusicPlatform platform, IEnumerable ids) - => await _cache.AddAsync(GetPlaylistTracksCacheKey(playlistId, platform), ids.ToList()); - - public async Task> GetPlaylistTrackIdsAsync(string playlistId, MusicPlatform platform) - { - var result = await _cache.GetAsync(GetPlaylistTracksCacheKey(playlistId, platform)); - if (result.TryGetValue(out var val)) - return val; - - return Array.Empty(); - } - - - // playlist id by query - private TypedKey GetPlaylistCacheKey(string query, MusicPlatform platform) - => new($"music:playlist_id:{platform}:{query}"); - - public async Task CachePlaylistIdByQueryAsync(string query, MusicPlatform platform, string playlistId) - => await _cache.AddAsync(GetPlaylistCacheKey(query, platform), playlistId); - - public async Task GetPlaylistIdByQueryAsync(string query, MusicPlatform platform) - => await _cache.GetOrDefaultAsync(GetPlaylistCacheKey(query, platform)); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/VoiceProxy.cs b/src/EllieBot/Modules/Music/_common/Impl/VoiceProxy.cs deleted file mode 100644 index 08bb8b8..0000000 --- a/src/EllieBot/Modules/Music/_common/Impl/VoiceProxy.cs +++ /dev/null @@ -1,102 +0,0 @@ -#nullable disable -using EllieBot.Voice; -using EllieBot.Voice.Models; - -namespace EllieBot.Modules.Music; - -public sealed class VoiceProxy : IVoiceProxy -{ - public enum VoiceProxyState - { - Created, - Started, - Stopped - } - - private const int MAX_ERROR_COUNT = 20; - private const int DELAY_ON_ERROR_MILISECONDS = 200; - - public VoiceProxyState State - => gateway switch - { - { Started: true, Stopped: false } => VoiceProxyState.Started, - { Stopped: false } => VoiceProxyState.Created, - _ => VoiceProxyState.Stopped - }; - - - private VoiceGateway gateway; - - public VoiceProxy(VoiceGateway initial) - => gateway = initial; - - public bool SendPcmFrame(VoiceClient vc, Span data, int length) - { - try - { - var gw = gateway; - if (gw is null || gw.Stopped || !gw.Started) - return false; - - vc.SendPcmFrame(gw, data, 0, length); - return true; - } - catch (Exception) - { - return false; - } - } - - public async Task RunGatewayAction(Func action) - { - var errorCount = 0; - do - { - if (State == VoiceProxyState.Stopped) - break; - - try - { - var gw = gateway; - if (gw is null || !gw.ConnectingFinished.Task.IsCompleted) - { - ++errorCount; - await Task.Delay(DELAY_ON_ERROR_MILISECONDS); - Log.Debug("Gateway is not ready"); - continue; - } - - await action(gw); - errorCount = 0; - } - catch (Exception ex) - { - ++errorCount; - await Task.Delay(DELAY_ON_ERROR_MILISECONDS); - Log.Debug(ex, "Error performing proxy gateway action"); - } - } while (errorCount is > 0 and <= MAX_ERROR_COUNT); - - return State != VoiceProxyState.Stopped && errorCount <= MAX_ERROR_COUNT; - } - - public void SetGateway(VoiceGateway newGateway) - => gateway = newGateway; - - public Task StartSpeakingAsync() - => RunGatewayAction(gw => gw.SendSpeakingAsync(VoiceSpeaking.State.Microphone)); - - public Task StopSpeakingAsync() - => RunGatewayAction(gw => gw.SendSpeakingAsync(VoiceSpeaking.State.None)); - - public async Task StartGateway() - => await gateway.Start(); - - public Task StopGateway() - { - if (gateway is { } gw) - return gw.StopAsync(); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs deleted file mode 100644 index cca2727..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed class InvTrackInfo : ITrackInfo -{ - public required string Id { get; init; } - public required string Title { get; init; } - public required string Url { get; init; } - public required string Thumbnail { get; init; } - public required TimeSpan Duration { get; init; } - public required MusicPlatform Platform { get; init; } - public required string? StreamUrl { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs deleted file mode 100644 index 243fd13..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs +++ /dev/null @@ -1,108 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Net.Http.Json; - -namespace EllieBot.Modules.Music; - -public sealed class InvidiousYoutubeResolver : IYoutubeResolver -{ - private readonly IHttpClientFactory _httpFactory; - private readonly SearchesConfigService _sc; - private readonly EllieRandom _rng; - - private string InvidiousApiUrl - => _sc.Data.InvidiousInstances[_rng.Next(0, _sc.Data.InvidiousInstances.Count)]; - - public InvidiousYoutubeResolver(IHttpClientFactory httpFactory, SearchesConfigService sc) - { - _rng = new EllieRandom(); - _httpFactory = httpFactory; - _sc = sc; - } - - public async Task ResolveByQueryAsync(string query) - { - using var http = _httpFactory.CreateClient(); - - var items = await http.GetFromJsonAsync>( - $"{InvidiousApiUrl}/api/v1/search" - + $"?q={query}" - + $"&type=video"); - - if (items is null || items.Count == 0) - return null; - - - var res = items.First(); - - return new InvTrackInfo() - { - Id = res.VideoId, - Title = res.Title, - Url = $"https://youtube.com/watch?v={res.VideoId}", - Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(res.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = null, - }; - } - - public async Task ResolveByIdAsync(string id) - => await InternalResolveByIdAsync(id); - - private async Task InternalResolveByIdAsync(string id) - { - using var http = _httpFactory.CreateClient(); - - var res = await http.GetFromJsonAsync( - $"{InvidiousApiUrl}/api/v1/videos/{id}"); - - if (res is null) - return null; - - return new InvTrackInfo() - { - Id = res.VideoId, - Title = res.Title, - Url = $"https://youtube.com/watch?v={res.VideoId}", - Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(res.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_HIGH")?.Url - ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_MEDIUM")?.Url - ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_LOW")?.Url - }; - } - - public async IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query) - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetFromJsonAsync( - $"{InvidiousApiUrl}/api/v1/search?type=video&q={query}"); - - if (res is null) - yield break; - - foreach (var video in res.Videos) - { - yield return new InvTrackInfo() - { - Id = video.VideoId, - Title = video.Title, - Url = $"https://youtube.com/watch?v={video.VideoId}", - Thumbnail = video.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(video.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = null - }; - } - } - - public Task ResolveByQueryAsync(string query, bool tryExtractingId) - => ResolveByQueryAsync(query); - - public async Task GetStreamUrl(string videoId) - { - var video = await InternalResolveByIdAsync(videoId); - return video?.StreamUrl; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/LocalTrackResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/LocalTrackResolver.cs deleted file mode 100644 index d728ce7..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/LocalTrackResolver.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System.ComponentModel; -using System.Diagnostics; -using System.Text; - -namespace EllieBot.Modules.Music.Resolvers; - -public sealed class LocalTrackResolver : ILocalTrackResolver -{ - private static readonly HashSet _musicExtensions = new[] - { - ".MP4", ".MP3", ".FLAC", ".OGG", ".WAV", ".WMA", ".WMV", ".AAC", ".MKV", ".WEBM", ".M4A", ".AA", ".AAX", - ".ALAC", ".AIFF", ".MOV", ".FLV", ".OGG", ".M4V" - }.ToHashSet(); - - public async Task ResolveByQueryAsync(string query) - { - if (!File.Exists(query)) - return null; - - var trackDuration = await Ffprobe.GetTrackDurationAsync(query); - return new SimpleTrackInfo(Path.GetFileNameWithoutExtension(query), - $"https://google.com?q={Uri.EscapeDataString(Path.GetFileNameWithoutExtension(query))}", - "https://cdn.discordapp.com/attachments/155726317222887425/261850914783100928/1482522077_music.png", - trackDuration, - MusicPlatform.Local, - $"\"{Path.GetFullPath(query)}\""); - } - - public async IAsyncEnumerable ResolveDirectoryAsync(string dirPath) - { - DirectoryInfo dir; - try - { - dir = new(dirPath); - } - catch (Exception ex) - { - Log.Error(ex, "Specified directory {DirectoryPath} could not be opened", dirPath); - yield break; - } - - var files = dir.EnumerateFiles() - .Where(x => - { - if (!x.Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System) - && _musicExtensions.Contains(x.Extension.ToUpperInvariant())) - return true; - return false; - }) - .ToList(); - - var firstFile = files.FirstOrDefault()?.FullName; - if (firstFile is null) - yield break; - - var firstData = await ResolveByQueryAsync(firstFile); - if (firstData is not null) - yield return firstData; - - var fileChunks = files.Skip(1).Chunk(10); - foreach (var chunk in fileChunks) - { - var part = await chunk.Select(x => ResolveByQueryAsync(x.FullName)).WhenAll(); - - // nullable reference types being annoying - foreach (var p in part) - { - if (p is null) - continue; - - yield return p; - } - } - } -} - -public static class Ffprobe -{ - public static async Task GetTrackDurationAsync(string query) - { - query = query.Replace("\"", ""); - - try - { - using var p = Process.Start(new ProcessStartInfo - { - FileName = "ffprobe", - Arguments = - $"-v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -- \"{query}\"", - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - StandardOutputEncoding = Encoding.UTF8, - StandardErrorEncoding = Encoding.UTF8, - CreateNoWindow = true - }); - - if (p is null) - return TimeSpan.Zero; - - var data = await p.StandardOutput.ReadToEndAsync(); - if (double.TryParse(data, out var seconds)) - return TimeSpan.FromSeconds(seconds); - - var errorData = await p.StandardError.ReadToEndAsync(); - if (!string.IsNullOrWhiteSpace(errorData)) - Log.Warning("Ffprobe warning for file {FileName}: {ErrorMessage}", query, errorData); - - return TimeSpan.Zero; - } - catch (Win32Exception) - { - Log.Warning("Ffprobe was likely not installed. Local song durations will show as (?)"); - } - catch (Exception ex) - { - Log.Error(ex, "Unknown exception running ffprobe; {ErrorMessage}", ex.Message); - } - - return TimeSpan.Zero; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs b/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs deleted file mode 100644 index 475b026..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs +++ /dev/null @@ -1,106 +0,0 @@ -#nullable disable -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Music.Resolvers; - -public class RadioResolver : IRadioResolver -{ - private readonly Regex _plsRegex = new(@"File1=(?.*?)\n", RegexOptions.Compiled); - private readonly Regex _m3URegex = new(@"(?^[^#].*)", RegexOptions.Compiled | RegexOptions.Multiline); - private readonly Regex _asxRegex = new(@".*?)""", RegexOptions.Compiled); - private readonly Regex _xspfRegex = new(@"(?.*?)", RegexOptions.Compiled); - - public async Task ResolveByQueryAsync(string query) - { - if (IsRadioLink(query)) - query = await HandleStreamContainers(query); - - return new SimpleTrackInfo(query.TrimTo(50), - query, - "https://cdn.discordapp.com/attachments/155726317222887425/261850925063340032/1482522097_radio.png", - TimeSpan.MaxValue, - MusicPlatform.Radio, - query); - } - - public static bool IsRadioLink(string query) - => (query.StartsWith("http", StringComparison.InvariantCulture) - || query.StartsWith("ww", StringComparison.InvariantCulture)) - && (query.Contains(".pls") || query.Contains(".m3u") || query.Contains(".asx") || query.Contains(".xspf")); - - private async Task HandleStreamContainers(string query) - { - string file = null; - try - { - using var http = new HttpClient(); - file = await http.GetStringAsync(query); - } - catch - { - return query; - } - - if (query.Contains(".pls")) - { - try - { - var m = _plsRegex.Match(file); - var res = m.Groups["url"]?.ToString(); - return res?.Trim(); - } - catch - { - Log.Warning("Failed reading .pls:\n{PlsFile}", file); - return null; - } - } - - if (query.Contains(".m3u")) - { - try - { - var m = _m3URegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); - } - catch - { - Log.Warning("Failed reading .m3u:\n{M3uFile}", file); - return null; - } - } - - if (query.Contains(".asx")) - { - try - { - var m = _asxRegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); - } - catch - { - Log.Warning("Failed reading .asx:\n{AsxFile}", file); - return null; - } - } - - if (query.Contains(".xspf")) - { - try - { - var m = _xspfRegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); - } - catch - { - Log.Warning("Failed reading .xspf:\n{XspfFile}", file); - return null; - } - } - - return query; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs b/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs deleted file mode 100644 index 21a6adf..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs +++ /dev/null @@ -1,54 +0,0 @@ -using EllieBot.Modules.Music.Resolvers; - -namespace EllieBot.Modules.Music; - -public sealed class TrackResolveProvider : ITrackResolveProvider -{ - private readonly IYoutubeResolverFactory _ytResolver; - private readonly ILocalTrackResolver _localResolver; - private readonly IRadioResolver _radioResolver; - - public TrackResolveProvider( - IYoutubeResolverFactory ytResolver, - ILocalTrackResolver localResolver, - IRadioResolver radioResolver) - { - _ytResolver = ytResolver; - _localResolver = localResolver; - _radioResolver = radioResolver; - } - - public Task QuerySongAsync(string query, MusicPlatform? forcePlatform) - { - switch (forcePlatform) - { - case MusicPlatform.Radio: - return _radioResolver.ResolveByQueryAsync(query); - case MusicPlatform.Youtube: - return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query); - case MusicPlatform.Local: - return _localResolver.ResolveByQueryAsync(query); - case null: - var match = YoutubeHelpers.YtVideoIdRegex.Match(query); - - if (match.Success) - return _ytResolver.GetYoutubeResolver().ResolveByIdAsync(match.Groups["id"].Value); - - if (Uri.TryCreate(query, UriKind.Absolute, out var uri) && uri.IsFile) - return _localResolver.ResolveByQueryAsync(uri.AbsolutePath); - - if (IsRadioLink(query)) - return _radioResolver.ResolveByQueryAsync(query); - - return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query, false); - default: - Log.Error("Unsupported platform: {MusicPlatform}", forcePlatform); - return Task.FromResult(null); - } - } - - public static bool IsRadioLink(string query) - => (query.StartsWith("http", StringComparison.InvariantCulture) - || query.StartsWith("ww", StringComparison.InvariantCulture)) - && (query.Contains(".pls") || query.Contains(".m3u") || query.Contains(".asx") || query.Contains(".xspf")); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs deleted file mode 100644 index 869102d..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Music; - -public sealed class YoutubeHelpers -{ - public static Regex YtVideoIdRegex { get; } = - new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?[a-zA-Z0-9_-]{6,11})", - RegexOptions.Compiled); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs deleted file mode 100644 index 955faca..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using EllieBot.Modules.Searches; -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Music.Resolvers; - -public interface IYoutubeResolverFactory -{ - IYoutubeResolver GetYoutubeResolver(); -} - -public sealed class YoutubeResolverFactory : IYoutubeResolverFactory -{ - private readonly SearchesConfigService _ss; - private readonly IServiceProvider _services; - - public YoutubeResolverFactory(SearchesConfigService ss, IServiceProvider services) - { - _ss = ss; - _services = services; - } - - public IYoutubeResolver GetYoutubeResolver() - { - var conf = _ss.Data; - if (conf.YtProvider == YoutubeSearcher.Invidious) - { - return _services.GetRequiredService(); - } - - return _services.GetRequiredService(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs deleted file mode 100644 index eeb3a1c..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs +++ /dev/null @@ -1,316 +0,0 @@ -using System.Globalization; -using System.Text.RegularExpressions; -using EllieBot.Modules.Searches; - -namespace EllieBot.Modules.Music; - -public sealed class YtdlYoutubeResolver : IYoutubeResolver -{ - private static readonly string[] _durationFormats = - [ - "ss", "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" - ]; - - private static readonly Regex _expiryRegex = new(@"(?:[\?\&]expire\=(?\d+))"); - - - private static readonly Regex _simplePlaylistRegex = new(@"&list=(?[\w\-]{12,})", RegexOptions.Compiled); - - - private readonly ITrackCacher _trackCacher; - - private readonly YtdlOperation _ytdlPlaylistOperation; - private readonly YtdlOperation _ytdlIdOperation; - private readonly YtdlOperation _ytdlSearchOperation; - - private readonly IGoogleApiService _google; - - public YtdlYoutubeResolver(ITrackCacher trackCacher, IGoogleApiService google, SearchesConfigService scs) - { - _trackCacher = trackCacher; - _google = google; - - - _ytdlPlaylistOperation = new("-4 " - + "--geo-bypass " - + "--encoding UTF8 " - + "-f bestaudio " - + "-e " - + "--get-url " - + "--get-id " - + "--get-thumbnail " - + "--get-duration " - + "--no-check-certificate " - + "-i " - + "--yes-playlist " - + "-- \"{0}\"", - scs.Data.YtProvider != YoutubeSearcher.Ytdl); - - _ytdlIdOperation = new("-4 " - + "--geo-bypass " - + "--encoding UTF8 " - + "-f bestaudio " - + "-e " - + "--get-url " - + "--get-id " - + "--get-thumbnail " - + "--get-duration " - + "--no-check-certificate " - + "-- \"{0}\"", - scs.Data.YtProvider != YoutubeSearcher.Ytdl); - - _ytdlSearchOperation = new("-4 " - + "--geo-bypass " - + "--encoding UTF8 " - + "-f bestaudio " - + "-e " - + "--get-url " - + "--get-id " - + "--get-thumbnail " - + "--get-duration " - + "--no-check-certificate " - + "--default-search " - + "\"ytsearch:\" -- \"{0}\"", - scs.Data.YtProvider != YoutubeSearcher.Ytdl); - } - - private YtTrackData ResolveYtdlData(string ytdlOutputString) - { - if (string.IsNullOrWhiteSpace(ytdlOutputString)) - return default; - - var dataArray = ytdlOutputString.Trim().Split('\n'); - - if (dataArray.Length < 5) - { - Log.Information("Not enough data received: {YtdlData}", ytdlOutputString); - return default; - } - - if (!TimeSpan.TryParseExact(dataArray[4], _durationFormats, CultureInfo.InvariantCulture, out var time)) - time = TimeSpan.Zero; - - var thumbnail = Uri.IsWellFormedUriString(dataArray[3], UriKind.Absolute) ? dataArray[3].Trim() : string.Empty; - - return new(dataArray[0], dataArray[1], thumbnail, dataArray[2], time); - } - - private ITrackInfo DataToInfo(in YtTrackData trackData) - => new RemoteTrackInfo( - trackData.Id, - trackData.Title, - $"https://youtube.com/watch?v={trackData.Id}", - trackData.Thumbnail, - trackData.Duration, - MusicPlatform.Youtube); - - private Func> CreateCacherFactory(string id) - => () => _trackCacher.GetOrCreateStreamLink(id, - MusicPlatform.Youtube, - async () => await ExtractNewStreamUrlAsync(id)); - - private static TimeSpan GetExpiry(string streamUrl) - { - var match = _expiryRegex.Match(streamUrl); - if (match.Success && double.TryParse(match.Groups["timestamp"].ToString(), out var timestamp)) - { - var realExpiry = timestamp.ToUnixTimestamp() - DateTime.UtcNow; - if (realExpiry > TimeSpan.FromMinutes(60)) - return realExpiry.Subtract(TimeSpan.FromMinutes(30)); - - return realExpiry; - } - - return TimeSpan.FromHours(1); - } - - private async Task<(string StreamUrl, TimeSpan Expiry)> ExtractNewStreamUrlAsync(string id) - { - var data = await _ytdlIdOperation.GetDataAsync(id); - var trackInfo = ResolveYtdlData(data); - if (string.IsNullOrWhiteSpace(trackInfo.StreamUrl)) - return default; - - return (trackInfo.StreamUrl!, GetExpiry(trackInfo.StreamUrl!)); - } - - public async Task ResolveByIdAsync(string id) - { - id = id.Trim(); - - var cachedData = await _trackCacher.GetCachedDataByIdAsync(id, MusicPlatform.Youtube); - if (cachedData is null) - { - Log.Information("Resolving youtube track by Id: {YoutubeId}", id); - - var data = await _ytdlIdOperation.GetDataAsync(id); - - var trackInfo = ResolveYtdlData(data); - if (string.IsNullOrWhiteSpace(trackInfo.Title)) - return default; - - var toReturn = DataToInfo(in trackInfo); - - await Task.WhenAll(_trackCacher.CacheTrackDataAsync(toReturn.ToCachedData(id)), - CacheStreamUrlAsync(trackInfo)); - - return toReturn; - } - - return DataToInfo(new(cachedData.Title, cachedData.Id, cachedData.Thumbnail, null, cachedData.Duration)); - } - - private Task CacheStreamUrlAsync(YtTrackData trackInfo) - => _trackCacher.CacheStreamUrlAsync(trackInfo.Id, - MusicPlatform.Youtube, - trackInfo.StreamUrl!, - GetExpiry(trackInfo.StreamUrl!)); - - public async IAsyncEnumerable ResolveTracksByPlaylistIdAsync(string playlistId) - { - Log.Information("Resolving youtube tracks from playlist: {PlaylistId}", playlistId); - var count = 0; - - var ids = await _trackCacher.GetPlaylistTrackIdsAsync(playlistId, MusicPlatform.Youtube); - if (ids.Count > 0) - { - foreach (var id in ids) - { - var trackInfo = await ResolveByIdAsync(id); - if (trackInfo is null) - continue; - - yield return trackInfo; - } - - yield break; - } - - var data = string.Empty; - var trackIds = new List(); - await foreach (var line in _ytdlPlaylistOperation.EnumerateDataAsync(playlistId)) - { - data += line; - - if (++count == 5) - { - var trackData = ResolveYtdlData(data); - data = string.Empty; - count = 0; - if (string.IsNullOrWhiteSpace(trackData.Id)) - continue; - - var info = DataToInfo(in trackData); - await Task.WhenAll(_trackCacher.CacheTrackDataAsync(info.ToCachedData(trackData.Id)), - CacheStreamUrlAsync(trackData)); - - trackIds.Add(trackData.Id); - yield return info; - } - else - data += Environment.NewLine; - } - - await _trackCacher.CachePlaylistTrackIdsAsync(playlistId, MusicPlatform.Youtube, trackIds); - } - - public async IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query) - { - string? playlistId; - // try to match playlist id inside the query, if a playlist url has been queried - var match = _simplePlaylistRegex.Match(query); - if (match.Success) - { - // if it's a success, just return from that playlist using the id - playlistId = match.Groups["id"].ToString(); - await foreach (var track in ResolveTracksByPlaylistIdAsync(playlistId)) - yield return track; - - yield break; - } - - // if a query is a search term, try the cache - playlistId = await _trackCacher.GetPlaylistIdByQueryAsync(query, MusicPlatform.Youtube); - if (playlistId is null) - { - // if it's not in the cache - // find playlist id by keyword using google api - try - { - var playlistIds = await _google.GetPlaylistIdsByKeywordsAsync(query); - playlistId = playlistIds.FirstOrDefault(); - } - catch (Exception ex) - { - Log.Warning(ex, "Error Getting playlist id via GoogleApi"); - } - - // if query is not a playlist url - // and query result is not in the cache - // and api returns no values - // it means invalid input has been used, - // or google api key is not provided - if (playlistId is null) - yield break; - } - - // cache the query -> playlist id for fast future lookup - await _trackCacher.CachePlaylistIdByQueryAsync(query, MusicPlatform.Youtube, playlistId); - await foreach (var track in ResolveTracksByPlaylistIdAsync(playlistId)) - yield return track; - } - - public Task ResolveByQueryAsync(string query) - => ResolveByQueryAsync(query, true); - - public async Task ResolveByQueryAsync(string query, bool tryResolving) - { - if (tryResolving) - { - var match = YoutubeHelpers.YtVideoIdRegex.Match(query); - if (match.Success) - return await ResolveByIdAsync(match.Groups["id"].Value); - } - - Log.Information("Resolving youtube song by search term: {YoutubeQuery}", query); - - var cachedData = await _trackCacher.GetCachedDataByQueryAsync(query, MusicPlatform.Youtube); - if (cachedData is null || string.IsNullOrWhiteSpace(cachedData.Title)) - { - var stringData = await _ytdlSearchOperation.GetDataAsync(query); - var trackData = ResolveYtdlData(stringData); - - var trackInfo = DataToInfo(trackData); - await Task.WhenAll(_trackCacher.CacheTrackDataByQueryAsync(query, trackInfo.ToCachedData(trackData.Id)), - CacheStreamUrlAsync(trackData)); - return trackInfo; - } - - return DataToInfo(new(cachedData.Title, cachedData.Id, cachedData.Thumbnail, null, cachedData.Duration)); - } - - public Task GetStreamUrl(string videoId) - => CreateCacherFactory(videoId)(); - private readonly struct YtTrackData - { - public readonly string Title; - public readonly string Id; - public readonly string Thumbnail; - public readonly string? StreamUrl; - public readonly TimeSpan Duration; - - public YtTrackData( - string title, - string id, - string thumbnail, - string? streamUrl, - TimeSpan duration) - { - Title = title.Trim(); - Id = id.Trim(); - Thumbnail = thumbnail; - StreamUrl = streamUrl; - Duration = duration; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/db/MusicPlayerSettingsExtensions.cs b/src/EllieBot/Modules/Music/_common/db/MusicPlayerSettingsExtensions.cs deleted file mode 100644 index d8f81b5..0000000 --- a/src/EllieBot/Modules/Music/_common/db/MusicPlayerSettingsExtensions.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class MusicPlayerSettingsExtensions -{ - public static async Task ForGuildAsync(this DbSet settings, ulong guildId) - { - var toReturn = await settings.AsQueryable().FirstOrDefaultAsync(x => x.GuildId == guildId); - - if (toReturn is null) - { - var newSettings = new MusicPlayerSettings - { - GuildId = guildId, - PlayerRepeat = PlayerRepeatType.Queue - }; - - await settings.AddAsync(newSettings); - return newSettings; - } - - return toReturn; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/db/MusicPlaylist.cs b/src/EllieBot/Modules/Music/_common/db/MusicPlaylist.cs deleted file mode 100644 index 697e35e..0000000 --- a/src/EllieBot/Modules/Music/_common/db/MusicPlaylist.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class MusicPlaylist : DbEntity -{ - public string Name { get; set; } - public string Author { get; set; } - public ulong AuthorId { get; set; } - public List Songs { get; set; } = new(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/db/MusicPlaylistExtensions.cs b/src/EllieBot/Modules/Music/_common/db/MusicPlaylistExtensions.cs deleted file mode 100644 index 0e3e603..0000000 --- a/src/EllieBot/Modules/Music/_common/db/MusicPlaylistExtensions.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class MusicPlaylistExtensions -{ - public static List GetPlaylistsOnPage(this DbSet playlists, int num) - { - ArgumentOutOfRangeException.ThrowIfLessThan(num, 1); - - return playlists.AsQueryable().Skip((num - 1) * 20).Take(20).Include(pl => pl.Songs).ToList(); - } - - public static MusicPlaylist GetWithSongs(this DbSet playlists, int id) - => playlists.Include(mpl => mpl.Songs).FirstOrDefault(mpl => mpl.Id == id); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/db/MusicSettings.cs b/src/EllieBot/Modules/Music/_common/db/MusicSettings.cs deleted file mode 100644 index 40f8397..0000000 --- a/src/EllieBot/Modules/Music/_common/db/MusicSettings.cs +++ /dev/null @@ -1,61 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class MusicPlayerSettings -{ - /// - /// Auto generated Id - /// - public int Id { get; set; } - - /// - /// Id of the guild - /// - public ulong GuildId { get; set; } - - /// - /// Queue repeat type - /// - public PlayerRepeatType PlayerRepeat { get; set; } = PlayerRepeatType.Queue; - - /// - /// Channel id the bot will always try to send track related messages to - /// - public ulong? MusicChannelId { get; set; } - - /// - /// Default volume player will be created with - /// - public int Volume { get; set; } = 100; - - /// - /// Whether the bot should auto disconnect from the voice channel once the queue is done - /// This only has effect if - /// - public bool AutoDisconnect { get; set; } - - /// - /// Selected quality preset for the music player - /// - public QualityPreset QualityPreset { get; set; } - - /// - /// Whether the bot will automatically queue related songs - /// - public bool AutoPlay { get; set; } -} - -public enum QualityPreset -{ - Highest, - High, - Medium, - Low -} - -public enum PlayerRepeatType -{ - None, - Track, - Queue -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Config/PatronageConfig.cs b/src/EllieBot/Modules/Patronage/Config/PatronageConfig.cs deleted file mode 100644 index 254c3db..0000000 --- a/src/EllieBot/Modules/Patronage/Config/PatronageConfig.cs +++ /dev/null @@ -1,45 +0,0 @@ -using EllieBot.Common.Configs; - -namespace EllieBot.Modules.Patronage; - -public class PatronageConfig : ConfigServiceBase -{ - public override string Name - => "patron"; - - private static readonly TypedKey _changeKey - = new("config.patron.updated"); - - private const string FILE_PATH = "data/patron.yml"; - - public PatronageConfig(IConfigSeria serializer, IPubSub pubSub) : base(FILE_PATH, serializer, pubSub, _changeKey) - { - AddParsedProp("enabled", - x => x.IsEnabled, - bool.TryParse, - ConfigPrinters.ToString); - - Migrate(); - } - - private void Migrate() - { - ModifyConfig(c => - { - if (c.Version == 1) - { - c.Version = 2; - c.IsEnabled = false; - } - }); - - - ModifyConfig(c => - { - if (c.Version == 2) - { - c.Version = 3; - } - }); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs b/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs deleted file mode 100644 index b61c646..0000000 --- a/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs +++ /dev/null @@ -1,194 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Modules.Patronage; -using EllieBot.Services.Currency; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Utility; - -public sealed class CurrencyRewardService : IEService, IReadyExecutor -{ - private readonly ICurrencyService _cs; - private readonly IPatronageService _ps; - private readonly DbService _db; - private readonly IMessageSenderService _sender; - private readonly GamblingConfigService _config; - private readonly DiscordSocketClient _client; - - public CurrencyRewardService( - ICurrencyService cs, - IPatronageService ps, - DbService db, - IMessageSenderService sender, - GamblingConfigService config, - DiscordSocketClient client) - { - _cs = cs; - _ps = ps; - _db = db; - _sender = sender; - _config = config; - _client = client; - - } - - public Task OnReadyAsync() - { - _ps.OnNewPatronPayment += OnNewPayment; - _ps.OnPatronRefunded += OnPatronRefund; - _ps.OnPatronUpdated += OnPatronUpdate; - return Task.CompletedTask; - } - - private async Task OnPatronUpdate(Patron oldPatron, Patron newPatron) - { - // if pledge was increased - if (oldPatron.Amount < newPatron.Amount) - { - var conf = _config.Data; - var newAmount = (long)(newPatron.Amount * conf.PatreonCurrencyPerCent); - - RewardedUser old; - await using (var ctx = _db.GetDbContext()) - { - old = await ctx.GetTable() - .Where(x => x.PlatformUserId == newPatron.UniquePlatformUserId) - .FirstOrDefaultAsync(); - - if (old is null) - { - await OnNewPayment(newPatron); - return; - } - - // no action as the amount is the same or lower - if (old.AmountRewardedThisMonth >= newAmount) - return; - - var count = await ctx.GetTable() - .Where(x => x.PlatformUserId == newPatron.UniquePlatformUserId) - .UpdateAsync(_ => new() - { - PlatformUserId = newPatron.UniquePlatformUserId, - UserId = newPatron.UserId, - // amount before bonuses - AmountRewardedThisMonth = newAmount, - LastReward = newPatron.PaidAt - }); - - // shouldn't ever happen - if (count == 0) - return; - } - - var oldAmount = old.AmountRewardedThisMonth; - - var realNewAmount = GetRealCurrencyReward( - (int)(newAmount / conf.PatreonCurrencyPerCent), - newAmount, - out var percentBonus); - - var realOldAmount = GetRealCurrencyReward( - (int)(oldAmount / conf.PatreonCurrencyPerCent), - oldAmount, - out _); - - var diff = realNewAmount - realOldAmount; - if (diff <= 0) - return; // no action if new is lower - - // if the user pledges 5$ or more, they will get X % more flowers where X is amount in dollars, - // up to 100% - - await _cs.AddAsync(newPatron.UserId, diff, new TxData("patron","update")); - - _ = SendMessageToUser(newPatron.UserId, - $"You've received an additional **{diff}**{_config.Data.Currency.Sign} as a currency reward (+{percentBonus}%)!"); - } - } - - private long GetRealCurrencyReward(int pledgeCents, long modifiedAmount, out int percentBonus) - { - // needs at least 5$ to be eligible for a bonus - if (pledgeCents < 500) - { - percentBonus = 0; - return modifiedAmount; - } - - var dollarValue = pledgeCents / 100; - percentBonus = dollarValue switch - { - >= 100 => 100, - >= 50 => 50, - >= 20 => 20, - >= 10 => 10, - >= 5 => 5, - _ => 0 - }; - return (long)(modifiedAmount * (1 + (percentBonus / 100.0f))); - } - - // on a new payment, always give the full amount. - private async Task OnNewPayment(Patron patron) - { - var amount = (long)(patron.Amount * _config.Data.PatreonCurrencyPerCent); - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - PlatformUserId = patron.UniquePlatformUserId, - UserId = patron.UserId, - AmountRewardedThisMonth = amount, - LastReward = patron.PaidAt, - }, - old => new() - { - AmountRewardedThisMonth = amount, - UserId = patron.UserId, - LastReward = patron.PaidAt - }, - () => new() - { - PlatformUserId = patron.UniquePlatformUserId - }); - - var realAmount = GetRealCurrencyReward(patron.Amount, amount, out var percentBonus); - await _cs.AddAsync(patron.UserId, realAmount, new("patron", "new")); - _ = SendMessageToUser(patron.UserId, - $"You've received **{realAmount}**{_config.Data.Currency.Sign} as a currency reward (**+{percentBonus}%**)!"); - } - - private async Task SendMessageToUser(ulong userId, string message) - { - try - { - var user = (IUser)_client.GetUser(userId) ?? await _client.Rest.GetUserAsync(userId); - if (user is null) - return; - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(message); - - await _sender.Response(user).Embed(eb).SendAsync(); - } - catch - { - Log.Warning("Unable to send a \"Currency Reward\" message to the patron {UserId}", userId); - } - } - - private async Task OnPatronRefund(Patron patron) - { - await using var ctx = _db.GetDbContext(); - _ = await ctx.GetTable() - .UpdateAsync(old => new() - { - AmountRewardedThisMonth = old.AmountRewardedThisMonth * 2 - }); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonClient.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonClient.cs deleted file mode 100644 index 2ac5820..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonClient.cs +++ /dev/null @@ -1,149 +0,0 @@ -#nullable disable -using OneOf; -using OneOf.Types; -using System.Net.Http.Json; -using System.Text.Json; - -namespace EllieBot.Modules.Patronage; - -public class PatreonClient : IDisposable -{ - private readonly string _clientId; - private readonly string _clientSecret; - private string refreshToken; - - - private string accessToken = string.Empty; - private readonly HttpClient _http; - - private DateTime refreshAt = DateTime.UtcNow; - - public PatreonClient(string clientId, string clientSecret, string refreshToken) - { - _clientId = clientId; - _clientSecret = clientSecret; - this.refreshToken = refreshToken; - - _http = new(); - } - - public void Dispose() - => _http.Dispose(); - - public PatreonCredentials GetCredentials() - => new PatreonCredentials() - { - AccessToken = accessToken, - ClientId = _clientId, - ClientSecret = _clientSecret, - RefreshToken = refreshToken, - }; - - public async Task>> RefreshTokenAsync(bool force) - { - if (!force && IsTokenValid()) - return new Success(); - - var res = await _http.PostAsync("https://www.patreon.com/api/oauth2/token" - + "?grant_type=refresh_token" - + $"&refresh_token={refreshToken}" - + $"&client_id={_clientId}" - + $"&client_secret={_clientSecret}", - null); - - if (!res.IsSuccessStatusCode) - return new Error($"Request did not return a sucess status code. Status code: {res.StatusCode}"); - - try - { - var data = await res.Content.ReadFromJsonAsync(); - - if (data is null) - return new Error($"Invalid data retrieved from Patreon."); - - refreshToken = data.RefreshToken; - accessToken = data.AccessToken; - - refreshAt = DateTime.UtcNow.AddSeconds(data.ExpiresIn - 5.Minutes().TotalSeconds); - return new Success(); - } - catch (Exception ex) - { - return new Error($"Error during deserialization: {ex.Message}"); - } - } - - private async ValueTask EnsureTokenValidAsync() - { - if (!IsTokenValid()) - { - var res = await RefreshTokenAsync(true); - return res.Match( - static _ => true, - static err => - { - Log.Warning("Error getting token: {ErrorMessage}", err.Value); - return false; - }); - } - - return true; - } - - private bool IsTokenValid() - => refreshAt > DateTime.UtcNow && !string.IsNullOrWhiteSpace(accessToken); - - public async Task>, Error>> GetMembersAsync(string campaignId) - { - if (!await EnsureTokenValidAsync()) - return new Error("Unable to get patreon token"); - - return OneOf>, Error>.FromT0( - GetMembersInternalAsync(campaignId)); - } - - private async IAsyncEnumerable> GetMembersInternalAsync(string campaignId) - { - _http.DefaultRequestHeaders.Clear(); - _http.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", - $"Bearer {accessToken}"); - - var page = - $"https://www.patreon.com/api/oauth2/v2/campaigns/{campaignId}/members" - + $"?fields%5Bmember%5D=full_name,currently_entitled_amount_cents,last_charge_date,last_charge_status" - + $"&fields%5Buser%5D=social_connections" - + $"&include=user" - + $"&sort=-last_charge_date"; - PatreonMembersResponse data; - - do - { - var res = await _http.GetStreamAsync(page); - data = await JsonSerializer.DeserializeAsync(res); - - if (data is null) - break; - - var userData = data.Data - .Join(data.Included, - static m => m.Relationships.User.Data.Id, - static u => u.Id, - static (m, u) => new PatreonMemberData() - { - PatreonUserId = m.Relationships.User.Data.Id, - UserId = ulong.TryParse( - u.Attributes?.SocialConnections?.Discord?.UserId ?? string.Empty, - out var userId) - ? userId - : 0, - EntitledToCents = m.Attributes.CurrentlyEntitledAmountCents, - LastChargeDate = m.Attributes.LastChargeDate, - LastChargeStatus = m.Attributes.LastChargeStatus - }) - .ToArray(); - - yield return userData; - - } while (!string.IsNullOrWhiteSpace(page = data.Links?.Next)); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonCredentials.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonCredentials.cs deleted file mode 100644 index 768a1f6..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonCredentials.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Patronage; - -public readonly struct PatreonCredentials -{ - public string ClientId { get; init; } - public string ClientSecret { get; init; } - public string AccessToken { get; init; } - public string RefreshToken { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonData.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonData.cs deleted file mode 100644 index 6b33a80..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonData.cs +++ /dev/null @@ -1,134 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Patronage; - -public sealed class Attributes -{ - [JsonPropertyName("full_name")] - public string FullName { get; set; } - - [JsonPropertyName("is_follower")] - public bool IsFollower { get; set; } - - [JsonPropertyName("last_charge_date")] - public DateTime? LastChargeDate { get; set; } - - [JsonPropertyName("last_charge_status")] - public string LastChargeStatus { get; set; } - - [JsonPropertyName("lifetime_support_cents")] - public int LifetimeSupportCents { get; set; } - - [JsonPropertyName("currently_entitled_amount_cents")] - public int CurrentlyEntitledAmountCents { get; set; } - - [JsonPropertyName("patron_status")] - public string PatronStatus { get; set; } -} - -public sealed class Data -{ - [JsonPropertyName("id")] - public string Id { get; set; } - - [JsonPropertyName("type")] - public string Type { get; set; } -} - -public sealed class Address -{ - [JsonPropertyName("data")] - public Data Data { get; set; } -} - -// public sealed class CurrentlyEntitledTiers -// { -// [JsonPropertyName("data")] -// public List Data { get; set; } -// } - -// public sealed class Relationships -// { -// [JsonPropertyName("address")] -// public Address Address { get; set; } -// -// // [JsonPropertyName("currently_entitled_tiers")] -// // public CurrentlyEntitledTiers CurrentlyEntitledTiers { get; set; } -// } - -public sealed class PatreonMembersResponse -{ - [JsonPropertyName("data")] - public List Data { get; set; } - - [JsonPropertyName("included")] - public List Included { get; set; } - - [JsonPropertyName("links")] - public PatreonLinks Links { get; set; } -} - -public sealed class PatreonLinks -{ - [JsonPropertyName("next")] - public string Next { get; set; } -} - -public sealed class PatreonUser -{ - [JsonPropertyName("attributes")] - public PatreonUserAttributes Attributes { get; set; } - - [JsonPropertyName("id")] - public string Id { get; set; } - // public string Type { get; set; } -} - -public sealed class PatreonUserAttributes -{ - [JsonPropertyName("social_connections")] - public PatreonSocials SocialConnections { get; set; } -} - -public sealed class PatreonSocials -{ - [JsonPropertyName("discord")] - public DiscordSocial Discord { get; set; } -} - -public sealed class DiscordSocial -{ - [JsonPropertyName("user_id")] - public string UserId { get; set; } -} - -public sealed class PatreonMember -{ - [JsonPropertyName("attributes")] - public Attributes Attributes { get; set; } - - [JsonPropertyName("relationships")] - public Relationships Relationships { get; set; } - - [JsonPropertyName("type")] - public string Type { get; set; } -} - -public sealed class Relationships -{ - [JsonPropertyName("user")] - public PatreonRelationshipUser User { get; set; } -} - -public sealed class PatreonRelationshipUser -{ - [JsonPropertyName("data")] - public PatreonUserData Data { get; set; } -} - -public sealed class PatreonUserData -{ - [JsonPropertyName("id")] - public string Id { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonMemberData.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonMemberData.cs deleted file mode 100644 index 4698b43..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonMemberData.cs +++ /dev/null @@ -1,28 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Patronage; - -public sealed class PatreonMemberData : ISubscriberData -{ - public string PatreonUserId { get; init; } - public ulong UserId { get; init; } - public DateTime? LastChargeDate { get; init; } - public string LastChargeStatus { get; init; } - public int EntitledToCents { get; init; } - - public string UniquePlatformUserId - => PatreonUserId; - ulong ISubscriberData.UserId - => UserId; - public int Cents - => EntitledToCents; - public DateTime? LastCharge - => LastChargeDate; - public SubscriptionChargeStatus ChargeStatus - => LastChargeStatus switch - { - "Paid" => SubscriptionChargeStatus.Paid, - "Fraud" or "Refunded" => SubscriptionChargeStatus.Refunded, - "Declined" or "Pending" => SubscriptionChargeStatus.Unpaid, - _ => SubscriptionChargeStatus.Other, - }; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonRefreshData.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonRefreshData.cs deleted file mode 100644 index 2b6d154..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonRefreshData.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Patronage; - -public sealed class PatreonRefreshData -{ - [JsonPropertyName("access_token")] - public string AccessToken { get; set; } - - [JsonPropertyName("refresh_token")] - public string RefreshToken { get; set; } - - [JsonPropertyName("expires_in")] - public long ExpiresIn { get; set; } - - [JsonPropertyName("scope")] - public string Scope { get; set; } - - [JsonPropertyName("token_type")] - public string TokenType { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/Patreon/PatreonSubscriptionHandler.cs b/src/EllieBot/Modules/Patronage/Patreon/PatreonSubscriptionHandler.cs deleted file mode 100644 index edc0f08..0000000 --- a/src/EllieBot/Modules/Patronage/Patreon/PatreonSubscriptionHandler.cs +++ /dev/null @@ -1,79 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Patronage; - -/// -/// Service tasked with handling pledges on patreon -/// -public sealed class PatreonSubscriptionHandler : ISubscriptionHandler, IEService -{ - private readonly IBotCredsProvider _credsProvider; - private readonly PatreonClient _patreonClient; - - public PatreonSubscriptionHandler(IBotCredsProvider credsProvider) - { - _credsProvider = credsProvider; - var botCreds = credsProvider.GetCreds(); - _patreonClient = new PatreonClient(botCreds.Patreon.ClientId, botCreds.Patreon.ClientSecret, botCreds.Patreon.RefreshToken); - } - - public async IAsyncEnumerable> GetPatronsAsync() - { - var botCreds = _credsProvider.GetCreds(); - - if (string.IsNullOrWhiteSpace(botCreds.Patreon.CampaignId) - || string.IsNullOrWhiteSpace(botCreds.Patreon.ClientId) - || string.IsNullOrWhiteSpace(botCreds.Patreon.ClientSecret) - || string.IsNullOrWhiteSpace(botCreds.Patreon.RefreshToken)) - yield break; - - var result = await _patreonClient.RefreshTokenAsync(false); - if (!result.TryPickT0(out _, out var error)) - { - Log.Warning("Unable to refresh patreon token: {ErrorMessage}", error.Value); - yield break; - } - - var patreonCreds = _patreonClient.GetCredentials(); - - _credsProvider.ModifyCredsFile(c => - { - c.Patreon.AccessToken = patreonCreds.AccessToken; - c.Patreon.RefreshToken = patreonCreds.RefreshToken; - }); - - IAsyncEnumerable> data; - try - { - var maybeUserData = await _patreonClient.GetMembersAsync(botCreds.Patreon.CampaignId); - data = maybeUserData.Match( - static userData => userData, - static err => - { - Log.Warning("Error while getting patreon members: {ErrorMessage}", err.Value); - return AsyncEnumerable.Empty>(); - }); - } - catch (Exception ex) - { - Log.Warning(ex, - "Unexpected error while refreshing patreon members: {ErroMessage}", - ex.Message); - - yield break; - } - - var now = DateTime.UtcNow; - var firstOfThisMonth = new DateOnly(now.Year, now.Month, 1); - await foreach (var batch in data) - { - // send only active patrons - var toReturn = batch.Where(x => x.Cents > 0 - && x.LastCharge is { } lc - && lc.ToUniversalTime().ToDateOnly() >= firstOfThisMonth) - .ToArray(); - - if (toReturn.Length > 0) - yield return toReturn; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/PatronageCommands.cs b/src/EllieBot/Modules/Patronage/PatronageCommands.cs deleted file mode 100644 index fee2c33..0000000 --- a/src/EllieBot/Modules/Patronage/PatronageCommands.cs +++ /dev/null @@ -1,140 +0,0 @@ -using EllieBot.Modules.Patronage; - -namespace EllieBot.Modules.Help; - -public partial class Help -{ - [OnlyPublicBot] - public partial class Patronage : EllieModule - { - private readonly PatronageService _service; - private readonly PatronageConfig _pConf; - - public Patronage(PatronageService service, PatronageConfig pConf) - { - _service = service; - _pConf = pConf; - } - - [Cmd] - [Priority(2)] - public Task Patron() - => InternalPatron(ctx.User); - - [Cmd] - [Priority(0)] - [OwnerOnly] - public Task Patron(IUser user) - => InternalPatron(user); - - [Cmd] - [Priority(0)] - [OwnerOnly] - public async Task PatronMessage(PatronTier tierAndHigher, string message) - { - _ = ctx.Channel.TriggerTypingAsync(); - var result = await _service.SendMessageToPatronsAsync(tierAndHigher, message); - - await Response() - .Confirm(strs.patron_msg_sent( - Format.Code(tierAndHigher.ToString()), - Format.Bold(result.Success.ToString()), - Format.Bold(result.Failed.ToString()))) - .SendAsync(); - } - - // [OwnerOnly] - // public async Task PatronGift(IUser user, int amount) - // { - // // i can't figure out a good way to gift more than one month at the moment. - // - // if (amount < 1) - // return; - // - // var patron = _service.GiftPatronAsync(user, amount); - // - // var eb = _sender.CreateEmbed(); - // - // await Response().Embed(eb.WithDescription($"Added **{days}** days of Patron benefits to {user.Mention}!") - // .AddField("Tier", Format.Bold(patron.Tier.ToString()), true) - // .AddField("Amount", $"**{patron.Amount / 100.0f:N1}$**", true) - // .AddField("Until", TimestampTag.FromDateTime(patron.ValidThru.AddDays(1)))).SendAsync(); - // - // - // } - - private async Task InternalPatron(IUser user) - { - if (!_pConf.Data.IsEnabled) - { - await Response().Error(strs.patron_not_enabled).SendAsync(); - return; - } - - var maybePatron = await _service.GetPatronAsync(user.Id); - - var quotaStats = await _service.LimitStats(user.Id); - - var eb = _sender.CreateEmbed() - .WithAuthor(user) - .WithTitle(GetText(strs.patron_info)) - .WithOkColor(); - - if (quotaStats.Count == 0 || maybePatron is not { } patron) - { - eb.WithDescription(GetText(strs.no_quota_found)); - } - else - { - eb.AddField(GetText(strs.tier), Format.Bold(patron.Tier.ToFullName()), true) - .AddField(GetText(strs.pledge), $"**{patron.Amount / 100.0f:N1}$**", true); - - if (patron.Tier != PatronTier.None) - eb.AddField(GetText(strs.expires), - patron.ValidThru.AddDays(1).ToShortAndRelativeTimestampTag(), - true); - - eb.AddField(GetText(strs.quotas), "⁣", false); - - var text = GetQuotaList(quotaStats); - if (!string.IsNullOrWhiteSpace(text)) - eb.AddField(GetText(strs.modules), text, true); - } - - - try - { - await Response().User(ctx.User).Embed(eb).SendAsync(); - _ = ctx.OkAsync(); - } - catch - { - await Response().Error(strs.cant_dm).SendAsync(); - } - } - - private string GetQuotaList( - IReadOnlyDictionary featureQuotaStats) - { - var text = string.Empty; - foreach (var (key, (cur, quota)) in featureQuotaStats) - { - text += $"\n⁣\t`{key}`\n"; - if (quota.QuotaPeriod == QuotaPer.PerHour) - text += $"⁣ ⁣ {cur}/{(quota.Quota == -1 ? "∞" : quota.Quota)} {QuotaPeriodToString(quota.QuotaPeriod)}\n"; - } - - return text; - } - - public string QuotaPeriodToString(QuotaPer per) - => per switch - { - QuotaPer.PerHour => "per hour", - QuotaPer.PerDay => "per day", - QuotaPer.PerMonth => "per month", - QuotaPer.Total => "total", - _ => throw new ArgumentOutOfRangeException(nameof(per), per, null) - }; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Patronage/PatronageService.cs b/src/EllieBot/Modules/Patronage/PatronageService.cs deleted file mode 100644 index 0ea46e4..0000000 --- a/src/EllieBot/Modules/Patronage/PatronageService.cs +++ /dev/null @@ -1,486 +0,0 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Patronage; - -/// -public sealed class PatronageService - : IPatronageService, - IReadyExecutor, - IEService -{ - public event Func OnNewPatronPayment = static delegate { return Task.CompletedTask; }; - public event Func OnPatronUpdated = static delegate { return Task.CompletedTask; }; - public event Func OnPatronRefunded = static delegate { return Task.CompletedTask; }; - - // this has to run right before the command - public int Priority - => int.MinValue; - - private readonly PatronageConfig _pConf; - private readonly DbService _db; - private readonly DiscordSocketClient _client; - private readonly ISubscriptionHandler _subsHandler; - - private readonly IBotCache _cache; - private readonly IBotCredsProvider _creds; - private readonly IMessageSenderService _sender; - - public PatronageService( - PatronageConfig pConf, - DbService db, - DiscordSocketClient client, - ISubscriptionHandler subsHandler, - IBotCache cache, - IBotCredsProvider creds, - IMessageSenderService sender) - { - _pConf = pConf; - _db = db; - _client = client; - _subsHandler = subsHandler; - _sender = sender; - _cache = cache; - _creds = creds; - } - - public Task OnReadyAsync() - { - if (_client.ShardId != 0) - return Task.CompletedTask; - - return Task.WhenAll(LoadSubscribersLoopAsync()); - } - - private async Task LoadSubscribersLoopAsync() - { - var timer = new PeriodicTimer(TimeSpan.FromSeconds(60)); - while (await timer.WaitForNextTickAsync()) - { - try - { - if (!_pConf.Data.IsEnabled) - continue; - - await foreach (var batch in _subsHandler.GetPatronsAsync()) - { - await ProcesssPatronsAsync(batch); - } - } - catch (Exception ex) - { - Log.Error(ex, "Error processing patrons"); - } - } - } - - private async Task ProcesssPatronsAsync(IReadOnlyCollection subscribersEnum) - { - // process only users who have discord accounts connected - var subscribers = subscribersEnum.Where(x => x.UserId != 0).ToArray(); - - if (subscribers.Length == 0) - return; - - var todayDate = DateTime.UtcNow.Date; - await using var ctx = _db.GetDbContext(); - - // handle paid users - foreach (var subscriber in subscribers.Where(x => x.ChargeStatus == SubscriptionChargeStatus.Paid)) - { - if (subscriber.LastCharge is null) - continue; - - var lastChargeUtc = subscriber.LastCharge.Value.ToUniversalTime(); - var dateInOneMonth = lastChargeUtc.Date.AddMonths(1); - try - { - var dbPatron = await ctx.GetTable() - .FirstOrDefaultAsync(x - => x.UniquePlatformUserId == subscriber.UniquePlatformUserId); - - if (dbPatron is null) - { - // if the user is not in the database alrady - dbPatron = await ctx.GetTable() - .InsertWithOutputAsync(() => new() - { - UniquePlatformUserId = subscriber.UniquePlatformUserId, - UserId = subscriber.UserId, - AmountCents = subscriber.Cents, - LastCharge = lastChargeUtc, - ValidThru = dateInOneMonth, - }); - - // await tran.CommitAsync(); - - var newPatron = PatronUserToPatron(dbPatron); - _ = SendWelcomeMessage(newPatron); - await OnNewPatronPayment(newPatron); - } - else - { - if (dbPatron.LastCharge.Month < lastChargeUtc.Month - || dbPatron.LastCharge.Year < lastChargeUtc.Year) - { - // user is charged again for this month - // if his sub would end in teh future, extend it by one month. - // if it's not, just add 1 month to the last charge date - await ctx.GetTable() - .Where(x => x.UniquePlatformUserId - == subscriber.UniquePlatformUserId) - .UpdateAsync(old => new() - { - UserId = subscriber.UserId, - AmountCents = subscriber.Cents, - LastCharge = lastChargeUtc, - ValidThru = old.ValidThru >= todayDate - // ? Sql.DateAdd(Sql.DateParts.Month, 1, old.ValidThru).Value - ? old.ValidThru.AddMonths(1) - : dateInOneMonth, - }); - - - dbPatron.UserId = subscriber.UserId; - dbPatron.AmountCents = subscriber.Cents; - dbPatron.LastCharge = lastChargeUtc; - dbPatron.ValidThru = dbPatron.ValidThru >= todayDate - ? dbPatron.ValidThru.AddMonths(1) - : dateInOneMonth; - - await OnNewPatronPayment(PatronUserToPatron(dbPatron)); - } - else if (dbPatron.AmountCents != subscriber.Cents // if user changed the amount - || dbPatron.UserId != subscriber.UserId) // if user updated user id) - { - var cents = subscriber.Cents; - // the user updated the pledge or changed the connected discord account - await ctx.GetTable() - .Where(x => x.UniquePlatformUserId == subscriber.UniquePlatformUserId) - .UpdateAsync(old => new() - { - UserId = subscriber.UserId, - AmountCents = cents, - LastCharge = lastChargeUtc, - ValidThru = old.ValidThru, - }); - - var newPatron = dbPatron.Clone(); - newPatron.AmountCents = cents; - newPatron.UserId = subscriber.UserId; - - // idk what's going on but UpdateWithOutputAsync doesn't work properly here - // nor does firstordefault after update. I'm not seeing something obvious - await OnPatronUpdated( - PatronUserToPatron(dbPatron), - PatronUserToPatron(newPatron)); - } - } - } - catch (Exception ex) - { - Log.Error(ex, - "Unexpected error occured while processing rewards for patron {UserId}", - subscriber.UserId); - } - } - - var expiredDate = DateTime.MinValue; - foreach (var patron in subscribers.Where(x => x.ChargeStatus == SubscriptionChargeStatus.Refunded)) - { - // if the subscription is refunded, Disable user's valid thru - var changedCount = await ctx.GetTable() - .Where(x => x.UniquePlatformUserId == patron.UniquePlatformUserId - && x.ValidThru != expiredDate) - .UpdateAsync(old => new() - { - ValidThru = expiredDate - }); - - if (changedCount == 0) - continue; - - var updated = await ctx.GetTable() - .Where(x => x.UniquePlatformUserId == patron.UniquePlatformUserId) - .FirstAsync(); - - await OnPatronRefunded(PatronUserToPatron(updated)); - } - } - - public async Task GetPatronAsync(ulong userId) - { - await using var ctx = _db.GetDbContext(); - - // this can potentially return multiple users if the user - // is subscribed on multiple platforms - // or if there are multiple users on the same platform who connected the same discord account?! - var users = await ctx.GetTable() - .Where(x => x.UserId == userId) - .ToListAsync(); - - // first find all active subscriptions - // and return the one with the highest amount - var maxActive = users.Where(x => !x.ValidThru.IsBeforeToday()).MaxBy(x => x.AmountCents); - if (maxActive is not null) - return PatronUserToPatron(maxActive); - - // if there are no active subs, return the one with the highest amount - - var max = users.MaxBy(x => x.AmountCents); - if (max is null) - return default; // no patron with that name - - return PatronUserToPatron(max); - } - - public async Task LimitHitAsync(LimitedFeatureName key, ulong userId, int amount = 1) - { - if (_creds.GetCreds().IsOwner(userId)) - return true; - - if (!_pConf.Data.IsEnabled) - return true; - - var userLimit = await GetUserLimit(key, userId); - - if (userLimit.Quota == 0) - return false; - - if (userLimit.Quota == -1) - return true; - - return await TryAddLimit(key, userLimit, userId, amount); - } - - public async Task LimitForceHit(LimitedFeatureName key, ulong userId, int amount) - { - if (_creds.GetCreds().IsOwner(userId)) - return true; - - if (!_pConf.Data.IsEnabled) - return true; - - var userLimit = await GetUserLimit(key, userId); - - var cacheKey = CreateKey(key, userId); - await _cache.GetOrAddAsync(cacheKey, () => Task.FromResult(0), GetExpiry(userLimit)); - - return await TryAddLimit(key, userLimit, userId, amount); - } - - private async Task TryAddLimit( - LimitedFeatureName key, - QuotaLimit userLimit, - ulong userId, - int amount) - { - var cacheKey = CreateKey(key, userId); - var cur = await _cache.GetOrAddAsync(cacheKey, () => Task.FromResult(0), GetExpiry(userLimit)); - - if (cur + amount < userLimit.Quota) - { - await _cache.AddAsync(cacheKey, cur + amount); - return true; - } - - return false; - } - - private TimeSpan? GetExpiry(QuotaLimit userLimit) - { - var now = DateTime.UtcNow; - switch (userLimit.QuotaPeriod) - { - case QuotaPer.PerHour: - return TimeSpan.FromMinutes(60 - now.Minute); - case QuotaPer.PerDay: - return TimeSpan.FromMinutes((24 * 60) - ((now.Hour * 60) + now.Minute)); - case QuotaPer.PerMonth: - var firstOfNextMonth = now.FirstOfNextMonth(); - return firstOfNextMonth - now; - default: - return null; - } - } - - private TypedKey CreateKey(LimitedFeatureName key, ulong userId) - => new($"limited_feature:{key}:{userId}"); - - private readonly QuotaLimit _emptyQuota = new QuotaLimit() - { - Quota = 0, - QuotaPeriod = QuotaPer.PerDay, - }; - - private readonly QuotaLimit _infiniteQuota = new QuotaLimit() - { - Quota = -1, - QuotaPeriod = QuotaPer.PerDay, - }; - - public async Task GetUserLimit(LimitedFeatureName name, ulong userId) - { - if (!_pConf.Data.IsEnabled) - return _infiniteQuota; - - var maybePatron = await GetPatronAsync(userId); - - if (maybePatron is not { } patron) - return _emptyQuota; - - if (patron.ValidThru < DateTime.UtcNow) - return _emptyQuota; - - foreach (var (key, value) in _pConf.Data.Limits) - { - if (patron.Amount >= key) - { - if (value.TryGetValue(name, out var quotaLimit)) - { - return quotaLimit; - } - - break; - } - } - - return _emptyQuota; - } - - public async Task> LimitStats(ulong userId) - { - var dict = new Dictionary(); - foreach (var featureName in Enum.GetValues()) - { - var cacheKey = CreateKey(featureName, userId); - var userLimit = await GetUserLimit(featureName, userId); - var cur = await _cache.GetOrAddAsync(cacheKey, () => Task.FromResult(0), GetExpiry(userLimit)); - - dict[featureName] = (cur, userLimit); - } - - return dict; - } - - - private Patron PatronUserToPatron(PatronUser user) - => new Patron() - { - UniquePlatformUserId = user.UniquePlatformUserId, - UserId = user.UserId, - Amount = user.AmountCents, - Tier = CalculateTier(user), - PaidAt = user.LastCharge, - ValidThru = user.ValidThru, - }; - - private PatronTier CalculateTier(PatronUser user) - { - if (user.ValidThru.IsBeforeToday()) - return PatronTier.None; - - return user.AmountCents switch - { - >= 10_000 => PatronTier.C, - >= 5000 => PatronTier.L, - >= 2000 => PatronTier.XX, - >= 1000 => PatronTier.X, - >= 500 => PatronTier.V, - >= 100 => PatronTier.I, - _ => PatronTier.None - }; - } - - public int PercentBonus(Patron? maybePatron) - => maybePatron is { } user && user.ValidThru > DateTime.UtcNow - ? PercentBonus(user.Amount) - : 0; - - public int PercentBonus(long amount) - => amount switch - { - >= 10_000 => 100, - >= 5000 => 50, - >= 2000 => 20, - >= 1000 => 10, - >= 500 => 5, - _ => 0 - }; - - private async Task SendWelcomeMessage(Patron patron) - { - try - { - var user = (IUser)_client.GetUser(patron.UserId) ?? await _client.Rest.GetUserAsync(patron.UserId); - if (user is null) - return; - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("❤️ Thank you for supporting EllieBot! ❤️") - .WithDescription( - "Your donation has been processed and you will receive the rewards shortly.\n" - + "You can visit to see rewards for your tier. 🎉") - .AddField("Tier", Format.Bold(patron.Tier.ToString()), true) - .AddField("Pledge", $"**{patron.Amount / 100.0f:N1}$**", true) - .AddField("Expires", - patron.ValidThru.AddDays(1).ToShortAndRelativeTimestampTag(), - true) - .AddField("Instructions", - """ - *- Within the next **1-2 minutes** you will have all of the benefits of the Tier you've subscribed to.* - *- You can check your benefits on * - *- You can use the `.patron` command in this chat to check your current quota usage for the Patron-only commands* - *- **ALL** of the servers that you **own** will enjoy your Patron benefits.* - *- You can use any of the commands available in your tier on any server (assuming you have sufficient permissions to run those commands)* - *- Any user in any of your servers can use Patron-only commands, but they will spend **your quota**, which is why it's recommended to use Ellie's command cooldown system (.h .cmdcd) or permission system to limit the command usage for your server members.* - *- Permission guide can be found here if you're not familiar with it: * - """, - inline: false) - .WithFooter($"platform id: {patron.UniquePlatformUserId}"); - - await _sender.Response(user).Embed(eb).SendAsync(); - } - catch - { - Log.Warning("Unable to send a \"Welcome\" message to the patron {UserId}", patron.UserId); - } - } - - public async Task<(int Success, int Failed)> SendMessageToPatronsAsync(PatronTier tierAndHigher, string message) - { - await using var ctx = _db.GetDbContext(); - - var patrons = await ctx.GetTable() - .Where(x => x.ValidThru > DateTime.UtcNow) - .ToArrayAsync(); - - var text = SmartText.CreateFrom(message); - - var succ = 0; - var fail = 0; - foreach (var patron in patrons) - { - try - { - var user = await _client.GetUserAsync(patron.UserId); - await _sender.Response(user).Text(text).SendAsync(); - ++succ; - } - catch - { - ++fail; - } - - await Task.Delay(1000); - } - - return (succ, fail); - } - - public PatronConfigData GetConfig() - => _pConf.Data; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs b/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs deleted file mode 100644 index b552636..0000000 --- a/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs +++ /dev/null @@ -1,154 +0,0 @@ -#nullable disable -using EllieBot.Modules.Permissions.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions -{ - [Group] - public partial class BlacklistCommands : EllieModule - { - private readonly DiscordSocketClient _client; - - public BlacklistCommands(DiscordSocketClient client) - => _client = client; - - private async Task ListBlacklistInternal(string title, BlacklistType type, int page = 0) - { - ArgumentOutOfRangeException.ThrowIfNegative(page); - - var list = _service.GetBlacklist(); - var allItems = await list.Where(x => x.Type == type) - .Select(i => - { - try - { - return Task.FromResult(i.Type switch - { - BlacklistType.Channel => Format.Code(i.ItemId.ToString()) - + " " - + (_client.GetChannel(i.ItemId)?.ToString() - ?? ""), - BlacklistType.User => Format.Code(i.ItemId.ToString()) - + " " - + ((_client.GetUser(i.ItemId)) - ?.ToString() - ?? ""), - BlacklistType.Server => Format.Code(i.ItemId.ToString()) - + " " - + (_client.GetGuild(i.ItemId)?.ToString() ?? ""), - _ => Format.Code(i.ItemId.ToString()) - }); - } - catch - { - Log.Warning("Can't get {BlacklistType} [{BlacklistItemId}]", - i.Type, - i.ItemId); - - return Task.FromResult(Format.Code(i.ItemId.ToString())); - } - }) - .WhenAll(); - - await Response() - .Paginated() - .Items(allItems) - .PageSize(10) - .CurrentPage(page) - .Page((pageItems, _) => - { - if (pageItems.Count == 0) - return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(title) - .WithDescription(GetText(strs.empty_page)); - - return _sender.CreateEmbed() - .WithTitle(title) - .WithDescription(allItems.Join('\n')) - .WithOkColor(); - }) - .SendAsync(); - } - - [Cmd] - [OwnerOnly] - public Task UserBlacklist(int page = 1) - { - if (--page < 0) - return Task.CompletedTask; - - return ListBlacklistInternal(GetText(strs.blacklisted_users), BlacklistType.User, page); - } - - [Cmd] - [OwnerOnly] - public Task ChannelBlacklist(int page = 1) - { - if (--page < 0) - return Task.CompletedTask; - - return ListBlacklistInternal(GetText(strs.blacklisted_channels), BlacklistType.Channel, page); - } - - [Cmd] - [OwnerOnly] - public Task ServerBlacklist(int page = 1) - { - if (--page < 0) - return Task.CompletedTask; - - return ListBlacklistInternal(GetText(strs.blacklisted_servers), BlacklistType.Server, page); - } - - [Cmd] - [OwnerOnly] - public Task UserBlacklist(AddRemove action, ulong id) - => Blacklist(action, id, BlacklistType.User); - - [Cmd] - [OwnerOnly] - public Task UserBlacklist(AddRemove action, IUser usr) - => Blacklist(action, usr.Id, BlacklistType.User); - - [Cmd] - [OwnerOnly] - public Task ChannelBlacklist(AddRemove action, ulong id) - => Blacklist(action, id, BlacklistType.Channel); - - [Cmd] - [OwnerOnly] - public Task ServerBlacklist(AddRemove action, ulong id) - => Blacklist(action, id, BlacklistType.Server); - - [Cmd] - [OwnerOnly] - public Task ServerBlacklist(AddRemove action, IGuild guild) - => Blacklist(action, guild.Id, BlacklistType.Server); - - private async Task Blacklist(AddRemove action, ulong id, BlacklistType type) - { - if (action == AddRemove.Add) - await _service.Blacklist(type, id); - else - await _service.UnBlacklist(type, id); - - if (action == AddRemove.Add) - { - await Response() - .Confirm(strs.blacklisted(Format.Code(type.ToString()), - Format.Code(id.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.unblacklisted(Format.Code(type.ToString()), - Format.Code(id.ToString()))) - .SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CleverbotResponseCmdCdTypeReader.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CleverbotResponseCmdCdTypeReader.cs deleted file mode 100644 index 618ec59..0000000 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CleverbotResponseCmdCdTypeReader.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using static EllieBot.Common.TypeReaders.TypeReaderResult; - -namespace EllieBot.Modules.Permissions; - -public class CleverbotResponseCmdCdTypeReader : EllieTypeReader -{ - public override ValueTask> ReadAsync( - ICommandContext ctx, - string input) - => input.ToLowerInvariant() == CleverBotResponseStr.CLEVERBOT_RESPONSE - ? new(FromSuccess(new CleverBotResponseStr())) - : new(FromError(CommandError.ParseFailed, "Not a valid cleverbot")); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs deleted file mode 100644 index 55eb64d..0000000 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs +++ /dev/null @@ -1,141 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.Modules.Permissions.Services; - -public sealed class CmdCdService : IExecPreCommand, IReadyExecutor, IEService -{ - private readonly DbService _db; - private readonly ConcurrentDictionary> _settings = new(); - - private readonly ConcurrentDictionary<(ulong, string), ConcurrentDictionary> _activeCooldowns = - new(); - - public int Priority => 0; - - public CmdCdService(IBot bot, DbService db) - { - _db = db; - _settings = bot - .AllGuildConfigs - .ToDictionary(x => x.GuildId, x => x.CommandCooldowns - .DistinctBy(x => x.CommandName.ToLowerInvariant()) - .ToDictionary(c => c.CommandName, c => c.Seconds) - .ToConcurrent()) - .ToConcurrent(); - } - - public Task ExecPreCommandAsync(ICommandContext context, string moduleName, CommandInfo command) - => TryBlock(context.Guild, context.User, command.Name.ToLowerInvariant()); - - public Task TryBlock(IGuild? guild, IUser user, string commandName) - { - if (guild is null) - return Task.FromResult(false); - - if (!_settings.TryGetValue(guild.Id, out var cooldownSettings)) - return Task.FromResult(false); - - if (!cooldownSettings.TryGetValue(commandName, out var cdSeconds)) - return Task.FromResult(false); - - var cooldowns = _activeCooldowns.GetOrAdd( - (guild.Id, commandName), - static _ => new()); - - // if user is not already on cooldown, add - if (cooldowns.TryAdd(user.Id, DateTime.UtcNow)) - { - return Task.FromResult(false); - } - - // if there is an entry, maybe it expired. Try to check if it expired and don't fail if it did - // - just update - if (cooldowns.TryGetValue(user.Id, out var oldValue)) - { - var diff = DateTime.UtcNow - oldValue; - if (diff.TotalSeconds > cdSeconds) - { - if (cooldowns.TryUpdate(user.Id, DateTime.UtcNow, oldValue)) - return Task.FromResult(false); - } - } - - return Task.FromResult(true); - } - - public async Task OnReadyAsync() - { - using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); - - while (await timer.WaitForNextTickAsync()) - { - // once per hour delete expired entries - foreach (var ((guildId, commandName), dict) in _activeCooldowns) - { - // if this pair no longer has associated config, that means it has been removed. - // remove all cooldowns - if (!_settings.TryGetValue(guildId, out var inner) - || !inner.TryGetValue(commandName, out var cdSeconds)) - { - _activeCooldowns.Remove((guildId, commandName), out _); - continue; - } - - Cleanup(dict, cdSeconds); - } - } - } - - private void Cleanup(ConcurrentDictionary dict, int cdSeconds) - { - var now = DateTime.UtcNow; - foreach (var (key, _) in dict.Where(x => (now - x.Value).TotalSeconds > cdSeconds).ToArray()) - { - dict.TryRemove(key, out _); - } - } - - public void ClearCooldowns(ulong guildId, string cmdName) - { - if (_settings.TryGetValue(guildId, out var dict)) - dict.TryRemove(cmdName, out _); - - _activeCooldowns.TryRemove((guildId, cmdName), out _); - - using var ctx = _db.GetDbContext(); - var gc = ctx.GuildConfigsForId(guildId, x => x.Include(x => x.CommandCooldowns)); - gc.CommandCooldowns.RemoveWhere(x => x.CommandName == cmdName); - ctx.SaveChanges(); - } - - public void AddCooldown(ulong guildId, string name, int secs) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(secs); - - var sett = _settings.GetOrAdd(guildId, static _ => new()); - sett[name] = secs; - - // force cleanup - if (_activeCooldowns.TryGetValue((guildId, name), out var dict)) - Cleanup(dict, secs); - - using var ctx = _db.GetDbContext(); - var gc = ctx.GuildConfigsForId(guildId, x => x.Include(x => x.CommandCooldowns)); - gc.CommandCooldowns.RemoveWhere(x => x.CommandName == name); - gc.CommandCooldowns.Add(new() - { - Seconds = secs, - CommandName = name - }); - ctx.SaveChanges(); - } - - public IReadOnlyCollection<(string CommandName, int Seconds)> GetCommandCooldowns(ulong guildId) - { - if (!_settings.TryGetValue(guildId, out var dict)) - return Array.Empty<(string, int)>(); - - return dict.Select(x => (x.Key, x.Value)).ToArray(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs deleted file mode 100644 index a9b7a13..0000000 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs +++ /dev/null @@ -1,106 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Permissions.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions -{ - [Group] - public partial class CmdCdsCommands : EllieModule - { - private readonly DbService _db; - private readonly CmdCdService _service; - - public CmdCdsCommands(CmdCdService service, DbService db) - { - _service = service; - _db = db; - } - - private async Task CmdCooldownInternal(string cmdName, int secs) - { - var channel = (ITextChannel)ctx.Channel; - if (secs is < 0 or > 3600) - { - await Response().Error(strs.invalid_second_param_between(0, 3600)).SendAsync(); - return; - } - - var name = cmdName.ToLowerInvariant(); - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, set => set.Include(gc => gc.CommandCooldowns)); - - var toDelete = config.CommandCooldowns.FirstOrDefault(cc => cc.CommandName == name); - if (toDelete is not null) - uow.Set().Remove(toDelete); - if (secs != 0) - { - var cc = new CommandCooldown - { - CommandName = name, - Seconds = secs - }; - config.CommandCooldowns.Add(cc); - _service.AddCooldown(channel.Guild.Id, name, secs); - } - - await uow.SaveChangesAsync(); - } - - if (secs == 0) - { - _service.ClearCooldowns(ctx.Guild.Id, cmdName); - await Response().Confirm(strs.cmdcd_cleared(Format.Bold(name))).SendAsync(); - } - else - await Response().Confirm(strs.cmdcd_add(Format.Bold(name), Format.Bold(secs.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(0)] - public Task CmdCooldown(CleverBotResponseStr command, int secs) - => CmdCooldownInternal(CleverBotResponseStr.CLEVERBOT_RESPONSE, secs); - - [Cmd] - [RequireContext(ContextType.Guild)] - [Priority(1)] - public Task CmdCooldown(CommandOrExprInfo command, int secs) - => CmdCooldownInternal(command.Name, secs); - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AllCmdCooldowns(int page = 1) - { - if (--page < 0) - return; - - var localSet = _service.GetCommandCooldowns(ctx.Guild.Id); - - if (!localSet.Any()) - await Response().Confirm(strs.cmdcd_none).SendAsync(); - else - { - await Response() - .Paginated() - .Items(localSet) - .PageSize(15) - .CurrentPage(page) - .Page((items, _) => - { - var output = items.Select(x => - $"{Format.Code(x.CommandName)}: {x.Seconds}s"); - - return _sender.CreateEmbed() - .WithOkColor() - .WithDescription(output.Join("\n")); - }) - .SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs b/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs deleted file mode 100644 index fab1a11..0000000 --- a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs +++ /dev/null @@ -1,326 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Modules.Permissions.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions -{ - [Group] - public partial class FilterCommands : EllieModule - { - private readonly DbService _db; - - public FilterCommands(DbService db) - => _db = db; - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task FwClear() - { - _service.ClearFilteredWords(ctx.Guild.Id); - await Response().Confirm(strs.fw_cleared).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task FilterList() - { - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("Server filter settings"); - - var config = await _service.GetFilterSettings(ctx.Guild.Id); - - string GetEnabledEmoji(bool value) - => value ? "\\🟢" : "\\🔴"; - - async Task GetChannelListAsync(IReadOnlyCollection channels) - { - var toReturn = (await channels - .Select(async cid => - { - var ch = await ctx.Guild.GetChannelAsync(cid); - return ch is null - ? $"{cid} *missing*" - : $"<#{cid}>"; - }) - .WhenAll()) - .Join('\n'); - - if (string.IsNullOrWhiteSpace(toReturn)) - return GetText(strs.no_channel_found); - - return toReturn; - } - - embed.AddField($"{GetEnabledEmoji(config.FilterLinksEnabled)} Filter Links", - await GetChannelListAsync(config.FilterLinksChannels)); - - embed.AddField($"{GetEnabledEmoji(config.FilterInvitesEnabled)} Filter Invites", - await GetChannelListAsync(config.FilterInvitesChannels)); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task SrvrFilterInv() - { - var channel = (ITextChannel)ctx.Channel; - - bool enabled; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, set => set); - enabled = config.FilterInvites = !config.FilterInvites; - await uow.SaveChangesAsync(); - } - - if (enabled) - { - _service.InviteFilteringServers.Add(channel.Guild.Id); - await Response().Confirm(strs.invite_filter_server_on).SendAsync(); - } - else - { - _service.InviteFilteringServers.TryRemove(channel.Guild.Id); - await Response().Confirm(strs.invite_filter_server_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ChnlFilterInv() - { - var channel = (ITextChannel)ctx.Channel; - - FilterChannelId removed; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, - set => set.Include(gc => gc.FilterInvitesChannelIds)); - var match = new FilterChannelId - { - ChannelId = channel.Id - }; - removed = config.FilterInvitesChannelIds.FirstOrDefault(fc => fc.Equals(match)); - - if (removed is null) - config.FilterInvitesChannelIds.Add(match); - else - uow.Remove(removed); - await uow.SaveChangesAsync(); - } - - if (removed is null) - { - _service.InviteFilteringChannels.Add(channel.Id); - await Response().Confirm(strs.invite_filter_channel_on).SendAsync(); - } - else - { - _service.InviteFilteringChannels.TryRemove(channel.Id); - await Response().Confirm(strs.invite_filter_channel_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task SrvrFilterLin() - { - var channel = (ITextChannel)ctx.Channel; - - bool enabled; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, set => set); - enabled = config.FilterLinks = !config.FilterLinks; - await uow.SaveChangesAsync(); - } - - if (enabled) - { - _service.LinkFilteringServers.Add(channel.Guild.Id); - await Response().Confirm(strs.link_filter_server_on).SendAsync(); - } - else - { - _service.LinkFilteringServers.TryRemove(channel.Guild.Id); - await Response().Confirm(strs.link_filter_server_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ChnlFilterLin() - { - var channel = (ITextChannel)ctx.Channel; - - FilterLinksChannelId removed; - await using (var uow = _db.GetDbContext()) - { - var config = - uow.GuildConfigsForId(channel.Guild.Id, set => set.Include(gc => gc.FilterLinksChannelIds)); - var match = new FilterLinksChannelId - { - ChannelId = channel.Id - }; - removed = config.FilterLinksChannelIds.FirstOrDefault(fc => fc.Equals(match)); - - if (removed is null) - config.FilterLinksChannelIds.Add(match); - else - uow.Remove(removed); - await uow.SaveChangesAsync(); - } - - if (removed is null) - { - _service.LinkFilteringChannels.Add(channel.Id); - await Response().Confirm(strs.link_filter_channel_on).SendAsync(); - } - else - { - _service.LinkFilteringChannels.TryRemove(channel.Id); - await Response().Confirm(strs.link_filter_channel_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task SrvrFilterWords() - { - var channel = (ITextChannel)ctx.Channel; - - bool enabled; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, set => set); - enabled = config.FilterWords = !config.FilterWords; - await uow.SaveChangesAsync(); - } - - if (enabled) - { - _service.WordFilteringServers.Add(channel.Guild.Id); - await Response().Confirm(strs.word_filter_server_on).SendAsync(); - } - else - { - _service.WordFilteringServers.TryRemove(channel.Guild.Id); - await Response().Confirm(strs.word_filter_server_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ChnlFilterWords() - { - var channel = (ITextChannel)ctx.Channel; - - FilterWordsChannelId removed; - await using (var uow = _db.GetDbContext()) - { - var config = - uow.GuildConfigsForId(channel.Guild.Id, set => set.Include(gc => gc.FilterWordsChannelIds)); - - var match = new FilterWordsChannelId - { - ChannelId = channel.Id - }; - removed = config.FilterWordsChannelIds.FirstOrDefault(fc => fc.Equals(match)); - if (removed is null) - config.FilterWordsChannelIds.Add(match); - else - uow.Remove(removed); - await uow.SaveChangesAsync(); - } - - if (removed is null) - { - _service.WordFilteringChannels.Add(channel.Id); - await Response().Confirm(strs.word_filter_channel_on).SendAsync(); - } - else - { - _service.WordFilteringChannels.TryRemove(channel.Id); - await Response().Confirm(strs.word_filter_channel_off).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task FilterWord([Leftover] string word) - { - var channel = (ITextChannel)ctx.Channel; - - word = word?.Trim().ToLowerInvariant(); - - if (string.IsNullOrWhiteSpace(word)) - return; - - FilteredWord removed; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(channel.Guild.Id, set => set.Include(gc => gc.FilteredWords)); - - removed = config.FilteredWords.FirstOrDefault(fw => fw.Word.Trim().ToLowerInvariant() == word); - - if (removed is null) - { - config.FilteredWords.Add(new() - { - Word = word - }); - } - else - uow.Remove(removed); - - await uow.SaveChangesAsync(); - } - - var filteredWords = - _service.ServerFilteredWords.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet()); - - if (removed is null) - { - filteredWords.Add(word); - await Response().Confirm(strs.filter_word_add(Format.Code(word))).SendAsync(); - } - else - { - filteredWords.TryRemove(word); - await Response().Confirm(strs.filter_word_remove(Format.Code(word))).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task LstFilterWords(int page = 1) - { - page--; - if (page < 0) - return; - - var channel = (ITextChannel)ctx.Channel; - - _service.ServerFilteredWords.TryGetValue(channel.Guild.Id, out var fwHash); - - var fws = fwHash.ToArray(); - - await Response() - .Paginated() - .Items(fws) - .PageSize(10) - .CurrentPage(page) - .Page((items, _) => _sender.CreateEmbed() - .WithTitle(GetText(strs.filter_word_list)) - .WithDescription(string.Join("\n", items)) - .WithOkColor()) - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs deleted file mode 100644 index dd5fbc0..0000000 --- a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs +++ /dev/null @@ -1,249 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions.Services; - -public sealed class FilterService : IExecOnMessage -{ - public ConcurrentHashSet InviteFilteringChannels { get; } - public ConcurrentHashSet InviteFilteringServers { get; } - - //serverid, filteredwords - public ConcurrentDictionary> ServerFilteredWords { get; } - - public ConcurrentHashSet WordFilteringChannels { get; } - public ConcurrentHashSet WordFilteringServers { get; } - - public ConcurrentHashSet LinkFilteringChannels { get; } - public ConcurrentHashSet LinkFilteringServers { get; } - - public int Priority - => int.MaxValue - 1; - - private readonly DbService _db; - - public FilterService(DiscordSocketClient client, DbService db) - { - _db = db; - - using (var uow = db.GetDbContext()) - { - var ids = client.GetGuildIds(); - var configs = uow.Set() - .AsQueryable() - .Include(x => x.FilteredWords) - .Include(x => x.FilterLinksChannelIds) - .Include(x => x.FilterWordsChannelIds) - .Include(x => x.FilterInvitesChannelIds) - .Where(gc => ids.Contains(gc.GuildId)) - .ToList(); - - InviteFilteringServers = new(configs.Where(gc => gc.FilterInvites).Select(gc => gc.GuildId)); - InviteFilteringChannels = - new(configs.SelectMany(gc => gc.FilterInvitesChannelIds.Select(fci => fci.ChannelId))); - - LinkFilteringServers = new(configs.Where(gc => gc.FilterLinks).Select(gc => gc.GuildId)); - LinkFilteringChannels = - new(configs.SelectMany(gc => gc.FilterLinksChannelIds.Select(fci => fci.ChannelId))); - - var dict = configs.ToDictionary(gc => gc.GuildId, - gc => new ConcurrentHashSet(gc.FilteredWords.Select(fw => fw.Word).Distinct())); - - ServerFilteredWords = new(dict); - - var serverFiltering = configs.Where(gc => gc.FilterWords); - WordFilteringServers = new(serverFiltering.Select(gc => gc.GuildId)); - WordFilteringChannels = - new(configs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId))); - } - - client.MessageUpdated += (oldData, newMsg, channel) => - { - _ = Task.Run(() => - { - var guild = (channel as ITextChannel)?.Guild; - - if (guild is null || newMsg is not IUserMessage usrMsg) - return Task.CompletedTask; - - return ExecOnMessageAsync(guild, usrMsg); - }); - return Task.CompletedTask; - }; - } - - public ConcurrentHashSet FilteredWordsForChannel(ulong channelId, ulong guildId) - { - var words = new ConcurrentHashSet(); - if (WordFilteringChannels.Contains(channelId)) - ServerFilteredWords.TryGetValue(guildId, out words); - return words; - } - - public void ClearFilteredWords(ulong guildId) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, - set => set.Include(x => x.FilteredWords).Include(x => x.FilterWordsChannelIds)); - - WordFilteringServers.TryRemove(guildId); - ServerFilteredWords.TryRemove(guildId, out _); - - foreach (var c in gc.FilterWordsChannelIds) - WordFilteringChannels.TryRemove(c.ChannelId); - - gc.FilterWords = false; - gc.FilteredWords.Clear(); - gc.FilterWordsChannelIds.Clear(); - - uow.SaveChanges(); - } - - public ConcurrentHashSet FilteredWordsForServer(ulong guildId) - { - var words = new ConcurrentHashSet(); - if (WordFilteringServers.Contains(guildId)) - ServerFilteredWords.TryGetValue(guildId, out words); - return words; - } - - public async Task ExecOnMessageAsync(IGuild guild, IUserMessage msg) - { - if (msg.Author is not IGuildUser gu || gu.GuildPermissions.Administrator) - return false; - - var results = await Task.WhenAll(FilterInvites(guild, msg), FilterWords(guild, msg), FilterLinks(guild, msg)); - - return results.Any(x => x); - } - - private async Task FilterWords(IGuild guild, IUserMessage usrMsg) - { - if (guild is null) - return false; - if (usrMsg is null) - return false; - - var filteredChannelWords = - FilteredWordsForChannel(usrMsg.Channel.Id, guild.Id) ?? new ConcurrentHashSet(); - var filteredServerWords = FilteredWordsForServer(guild.Id) ?? new ConcurrentHashSet(); - var wordsInMessage = usrMsg.Content.ToLowerInvariant().Split(' '); - if (filteredChannelWords.Count != 0 || filteredServerWords.Count != 0) - { - foreach (var word in wordsInMessage) - { - if (filteredChannelWords.Contains(word) || filteredServerWords.Contains(word)) - { - Log.Information("User {UserName} [{UserId}] used a filtered word in {ChannelId} channel", - usrMsg.Author.ToString(), - usrMsg.Author.Id, - usrMsg.Channel.Id); - - try - { - await usrMsg.DeleteAsync(); - } - catch (HttpException ex) - { - Log.Warning(ex, - "I do not have permission to filter words in channel with id {Id}", - usrMsg.Channel.Id); - } - - return true; - } - } - } - - return false; - } - - private async Task FilterInvites(IGuild guild, IUserMessage usrMsg) - { - if (guild is null) - return false; - if (usrMsg is null) - return false; - - // if user has manage messages perm, don't filter - if (usrMsg.Channel is ITextChannel ch && usrMsg.Author is IGuildUser gu && gu.GetPermissions(ch).ManageMessages) - return false; - - if ((InviteFilteringChannels.Contains(usrMsg.Channel.Id) || InviteFilteringServers.Contains(guild.Id)) - && usrMsg.Content.IsDiscordInvite()) - { - Log.Information("User {UserName} [{UserId}] sent a filtered invite to {ChannelId} channel", - usrMsg.Author.ToString(), - usrMsg.Author.Id, - usrMsg.Channel.Id); - - try - { - await usrMsg.DeleteAsync(); - return true; - } - catch (HttpException ex) - { - Log.Warning(ex, - "I do not have permission to filter invites in channel with id {Id}", - usrMsg.Channel.Id); - return true; - } - } - - return false; - } - - private async Task FilterLinks(IGuild guild, IUserMessage usrMsg) - { - if (guild is null) - return false; - if (usrMsg is null) - return false; - - // if user has manage messages perm, don't filter - if (usrMsg.Channel is ITextChannel ch && usrMsg.Author is IGuildUser gu && gu.GetPermissions(ch).ManageMessages) - return false; - - if ((LinkFilteringChannels.Contains(usrMsg.Channel.Id) || LinkFilteringServers.Contains(guild.Id)) - && usrMsg.Content.TryGetUrlPath(out _)) - { - Log.Information("User {UserName} [{UserId}] sent a filtered link to {ChannelId} channel", - usrMsg.Author.ToString(), - usrMsg.Author.Id, - usrMsg.Channel.Id); - - try - { - await usrMsg.DeleteAsync(); - return true; - } - catch (HttpException ex) - { - Log.Warning(ex, "I do not have permission to filter links in channel with id {Id}", usrMsg.Channel.Id); - return true; - } - } - - return false; - } - - public async Task GetFilterSettings(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, - set => set - .Include(x => x.FilterInvitesChannelIds) - .Include(x => x.FilterLinksChannelIds)); - - return new() - { - FilterInvitesChannels = gc.FilterInvitesChannelIds.Map(x => x.ChannelId), - FilterLinksChannels = gc.FilterLinksChannelIds.Map(x => x.ChannelId), - FilterInvitesEnabled = gc.FilterInvites, - FilterLinksEnabled = gc.FilterLinks, - }; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/Filter/ServerFilterSettings.cs b/src/EllieBot/Modules/Permissions/Filter/ServerFilterSettings.cs deleted file mode 100644 index 3c60a9f..0000000 --- a/src/EllieBot/Modules/Permissions/Filter/ServerFilterSettings.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Permissions.Services; - -public readonly struct ServerFilterSettings -{ - public bool FilterInvitesEnabled { get; init; } - public bool FilterLinksEnabled { get; init; } - public IReadOnlyCollection FilterInvitesChannels { get; init; } - public IReadOnlyCollection FilterLinksChannels { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionCommands.cs b/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionCommands.cs deleted file mode 100644 index d3abefd..0000000 --- a/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionCommands.cs +++ /dev/null @@ -1,77 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Modules.Permissions.Services; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions -{ - [Group] - public partial class GlobalPermissionCommands : EllieModule - { - private readonly GlobalPermissionService _service; - private readonly DbService _db; - - public GlobalPermissionCommands(GlobalPermissionService service, DbService db) - { - _service = service; - _db = db; - } - - [Cmd] - [OwnerOnly] - public async Task GlobalPermList() - { - var blockedModule = _service.BlockedModules; - var blockedCommands = _service.BlockedCommands; - if (!blockedModule.Any() && !blockedCommands.Any()) - { - await Response().Error(strs.lgp_none).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed().WithOkColor(); - - if (blockedModule.Any()) - embed.AddField(GetText(strs.blocked_modules), string.Join("\n", _service.BlockedModules)); - - if (blockedCommands.Any()) - embed.AddField(GetText(strs.blocked_commands), string.Join("\n", _service.BlockedCommands)); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task GlobalModule(ModuleOrExpr module) - { - var moduleName = module.Name.ToLowerInvariant(); - - var added = _service.ToggleModule(moduleName); - - if (added) - { - await Response().Confirm(strs.gmod_add(Format.Bold(module.Name))).SendAsync(); - return; - } - - await Response().Confirm(strs.gmod_remove(Format.Bold(module.Name))).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task GlobalCommand(CommandOrExprInfo cmd) - { - var commandName = cmd.Name.ToLowerInvariant(); - var added = _service.ToggleCommand(commandName); - - if (added) - { - await Response().Confirm(strs.gcmd_add(Format.Bold(cmd.Name))).SendAsync(); - return; - } - - await Response().Confirm(strs.gcmd_remove(Format.Bold(cmd.Name))).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs b/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs deleted file mode 100644 index 42ad5d7..0000000 --- a/src/EllieBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable disable -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.Modules.Permissions.Services; - -public class GlobalPermissionService : IExecPreCommand, IEService -{ - public int Priority { get; } = 0; - - public HashSet BlockedCommands - => _bss.Data.Blocked.Commands; - - public HashSet BlockedModules - => _bss.Data.Blocked.Modules; - - private readonly BotConfigService _bss; - - public GlobalPermissionService(BotConfigService bss) - => _bss = bss; - - - public Task ExecPreCommandAsync(ICommandContext ctx, string moduleName, CommandInfo command) - { - var settings = _bss.Data; - var commandName = command.Name.ToLowerInvariant(); - - if (commandName != "resetglobalperms" - && (settings.Blocked.Commands.Contains(commandName) - || settings.Blocked.Modules.Contains(moduleName.ToLowerInvariant()))) - return Task.FromResult(true); - - return Task.FromResult(false); - } - - /// - /// Toggles module blacklist - /// - /// Lowercase module name - /// Whether the module is added - public bool ToggleModule(string moduleName) - { - var added = false; - _bss.ModifyConfig(bs => - { - if (bs.Blocked.Modules.Add(moduleName)) - added = true; - else - { - bs.Blocked.Modules.Remove(moduleName); - added = false; - } - }); - - return added; - } - - /// - /// Toggles command blacklist - /// - /// Lowercase command name - /// Whether the command is added - public bool ToggleCommand(string commandName) - { - var added = false; - _bss.ModifyConfig(bs => - { - if (bs.Blocked.Commands.Add(commandName)) - added = true; - else - { - bs.Blocked.Commands.Remove(commandName); - added = false; - } - }); - - return added; - } - - /// - /// Resets all global permissions - /// - public Task Reset() - { - _bss.ModifyConfig(bs => - { - bs.Blocked.Commands.Clear(); - bs.Blocked.Modules.Clear(); - }); - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/PermissionCache.cs b/src/EllieBot/Modules/Permissions/PermissionCache.cs deleted file mode 100644 index 75bd501..0000000 --- a/src/EllieBot/Modules/Permissions/PermissionCache.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions.Common; - -public class PermissionCache -{ - public string PermRole { get; set; } - public bool Verbose { get; set; } = true; - public PermissionsCollection Permissions { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/PermissionExtensions.cs b/src/EllieBot/Modules/Permissions/PermissionExtensions.cs deleted file mode 100644 index 776664e..0000000 --- a/src/EllieBot/Modules/Permissions/PermissionExtensions.cs +++ /dev/null @@ -1,132 +0,0 @@ -#nullable disable -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions.Common; - -public static class PermissionExtensions -{ - public static bool CheckPermissions( - this IEnumerable permsEnumerable, - IUser user, - IMessageChannel message, - string commandName, - string moduleName, - out int permIndex) - { - var perms = permsEnumerable as List ?? permsEnumerable.ToList(); - - for (var i = perms.Count - 1; i >= 0; i--) - { - var perm = perms[i]; - - var result = perm.CheckPermission(user, message, commandName, moduleName); - - if (result is null) - continue; - permIndex = i; - return result.Value; - } - - permIndex = -1; //defaut behaviour - return true; - } - - //null = not applicable - //true = applicable, allowed - //false = applicable, not allowed - public static bool? CheckPermission( - this Permissionv2 perm, - IUser user, - IMessageChannel channel, - string commandName, - string moduleName) - { - if (!((perm.SecondaryTarget == SecondaryPermissionType.Command - && string.Equals(perm.SecondaryTargetName, commandName, StringComparison.InvariantCultureIgnoreCase)) - || (perm.SecondaryTarget == SecondaryPermissionType.Module - && string.Equals(perm.SecondaryTargetName, moduleName, StringComparison.InvariantCultureIgnoreCase)) - || perm.SecondaryTarget == SecondaryPermissionType.AllModules)) - return null; - - var guildUser = user as IGuildUser; - - switch (perm.PrimaryTarget) - { - case PrimaryPermissionType.User: - if (perm.PrimaryTargetId == user.Id) - return perm.State; - break; - case PrimaryPermissionType.Channel: - if (perm.PrimaryTargetId == channel.Id) - return perm.State; - break; - case PrimaryPermissionType.Role: - if (guildUser is null) - break; - if (guildUser.RoleIds.Contains(perm.PrimaryTargetId)) - return perm.State; - break; - case PrimaryPermissionType.Server: - if (guildUser is null) - break; - return perm.State; - } - - return null; - } - - public static string GetCommand(this Permissionv2 perm, string prefix, SocketGuild guild = null) - { - var com = string.Empty; - switch (perm.PrimaryTarget) - { - case PrimaryPermissionType.User: - com += "u"; - break; - case PrimaryPermissionType.Channel: - com += "c"; - break; - case PrimaryPermissionType.Role: - com += "r"; - break; - case PrimaryPermissionType.Server: - com += "s"; - break; - } - - switch (perm.SecondaryTarget) - { - case SecondaryPermissionType.Module: - com += "m"; - break; - case SecondaryPermissionType.Command: - com += "c"; - break; - case SecondaryPermissionType.AllModules: - com = "a" + com + "m"; - break; - } - - var secName = perm.SecondaryTarget == SecondaryPermissionType.Command && !perm.IsCustomCommand - ? prefix + perm.SecondaryTargetName - : perm.SecondaryTargetName; - com += " " + (perm.SecondaryTargetName != "*" ? secName + " " : "") + (perm.State ? "enable" : "disable") + " "; - - switch (perm.PrimaryTarget) - { - case PrimaryPermissionType.User: - com += guild?.GetUser(perm.PrimaryTargetId)?.ToString() ?? $"<@{perm.PrimaryTargetId}>"; - break; - case PrimaryPermissionType.Channel: - com += $"<#{perm.PrimaryTargetId}>"; - break; - case PrimaryPermissionType.Role: - com += guild?.GetRole(perm.PrimaryTargetId)?.ToString() ?? $"<@&{perm.PrimaryTargetId}>"; - break; - case PrimaryPermissionType.Server: - break; - } - - return prefix + com; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/Permissions.cs b/src/EllieBot/Modules/Permissions/Permissions.cs deleted file mode 100644 index 5fb6fb2..0000000 --- a/src/EllieBot/Modules/Permissions/Permissions.cs +++ /dev/null @@ -1,543 +0,0 @@ -#nullable disable -using EllieBot.Common.TypeReaders; -using EllieBot.Common.TypeReaders.Models; -using EllieBot.Modules.Permissions.Common; -using EllieBot.Modules.Permissions.Services; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions : EllieModule -{ - public enum Reset { Reset } - - private readonly DbService _db; - - public Permissions(DbService db) - => _db = db; - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Verbose(PermissionAction action = null) - { - await using (var uow = _db.GetDbContext()) - { - var config = uow.GcWithPermissionsFor(ctx.Guild.Id); - if (action is null) - action = new(!config.VerbosePermissions); // New behaviour, can toggle. - config.VerbosePermissions = action.Value; - await uow.SaveChangesAsync(); - _service.UpdateCache(config); - } - - if (action.Value) - await Response().Confirm(strs.verbose_true).SendAsync(); - else - await Response().Confirm(strs.verbose_false).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(0)] - public async Task PermRole([Leftover] IRole role = null) - { - if (role is not null && role == role.Guild.EveryoneRole) - return; - - if (role is null) - { - var cache = _service.GetCacheFor(ctx.Guild.Id); - if (!ulong.TryParse(cache.PermRole, out var roleId) - || (role = ((SocketGuild)ctx.Guild).GetRole(roleId)) is null) - await Response().Confirm(strs.permrole_not_set).SendAsync(); - else - await Response().Confirm(strs.permrole(Format.Bold(role.ToString()))).SendAsync(); - return; - } - - await using (var uow = _db.GetDbContext()) - { - var config = uow.GcWithPermissionsFor(ctx.Guild.Id); - config.PermissionRole = role.Id.ToString(); - uow.SaveChanges(); - _service.UpdateCache(config); - } - - await Response().Confirm(strs.permrole_changed(Format.Bold(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [Priority(1)] - public async Task PermRole(Reset _) - { - await using (var uow = _db.GetDbContext()) - { - var config = uow.GcWithPermissionsFor(ctx.Guild.Id); - config.PermissionRole = null; - await uow.SaveChangesAsync(); - _service.UpdateCache(config); - } - - await Response().Confirm(strs.permrole_reset).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ListPerms(int page = 1) - { - if (page < 1) - return; - - IList perms; - - if (_service.Cache.TryGetValue(ctx.Guild.Id, out var permCache)) - perms = permCache.Permissions.Source.ToList(); - else - perms = Permissionv2.GetDefaultPermlist; - - var startPos = 20 * (page - 1); - var toSend = Format.Bold(GetText(strs.page(page))) - + "\n\n" - + string.Join("\n", - perms.Reverse() - .Skip(startPos) - .Take(20) - .Select(p => - { - var str = - $"`{p.Index + 1}.` {Format.Bold(p.GetCommand(prefix, (SocketGuild)ctx.Guild))}"; - if (p.Index == 0) - str += $" [{GetText(strs.uneditable)}]"; - return str; - })); - - await Response().Confirm(toSend).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RemovePerm(int index) - { - index -= 1; - if (index < 0) - return; - try - { - Permissionv2 p; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GcWithPermissionsFor(ctx.Guild.Id); - var permsCol = new PermissionsCollection(config.Permissions); - p = permsCol[index]; - permsCol.RemoveAt(index); - uow.Remove(p); - await uow.SaveChangesAsync(); - _service.UpdateCache(config); - } - - await Response() - .Confirm(strs.removed(index + 1, - Format.Code(p.GetCommand(prefix, (SocketGuild)ctx.Guild)))) - .SendAsync(); - } - catch (IndexOutOfRangeException) - { - await Response().Error(strs.perm_out_of_range).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task MovePerm(int from, int to) - { - from -= 1; - to -= 1; - if (!(from == to || from < 0 || to < 0)) - { - try - { - Permissionv2 fromPerm; - await using (var uow = _db.GetDbContext()) - { - var config = uow.GcWithPermissionsFor(ctx.Guild.Id); - var permsCol = new PermissionsCollection(config.Permissions); - - var fromFound = from < permsCol.Count; - var toFound = to < permsCol.Count; - - if (!fromFound) - { - await Response().Error(strs.perm_not_found(++from)).SendAsync(); - return; - } - - if (!toFound) - { - await Response().Error(strs.perm_not_found(++to)).SendAsync(); - return; - } - - fromPerm = permsCol[from]; - - permsCol.RemoveAt(from); - permsCol.Insert(to, fromPerm); - await uow.SaveChangesAsync(); - _service.UpdateCache(config); - } - - await Response() - .Confirm(strs.moved_permission( - Format.Code(fromPerm.GetCommand(prefix, (SocketGuild)ctx.Guild)), - ++from, - ++to)) - .SendAsync(); - - return; - } - catch (Exception e) when (e is ArgumentOutOfRangeException or IndexOutOfRangeException) - { - } - } - - await Response().Confirm(strs.perm_out_of_range).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task SrvrCmd(CommandOrExprInfo command, PermissionAction action) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Server, - PrimaryTargetId = 0, - SecondaryTarget = SecondaryPermissionType.Command, - SecondaryTargetName = command.Name.ToLowerInvariant(), - State = action.Value, - IsCustomCommand = command.IsCustom - }); - - if (action.Value) - await Response().Confirm(strs.sx_enable(Format.Code(command.Name), GetText(strs.of_command))).SendAsync(); - else - await Response().Confirm(strs.sx_disable(Format.Code(command.Name), GetText(strs.of_command))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task SrvrMdl(ModuleOrExpr module, PermissionAction action) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Server, - PrimaryTargetId = 0, - SecondaryTarget = SecondaryPermissionType.Module, - SecondaryTargetName = module.Name.ToLowerInvariant(), - State = action.Value - }); - - if (action.Value) - await Response().Confirm(strs.sx_enable(Format.Code(module.Name), GetText(strs.of_module))).SendAsync(); - else - await Response().Confirm(strs.sx_disable(Format.Code(module.Name), GetText(strs.of_module))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task UsrCmd(CommandOrExprInfo command, PermissionAction action, [Leftover] IGuildUser user) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.User, - PrimaryTargetId = user.Id, - SecondaryTarget = SecondaryPermissionType.Command, - SecondaryTargetName = command.Name.ToLowerInvariant(), - State = action.Value, - IsCustomCommand = command.IsCustom - }); - - if (action.Value) - { - await Response() - .Confirm(strs.ux_enable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(user.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.ux_disable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(user.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task UsrMdl(ModuleOrExpr module, PermissionAction action, [Leftover] IGuildUser user) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.User, - PrimaryTargetId = user.Id, - SecondaryTarget = SecondaryPermissionType.Module, - SecondaryTargetName = module.Name.ToLowerInvariant(), - State = action.Value - }); - - if (action.Value) - { - await Response() - .Confirm(strs.ux_enable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(user.ToString()))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.ux_disable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(user.ToString()))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RoleCmd(CommandOrExprInfo command, PermissionAction action, [Leftover] IRole role) - { - if (role == role.Guild.EveryoneRole) - return; - - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Role, - PrimaryTargetId = role.Id, - SecondaryTarget = SecondaryPermissionType.Command, - SecondaryTargetName = command.Name.ToLowerInvariant(), - State = action.Value, - IsCustomCommand = command.IsCustom - }); - - if (action.Value) - { - await Response() - .Confirm(strs.rx_enable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(role.Name))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.rx_disable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(role.Name))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task RoleMdl(ModuleOrExpr module, PermissionAction action, [Leftover] IRole role) - { - if (role == role.Guild.EveryoneRole) - return; - - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Role, - PrimaryTargetId = role.Id, - SecondaryTarget = SecondaryPermissionType.Module, - SecondaryTargetName = module.Name.ToLowerInvariant(), - State = action.Value - }); - - - if (action.Value) - { - await Response() - .Confirm(strs.rx_enable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(role.Name))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.rx_disable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(role.Name))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ChnlCmd(CommandOrExprInfo command, PermissionAction action, [Leftover] ITextChannel chnl) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Channel, - PrimaryTargetId = chnl.Id, - SecondaryTarget = SecondaryPermissionType.Command, - SecondaryTargetName = command.Name.ToLowerInvariant(), - State = action.Value, - IsCustomCommand = command.IsCustom - }); - - if (action.Value) - { - await Response() - .Confirm(strs.cx_enable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(chnl.Name))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.cx_disable(Format.Code(command.Name), - GetText(strs.of_command), - Format.Code(chnl.Name))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task ChnlMdl(ModuleOrExpr module, PermissionAction action, [Leftover] ITextChannel chnl) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Channel, - PrimaryTargetId = chnl.Id, - SecondaryTarget = SecondaryPermissionType.Module, - SecondaryTargetName = module.Name.ToLowerInvariant(), - State = action.Value - }); - - if (action.Value) - { - await Response() - .Confirm(strs.cx_enable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(chnl.Name))) - .SendAsync(); - } - else - { - await Response() - .Confirm(strs.cx_disable(Format.Code(module.Name), - GetText(strs.of_module), - Format.Code(chnl.Name))) - .SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AllChnlMdls(PermissionAction action, [Leftover] ITextChannel chnl) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Channel, - PrimaryTargetId = chnl.Id, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = action.Value - }); - - if (action.Value) - await Response().Confirm(strs.acm_enable(Format.Code(chnl.Name))).SendAsync(); - else - await Response().Confirm(strs.acm_disable(Format.Code(chnl.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AllRoleMdls(PermissionAction action, [Leftover] IRole role) - { - if (role == role.Guild.EveryoneRole) - return; - - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Role, - PrimaryTargetId = role.Id, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = action.Value - }); - - if (action.Value) - await Response().Confirm(strs.arm_enable(Format.Code(role.Name))).SendAsync(); - else - await Response().Confirm(strs.arm_disable(Format.Code(role.Name))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AllUsrMdls(PermissionAction action, [Leftover] IUser user) - { - await _service.AddPermissions(ctx.Guild.Id, - new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.User, - PrimaryTargetId = user.Id, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = action.Value - }); - - if (action.Value) - await Response().Confirm(strs.aum_enable(Format.Code(user.ToString()))).SendAsync(); - else - await Response().Confirm(strs.aum_disable(Format.Code(user.ToString()))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AllSrvrMdls(PermissionAction action) - { - var newPerm = new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.Server, - PrimaryTargetId = 0, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = action.Value - }; - - var allowUser = new Permissionv2 - { - PrimaryTarget = PrimaryPermissionType.User, - PrimaryTargetId = ctx.User.Id, - SecondaryTarget = SecondaryPermissionType.AllModules, - SecondaryTargetName = "*", - State = true - }; - - await _service.AddPermissions(ctx.Guild.Id, newPerm, allowUser); - - if (action.Value) - await Response().Confirm(strs.asm_enable).SendAsync(); - else - await Response().Confirm(strs.asm_disable).SendAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/PermissionsCollection.cs b/src/EllieBot/Modules/Permissions/PermissionsCollection.cs deleted file mode 100644 index e869bc7..0000000 --- a/src/EllieBot/Modules/Permissions/PermissionsCollection.cs +++ /dev/null @@ -1,74 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Permissions.Common; - -public class PermissionsCollection : IndexedCollection - where T : class, IIndexed -{ - public override T this[int index] - { - get => Source[index]; - set - { - lock (_localLocker) - { - if (index == 0) // can't set first element. It's always allow all - throw new IndexOutOfRangeException(nameof(index)); - base[index] = value; - } - } - } - - private readonly object _localLocker = new(); - - public PermissionsCollection(IEnumerable source) - : base(source) - { - } - - public static implicit operator List(PermissionsCollection x) - => x.Source; - - public override void Clear() - { - lock (_localLocker) - { - var first = Source[0]; - base.Clear(); - Source[0] = first; - } - } - - public override bool Remove(T item) - { - bool removed; - lock (_localLocker) - { - if (Source.IndexOf(item) == 0) - throw new ArgumentException("You can't remove first permsission (allow all)"); - removed = base.Remove(item); - } - - return removed; - } - - public override void Insert(int index, T item) - { - lock (_localLocker) - { - if (index == 0) // can't insert on first place. Last item is always allow all. - throw new IndexOutOfRangeException(nameof(index)); - base.Insert(index, item); - } - } - - public override void RemoveAt(int index) - { - lock (_localLocker) - { - if (index == 0) // you can't remove first permission (allow all) - throw new IndexOutOfRangeException(nameof(index)); - - base.RemoveAt(index); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/PermissionsService.cs b/src/EllieBot/Modules/Permissions/PermissionsService.cs deleted file mode 100644 index e0ac658..0000000 --- a/src/EllieBot/Modules/Permissions/PermissionsService.cs +++ /dev/null @@ -1,184 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Modules.Permissions.Common; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Permissions.Services; - -public class PermissionService : IExecPreCommand, IEService -{ - public int Priority { get; } = 0; - - //guildid, root permission - public ConcurrentDictionary Cache { get; } = new(); - - private readonly DbService _db; - private readonly CommandHandler _cmd; - private readonly IBotStrings _strings; - private readonly IMessageSenderService _sender; - - public PermissionService( - DiscordSocketClient client, - DbService db, - CommandHandler cmd, - IBotStrings strings, - IMessageSenderService sender) - { - _db = db; - _cmd = cmd; - _strings = strings; - _sender = sender; - - using var uow = _db.GetDbContext(); - foreach (var x in uow.Set().PermissionsForAll(client.Guilds.ToArray().Select(x => x.Id).ToList())) - { - Cache.TryAdd(x.GuildId, - new() - { - Verbose = x.VerbosePermissions, - PermRole = x.PermissionRole, - Permissions = new(x.Permissions) - }); - } - } - - public PermissionCache GetCacheFor(ulong guildId) - { - if (!Cache.TryGetValue(guildId, out var pc)) - { - using (var uow = _db.GetDbContext()) - { - var config = uow.GuildConfigsForId(guildId, set => set.Include(x => x.Permissions)); - UpdateCache(config); - } - - Cache.TryGetValue(guildId, out pc); - if (pc is null) - throw new("Cache is null."); - } - - return pc; - } - - public async Task AddPermissions(ulong guildId, params Permissionv2[] perms) - { - await using var uow = _db.GetDbContext(); - var config = uow.GcWithPermissionsFor(guildId); - //var orderedPerms = new PermissionsCollection(config.Permissions); - var max = config.Permissions.Max(x => x.Index); //have to set its index to be the highest - foreach (var perm in perms) - { - perm.Index = ++max; - config.Permissions.Add(perm); - } - - await uow.SaveChangesAsync(); - UpdateCache(config); - } - - public void UpdateCache(GuildConfig config) - => Cache.AddOrUpdate(config.GuildId, - new PermissionCache - { - Permissions = new(config.Permissions), - PermRole = config.PermissionRole, - Verbose = config.VerbosePermissions - }, - (_, old) => - { - old.Permissions = new(config.Permissions); - old.PermRole = config.PermissionRole; - old.Verbose = config.VerbosePermissions; - return old; - }); - - public async Task ExecPreCommandAsync(ICommandContext ctx, string moduleName, CommandInfo command) - { - var guild = ctx.Guild; - var msg = ctx.Message; - var user = ctx.User; - var channel = ctx.Channel; - var commandName = command.Name.ToLowerInvariant(); - - if (guild is null) - return false; - - var resetCommand = commandName == "resetperms"; - - var pc = GetCacheFor(guild.Id); - if (!resetCommand - && !pc.Permissions.CheckPermissions(msg.Author, msg.Channel, commandName, moduleName, out var index)) - { - if (pc.Verbose) - { - try - { - await _sender.Response(channel) - .Error(_strings.GetText(strs.perm_prevent(index + 1, - Format.Bold(pc.Permissions[index] - .GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))), - guild.Id)) - .SendAsync(); - } - catch - { - } - } - - return true; - } - - - if (moduleName == nameof(Permissions)) - { - if (user is not IGuildUser guildUser) - return true; - - if (guildUser.GuildPermissions.Administrator) - return false; - - var permRole = pc.PermRole; - if (!ulong.TryParse(permRole, out var rid)) - rid = 0; - string returnMsg; - IRole role; - if (string.IsNullOrWhiteSpace(permRole) || (role = guild.GetRole(rid)) is null) - { - returnMsg = "You need Admin permissions in order to use permission commands."; - if (pc.Verbose) - { - try { await _sender.Response(channel).Error(returnMsg).SendAsync(); } - catch { } - } - - return true; - } - - if (!guildUser.RoleIds.Contains(rid)) - { - returnMsg = $"You need the {Format.Bold(role.Name)} role in order to use permission commands."; - if (pc.Verbose) - { - try { await _sender.Response(channel).Error(returnMsg).SendAsync(); } - catch { } - } - - return true; - } - - return false; - } - - return false; - } - - public async Task Reset(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var config = uow.GcWithPermissionsFor(guildId); - config.Permissions = Permissionv2.GetDefaultPermlist; - await uow.SaveChangesAsync(); - UpdateCache(config); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Permissions/ResetPermissionsCommands.cs b/src/EllieBot/Modules/Permissions/ResetPermissionsCommands.cs deleted file mode 100644 index 4193337..0000000 --- a/src/EllieBot/Modules/Permissions/ResetPermissionsCommands.cs +++ /dev/null @@ -1,37 +0,0 @@ -#nullable disable -using EllieBot.Modules.Permissions.Services; - -namespace EllieBot.Modules.Permissions; - -public partial class Permissions -{ - [Group] - public partial class ResetPermissionsCommands : EllieModule - { - private readonly GlobalPermissionService _gps; - private readonly PermissionService _perms; - - public ResetPermissionsCommands(GlobalPermissionService gps, PermissionService perms) - { - _gps = gps; - _perms = perms; - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task ResetPerms() - { - await _perms.Reset(ctx.Guild.Id); - await Response().Confirm(strs.perms_reset).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task ResetGlobalPerms() - { - await _gps.Reset(); - await Response().Confirm(strs.global_perms_reset).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Anime/AnimeResult.cs b/src/EllieBot/Modules/Searches/Anime/AnimeResult.cs deleted file mode 100644 index c47eed7..0000000 --- a/src/EllieBot/Modules/Searches/Anime/AnimeResult.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches.Common; - -public class AnimeResult -{ - [JsonPropertyName("id")] - public int Id { get; set; } - - [JsonPropertyName("airing_status")] - public string AiringStatusParsed { get; set; } - - [JsonPropertyName("title_english")] - public string TitleEnglish { get; set; } - - [JsonPropertyName("total_episodes")] - public int TotalEpisodes { get; set; } - - [JsonPropertyName("description")] - public string Description { get; set; } - - [JsonPropertyName("image_url_lge")] - public string ImageUrlLarge { get; set; } - - [JsonPropertyName("genres")] - public string[] Genres { get; set; } - - [JsonPropertyName("average_score")] - public float AverageScore { get; set; } - - - public string AiringStatus - => AiringStatusParsed.ToTitleCase(); - - public string Link - => "http://anilist.co/anime/" + Id; - - public string Synopsis - => Description?[..(Description.Length > 500 ? 500 : Description.Length)] + "..."; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs b/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs deleted file mode 100644 index d86cd14..0000000 --- a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs +++ /dev/null @@ -1,77 +0,0 @@ -#nullable disable -using AngleSharp; -using AngleSharp.Html.Dom; -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class AnimeSearchCommands : EllieModule - { - [Cmd] - public async Task Anime([Leftover] string query) - { - if (string.IsNullOrWhiteSpace(query)) - return; - - var animeData = await _service.GetAnimeData(query); - - if (animeData is null) - { - await Response().Error(strs.failed_finding_anime).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(animeData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(animeData.TitleEnglish) - .WithUrl(animeData.Link) - .WithImageUrl(animeData.ImageUrlLarge) - .AddField(GetText(strs.episodes), animeData.TotalEpisodes.ToString(), true) - .AddField(GetText(strs.status), animeData.AiringStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {animeData.AverageScore} / 100"); - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Manga([Leftover] string query) - { - if (string.IsNullOrWhiteSpace(query)) - return; - - var mangaData = await _service.GetMangaData(query); - - if (mangaData is null) - { - await Response().Error(strs.failed_finding_manga).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(mangaData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(mangaData.TitleEnglish) - .WithUrl(mangaData.Link) - .WithImageUrl(mangaData.ImageUrlLge) - .AddField(GetText(strs.chapters), mangaData.TotalChapters.ToString(), true) - .AddField(GetText(strs.status), mangaData.PublishingStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {mangaData.AverageScore} / 100"); - - await Response().Embed(embed).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Anime/AnimeSearchService.cs b/src/EllieBot/Modules/Searches/Anime/AnimeSearchService.cs deleted file mode 100644 index 4cf1b01..0000000 --- a/src/EllieBot/Modules/Searches/Anime/AnimeSearchService.cs +++ /dev/null @@ -1,79 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using System.Net.Http.Json; - -namespace EllieBot.Modules.Searches.Services; - -public class AnimeSearchService : IEService -{ - private readonly IBotCache _cache; - private readonly IHttpClientFactory _httpFactory; - - public AnimeSearchService(IBotCache cache, IHttpClientFactory httpFactory) - { - _cache = cache; - _httpFactory = httpFactory; - } - - public async Task GetAnimeData(string query) - { - if (string.IsNullOrWhiteSpace(query)) - throw new ArgumentNullException(nameof(query)); - - TypedKey GetKey(string link) - => new TypedKey($"anime2:{link}"); - - try - { - var suffix = Uri.EscapeDataString(query.Replace("/", " ", StringComparison.InvariantCulture)); - var link = $"https://aniapi.nadeko.bot/anime/{suffix}"; - link = link.ToLowerInvariant(); - var result = await _cache.GetAsync(GetKey(link)); - if (!result.TryPickT0(out var data, out _)) - { - using var http = _httpFactory.CreateClient(); - data = await http.GetFromJsonAsync(link); - - await _cache.AddAsync(GetKey(link), data, expiry: TimeSpan.FromHours(12)); - } - - return data; - } - catch - { - return null; - } - } - - public async Task GetMangaData(string query) - { - if (string.IsNullOrWhiteSpace(query)) - throw new ArgumentNullException(nameof(query)); - - TypedKey GetKey(string link) - => new TypedKey($"manga2:{link}"); - - try - { - var link = "https://aniapi.nadeko.bot/manga/" - + Uri.EscapeDataString(query.Replace("/", " ", StringComparison.InvariantCulture)); - link = link.ToLowerInvariant(); - - var result = await _cache.GetAsync(GetKey(link)); - if (!result.TryPickT0(out var data, out _)) - { - using var http = _httpFactory.CreateClient(); - data = await http.GetFromJsonAsync(link); - - await _cache.AddAsync(GetKey(link), data, expiry: TimeSpan.FromHours(3)); - } - - - return data; - } - catch - { - return null; - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Anime/MangaResult.cs b/src/EllieBot/Modules/Searches/Anime/MangaResult.cs deleted file mode 100644 index 9a32703..0000000 --- a/src/EllieBot/Modules/Searches/Anime/MangaResult.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches.Common; - -public class MangaResult -{ - [JsonPropertyName("id")] - public int Id { get; set; } - - [JsonPropertyName("publishing_status")] - public string PublishingStatus { get; set; } - - [JsonPropertyName("image_url_lge")] - public string ImageUrlLge { get; set; } - - [JsonPropertyName("title_english")] - public string TitleEnglish { get; set; } - - [JsonPropertyName("total_chapters")] - public int TotalChapters { get; set; } - - [JsonPropertyName("total_volumes")] - public int TotalVolumes { get; set; } - - [JsonPropertyName("description")] - public string Description { get; set; } - - [JsonPropertyName("genres")] - public string[] Genres { get; set; } - - [JsonPropertyName("average_score")] - public float AverageScore { get; set; } - - public string Link - => "http://anilist.co/manga/" + Id; - - public string Synopsis - => Description?[..(Description.Length > 500 ? 500 : Description.Length)] + "..."; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs deleted file mode 100644 index 290685d..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs +++ /dev/null @@ -1,231 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Services; -using System.Globalization; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - public partial class FinanceCommands : EllieModule - { - private readonly IStockDataService _stocksService; - private readonly IStockChartDrawingService _stockDrawingService; - - public FinanceCommands(IStockDataService stocksService, IStockChartDrawingService stockDrawingService) - { - _stocksService = stocksService; - _stockDrawingService = stockDrawingService; - } - - [Cmd] - public async Task Stock([Leftover] string query) - { - using var typing = ctx.Channel.EnterTypingState(); - - var stock = await _stocksService.GetStockDataAsync(query); - - if (stock is null) - { - var symbols = await _stocksService.SearchSymbolAsync(query); - - if (symbols.Count == 0) - { - await Response().Error(strs.not_found).SendAsync(); - return; - } - - var symbol = symbols.First(); - var promptEmbed = _sender.CreateEmbed() - .WithDescription(symbol.Description) - .WithTitle(GetText(strs.did_you_mean(symbol.Symbol))); - - if (!await PromptUserConfirmAsync(promptEmbed)) - return; - - query = symbol.Symbol; - stock = await _stocksService.GetStockDataAsync(query); - - if (stock is null) - { - await Response().Error(strs.not_found).SendAsync(); - return; - } - } - - var candles = await _stocksService.GetCandleDataAsync(query); - var stockImageTask = _stockDrawingService.GenerateCombinedChartAsync(candles); - - var localCulture = (CultureInfo)Culture.Clone(); - localCulture.NumberFormat.CurrencySymbol = "$"; - - var sign = stock.Price >= stock.Close - ? "\\🔼" - : "\\🔻"; - - var change = (stock.Price - stock.Close).ToString("N2", Culture); - var changePercent = (1 - (stock.Close / stock.Price)).ToString("P1", Culture); - - var price = stock.Price.ToString("C2", localCulture); - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(stock.Symbol) - .WithUrl($"https://www.tradingview.com/chart/?symbol={stock.Symbol}") - .WithTitle(stock.Name) - .AddField(GetText(strs.price), $"{sign} **{price}**", true) - .AddField(GetText(strs.market_cap), stock.MarketCap, true) - .AddField(GetText(strs.volume_24h), stock.DailyVolume.ToString("C0", localCulture), true) - .AddField("Change", $"{change} ({changePercent})", true) - // .AddField("Change 50d", $"{sign50}{change50}", true) - // .AddField("Change 200d", $"{sign200}{change200}", true) - .WithFooter(stock.Exchange); - - var message = await Response().Embed(eb).SendAsync(); - await using var imageData = await stockImageTask; - if (imageData is null) - return; - - var fileName = $"{query}-sparkline.{imageData.Extension}"; - using var attachment = new FileAttachment( - imageData.FileData, - fileName - ); - await message.ModifyAsync(mp => - { - mp.Attachments = - new(new[] { attachment }); - - mp.Embed = eb.WithImageUrl($"attachment://{fileName}").Build(); - }); - } - - - [Cmd] - public async Task Crypto(string name) - { - name = name?.ToUpperInvariant(); - - if (string.IsNullOrWhiteSpace(name)) - return; - - var (crypto, nearest) = await _service.GetCryptoData(name); - - if (nearest is not null) - { - var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.crypto_not_found)) - .WithDescription( - GetText(strs.did_you_mean(Format.Bold($"{nearest.Name} ({nearest.Symbol})")))); - - if (await PromptUserConfirmAsync(embed)) - crypto = nearest; - } - - if (crypto is null) - { - await Response().Error(strs.crypto_not_found).SendAsync(); - return; - } - - var usd = crypto.Quote["USD"]; - - var localCulture = (CultureInfo)Culture.Clone(); - localCulture.NumberFormat.CurrencySymbol = "$"; - - var sevenDay = (usd.PercentChange7d / 100).ToString("P2", localCulture); - var lastDay = (usd.PercentChange24h / 100).ToString("P2", localCulture); - var price = usd.Price < 0.01 - ? usd.Price.ToString(localCulture) - : usd.Price.ToString("C2", localCulture); - - var volume = usd.Volume24h.ToString("C0", localCulture); - var marketCap = usd.MarketCap.ToString("C0", localCulture); - var dominance = (usd.MarketCapDominance / 100).ToString("P2", localCulture); - - await using var sparkline = await _service.GetSparklineAsync(crypto.Id, usd.PercentChange7d >= 0); - var fileName = $"{crypto.Slug}_7d.png"; - - var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor($"#{crypto.CmcRank}") - .WithTitle($"{crypto.Name} ({crypto.Symbol})") - .WithUrl($"https://coinmarketcap.com/currencies/{crypto.Slug}/") - .WithThumbnailUrl( - $"https://s3.coinmarketcap.com/static/img/coins/128x128/{crypto.Id}.png") - .AddField(GetText(strs.market_cap), marketCap, true) - .AddField(GetText(strs.price), price, true) - .AddField(GetText(strs.volume_24h), volume, true) - .AddField(GetText(strs.change_7d_24h), $"{sevenDay} / {lastDay}", true) - .AddField(GetText(strs.market_cap_dominance), dominance, true) - .WithImageUrl($"attachment://{fileName}"); - - if (crypto.CirculatingSupply is double cs) - { - var csStr = cs.ToString("N0", localCulture); - - if (crypto.MaxSupply is double ms) - { - var perc = (cs / ms).ToString("P1", localCulture); - - toSend.AddField(GetText(strs.circulating_supply), $"{csStr} ({perc})", true); - } - else - { - toSend.AddField(GetText(strs.circulating_supply), csStr, true); - } - } - - - await ctx.Channel.SendFileAsync(sparkline, fileName, embed: toSend.Build()); - } - - [Cmd] - public async Task Coins(int page = 1) - { - if (--page < 0) - return; - - if (page > 25) - page = 25; - - await Response() - .Paginated() - .PageItems(async (page) => - { - var coins = await _service.GetTopCoins(page); - return coins; - }) - .PageSize(10) - .Page((items, _) => - { - var embed = _sender.CreateEmbed() - .WithOkColor(); - - if (items.Count > 0) - { - foreach (var coin in items) - { - embed.AddField($"#{coin.MarketCapRank} {coin.Symbol} - {coin.Name}", - $""" - `Price:` {GetArrowEmoji(coin.PercentChange24h)} {coin.CurrentPrice.ToShortString()}$ ({GetSign(coin.PercentChange24h)}{Math.Round(coin.PercentChange24h, 2)}%) - `MarketCap:` {coin.MarketCap.ToShortString()}$ - `Supply:` {(coin.CirculatingSupply?.ToShortString() ?? "?")} / {(coin.TotalSupply?.ToShortString() ?? "?")} - """, - inline: false); - } - } - - return embed; - }) - .CurrentPage(page) - .AddFooter(false) - .SendAsync(); - } - - private static string GetArrowEmoji(decimal value) - => value > 0 ? "▲" : "▼"; - - private static string GetSign(decimal value) - => value >= 0 ? "+" : ""; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs deleted file mode 100644 index 0ffd422..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ /dev/null @@ -1,266 +0,0 @@ -#nullable enable -using EllieBot.Modules.Searches.Common; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using System.Globalization; -using System.Net.Http.Json; -using System.Text.Json.Serialization; -using System.Xml; -using Color = SixLabors.ImageSharp.Color; - -namespace EllieBot.Modules.Searches.Services; - -public class CryptoService : IEService -{ - private readonly IBotCache _cache; - private readonly IHttpClientFactory _httpFactory; - private readonly IBotCredentials _creds; - - private readonly SemaphoreSlim _getCryptoLock = new(1, 1); - - public CryptoService(IBotCache cache, IHttpClientFactory httpFactory, IBotCredentials creds) - { - _cache = cache; - _httpFactory = httpFactory; - _creds = creds; - } - - private PointF[] GetSparklinePointsFromSvgText(string svgText) - { - var xml = new XmlDocument(); - xml.LoadXml(svgText); - - var gElement = xml["svg"]?["g"]; - if (gElement is null) - return Array.Empty(); - - Span points = new PointF[gElement.ChildNodes.Count]; - var cnt = 0; - - bool GetValuesFromAttributes( - XmlAttributeCollection attrs, - out float x1, - out float y1, - out float x2, - out float y2) - { - (x1, y1, x2, y2) = (0, 0, 0, 0); - return attrs["x1"]?.Value is string x1Str - && float.TryParse(x1Str, NumberStyles.Any, CultureInfo.InvariantCulture, out x1) - && attrs["y1"]?.Value is string y1Str - && float.TryParse(y1Str, NumberStyles.Any, CultureInfo.InvariantCulture, out y1) - && attrs["x2"]?.Value is string x2Str - && float.TryParse(x2Str, NumberStyles.Any, CultureInfo.InvariantCulture, out x2) - && attrs["y2"]?.Value is string y2Str - && float.TryParse(y2Str, NumberStyles.Any, CultureInfo.InvariantCulture, out y2); - } - - foreach (XmlElement x in gElement.ChildNodes) - { - if (x.Name != "line") - continue; - - if (GetValuesFromAttributes(x.Attributes, out var x1, out var y1, out var x2, out var y2)) - { - points[cnt++] = new(x1, y1); - // this point will be set twice to the same value - // on all points except the last one - if (cnt + 1 < points.Length) - points[cnt + 1] = new(x2, y2); - } - } - - if (cnt == 0) - return Array.Empty(); - - return points.Slice(0, cnt).ToArray(); - } - - private SixLabors.ImageSharp.Image GenerateSparklineChart(PointF[] points, bool up) - { - const int width = 164; - const int height = 48; - - var img = new Image(width, height, Color.Transparent); - var color = up - ? Color.Green - : Color.FromRgb(220, 0, 0); - - img.Mutate(x => - { - x.DrawLine(color, 2, points); - }); - - return img; - } - - public async Task<(CmcResponseData? Data, CmcResponseData? Nearest)> GetCryptoData(string name) - { - if (string.IsNullOrWhiteSpace(name)) - return (null, null); - - name = name.ToUpperInvariant(); - var cryptos = await GetCryptoDataInternal(); - - if (cryptos is null or { Count: 0 }) - return (null, null); - - var crypto = cryptos.FirstOrDefault(x - => x.Slug.ToUpperInvariant() == name - || x.Name.ToUpperInvariant() == name - || x.Symbol.ToUpperInvariant() == name); - - if (crypto is not null) - return (crypto, null); - - - var nearest = cryptos - .Select(elem => (Elem: elem, - Distance: elem.Name.ToUpperInvariant().LevenshteinDistance(name))) - .OrderBy(x => x.Distance) - .FirstOrDefault(x => x.Distance <= 2); - - return (null, nearest.Elem); - } - - public async Task?> GetCryptoDataInternal() - { - await _getCryptoLock.WaitAsync(); - try - { - var data = await _cache.GetOrAddAsync(new("ellie:crypto_data"), - async () => - { - try - { - using var http = _httpFactory.CreateClient(); - var data = await http.GetFromJsonAsync( - "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?" - + $"CMC_PRO_API_KEY={_creds.CoinmarketcapApiKey}" - + "&start=1" - + "&limit=5000" - + "&convert=USD"); - - return data; - } - catch (Exception ex) - { - Log.Error(ex, "Error getting crypto data: {Message}", ex.Message); - return default; - } - }, - TimeSpan.FromHours(2)); - - if (data is null) - return default; - - return data.Data; - } - catch (Exception ex) - { - Log.Error(ex, "Error retreiving crypto data: {Message}", ex.Message); - return default; - } - finally - { - _getCryptoLock.Release(); - } - } - - private TypedKey GetSparklineKey(int id) - => new($"crypto:sparkline:{id}"); - - public async Task GetSparklineAsync(int id, bool up) - { - try - { - var bytes = await _cache.GetOrAddAsync(GetSparklineKey(id), - async () => - { - // if it fails, generate a new one - var points = await DownloadSparklinePointsAsync(id); - var sparkline = GenerateSparklineChart(points, up); - - using var stream = await sparkline.ToStreamAsync(); - return stream.ToArray(); - }, - TimeSpan.FromHours(1)); - - if (bytes is { Length: > 0 }) - { - return bytes.ToStream(); - } - - return default; - } - catch (Exception ex) - { - Log.Warning(ex, - "Exception occurred while downloading sparkline points: {ErrorMessage}", - ex.Message); - return default; - } - } - - private async Task DownloadSparklinePointsAsync(int id) - { - using var http = _httpFactory.CreateClient(); - var str = await http.GetStringAsync( - $"https://s3.coinmarketcap.com/generated/sparklines/web/7d/usd/{id}.svg"); - var points = GetSparklinePointsFromSvgText(str); - return points; - } - - private static TypedKey> GetTopCoinsKey() - => new($"crypto:top_coins"); - - public async Task?> GetTopCoins(int page) - { - if (page >= 25) - page = 24; - - using var http = _httpFactory.CreateClient(); - - http.AddFakeHeaders(); - - var result = await _cache.GetOrAddAsync>(GetTopCoinsKey(), - async () => await http.GetFromJsonAsync>( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250") - ?? [], - expiry: TimeSpan.FromHours(1)); - - return result!.Skip(page * 10).Take(10).ToList(); - } -} - -public sealed class GeckoCoinsResult -{ - [JsonPropertyName("id")] - public required string Id { get; init; } - - [JsonPropertyName("name")] - public required string Name { get; init; } - - [JsonPropertyName("symbol")] - public required string Symbol { get; init; } - - [JsonPropertyName("current_price")] - public required decimal CurrentPrice { get; init; } - - [JsonPropertyName("price_change_percentage_24h")] - public required decimal PercentChange24h { get; init; } - - [JsonPropertyName("market_cap")] - public required decimal MarketCap { get; init; } - - [JsonPropertyName("circulating_supply")] - public required decimal? CirculatingSupply { get; init; } - - [JsonPropertyName("total_supply")] - public required decimal? TotalSupply { get; init; } - - [JsonPropertyName("market_cap_rank")] - public required int MarketCapRank { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs b/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs deleted file mode 100644 index 9b000bd..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs +++ /dev/null @@ -1,112 +0,0 @@ -using AngleSharp; -using CsvHelper; -using CsvHelper.Configuration; -using System.Globalization; -using System.Text.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class DefaultStockDataService : IStockDataService, IEService -{ - private readonly IHttpClientFactory _httpClientFactory; - - public DefaultStockDataService(IHttpClientFactory httpClientFactory) - => _httpClientFactory = httpClientFactory; - - public async Task GetStockDataAsync(string query) - { - try - { - if (!query.IsAlphaNumeric()) - return default; - - using var http = _httpClientFactory.CreateClient(); - - var quoteHtmlPage = $"https://finance.yahoo.com/quote/{query.ToUpperInvariant()}"; - - var config = Configuration.Default.WithDefaultLoader(); - using var document = await BrowsingContext.New(config).OpenAsync(quoteHtmlPage); - - var tickerName = document.QuerySelector("div.top > .left > .container > h1") - ?.TextContent; - - if (tickerName is null) - return default; - - var marketcap = document - .QuerySelector("li > span > fin-streamer[data-field='marketCap']") - ?.TextContent; - - - var volume = document.QuerySelector("li > span > fin-streamer[data-field='regularMarketVolume']") - ?.TextContent; - - var close = document.QuerySelector("li > span > fin-streamer[data-field='regularMarketPreviousClose']") - ?.TextContent - ?? "0"; - - var price = document.QuerySelector("fin-streamer.livePrice > span") - ?.TextContent - ?? "0"; - - return new() - { - Name = tickerName, - Symbol = query, - Price = double.Parse(price, NumberStyles.Any, CultureInfo.InvariantCulture), - Close = double.Parse(close, NumberStyles.Any, CultureInfo.InvariantCulture), - MarketCap = marketcap, - DailyVolume = (long)double.Parse(volume ?? "0", NumberStyles.Any, CultureInfo.InvariantCulture), - }; - } - catch (Exception ex) - { - Log.Warning(ex, "Error getting stock data: {ErrorMessage}", ex.ToString()); - return default; - } - } - - public async Task> SearchSymbolAsync(string query) - { - if (string.IsNullOrWhiteSpace(query)) - throw new ArgumentNullException(nameof(query)); - - query = Uri.EscapeDataString(query); - - using var http = _httpClientFactory.CreateClient(); - - var res = await http.GetStringAsync( - "https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist" - + $";searchTerm={query}" - + "?device=console"); - - var data = JsonSerializer.Deserialize(res); - - if (data is null or { Items: null }) - return Array.Empty(); - - return data.Items - .Where(x => x.Type == "S") - .Select(x => new SymbolData(x.Symbol, x.Name)) - .ToList(); - } - - private static CsvConfiguration _csvConfig = new(CultureInfo.InvariantCulture); - - public async Task> GetCandleDataAsync(string query) - { - using var http = _httpClientFactory.CreateClient(); - await using var resStream = await http.GetStreamAsync( - $"https://query1.finance.yahoo.com/v7/finance/download/{query}" - + $"?period1={DateTime.UtcNow.Subtract(30.Days()).ToTimestamp()}" - + $"&period2={DateTime.UtcNow.ToTimestamp()}" - + "&interval=1d"); - - using var textReader = new StreamReader(resStream); - using var csv = new CsvReader(textReader, _csvConfig); - var records = csv.GetRecords().ToArray(); - - return records - .Map(static x => new CandleData(x.Open, x.Close, x.High, x.Low, x.Volume)); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/Drawing/CandleDrawingData.cs b/src/EllieBot/Modules/Searches/Crypto/Drawing/CandleDrawingData.cs deleted file mode 100644 index 97da2da..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/Drawing/CandleDrawingData.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SixLabors.ImageSharp; - -namespace EllieBot.Modules.Searches; - -/// -/// All data required to draw a candle -/// -/// Whether the candle is green -/// Rectangle for the body -/// High line point -/// Low line point -public record CandleDrawingData(bool IsGreen, RectangleF BodyRect, PointF High, PointF Low); \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/Drawing/IStockChartDrawingService.cs b/src/EllieBot/Modules/Searches/Crypto/Drawing/IStockChartDrawingService.cs deleted file mode 100644 index 9676e88..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/Drawing/IStockChartDrawingService.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface IStockChartDrawingService -{ - Task GenerateSparklineAsync(IReadOnlyCollection series); - Task GenerateCombinedChartAsync(IReadOnlyCollection series); - Task GenerateCandleChartAsync(IReadOnlyCollection series); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs b/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs deleted file mode 100644 index 95aa51f..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs +++ /dev/null @@ -1,200 +0,0 @@ -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using System.Runtime.CompilerServices; -using Color = SixLabors.ImageSharp.Color; - -namespace EllieBot.Modules.Searches; - -public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingService, IEService -{ - private const int WIDTH = 300; - private const int HEIGHT = 100; - private const decimal MAX_HEIGHT = HEIGHT * 0.8m; - - private static readonly Rgba32 _backgroundColor = Rgba32.ParseHex("17181E"); - private static readonly Rgba32 _lineGuideColor = Rgba32.ParseHex("212125"); - private static readonly Rgba32 _sparklineColor = Rgba32.ParseHex("2961FC"); - private static readonly Rgba32 _greenBrush = Rgba32.ParseHex("26A69A"); - private static readonly Rgba32 _redBrush = Rgba32.ParseHex("EF5350"); - - private static float GetNormalizedPoint(decimal max, decimal point, decimal range) - => (float)((MAX_HEIGHT * ((max - point) / range)) + HeightOffset()); - - private PointF[] GetSparklinePointsInternal(IReadOnlyCollection series) - { - var candleStep = WIDTH / (series.Count + 1); - var max = series.Max(static x => x.High); - var min = series.Min(static x => x.Low); - - var range = max - min; - - var points = new PointF[series.Count]; - - var i = 0; - foreach (var candle in series) - { - var x = candleStep * (i + 1); - - var y = GetNormalizedPoint(max, candle.Close, range); - points[i++] = new(x, y); - } - - return points; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static decimal HeightOffset() - => (HEIGHT - MAX_HEIGHT) / 2m; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static Image CreateCanvasInternal() - => new Image(WIDTH, HEIGHT, _backgroundColor); - - private CandleDrawingData[] GetChartDrawingDataInternal(IReadOnlyCollection series) - { - var candleMargin = 2; - var candleStep = (WIDTH - (candleMargin * series.Count)) / (series.Count + 1); - var max = series.Max(static x => x.High); - var min = series.Min(static x => x.Low); - - var range = max - min; - - var drawData = new CandleDrawingData[series.Count]; - - var candleWidth = candleStep; - - var i = 0; - foreach (var candle in series) - { - var offsetX = (i - 1) * candleMargin; - var x = (candleStep * (i + 1)) + offsetX; - var yOpen = GetNormalizedPoint(max, candle.Open, range); - var yClose = GetNormalizedPoint(max, candle.Close, range); - var y = candle.Open > candle.Close - ? yOpen - : yClose; - - var sizeH = Math.Abs(yOpen - yClose); - - var high = GetNormalizedPoint(max, candle.High, range); - var low = GetNormalizedPoint(max, candle.Low, range); - drawData[i] = new(candle.Open < candle.Close, - new(x, y, candleWidth, sizeH), - new(x + (candleStep / 2), high), - new(x + (candleStep / 2), low)); - ++i; - } - - return drawData; - } - - private void DrawChartData(Image image, CandleDrawingData[] drawData) - => image.Mutate(ctx => - { - foreach (var data in drawData) - ctx.DrawLine(data.IsGreen - ? _greenBrush - : _redBrush, - 1, - data.High, - data.Low); - - - foreach (var data in drawData) - ctx.Fill(data.IsGreen - ? _greenBrush - : _redBrush, - data.BodyRect); - }); - - private void DrawLineGuides(Image image, IReadOnlyCollection series) - { - var max = series.Max(x => x.High); - var min = series.Min(x => x.Low); - - var step = (max - min) / 5; - - var lines = new float[6]; - - for (var i = 0; i < 6; i++) - { - var y = GetNormalizedPoint(max, min + (step * i), max - min); - lines[i] = y; - } - - image.Mutate(ctx => - { - // draw guides - foreach (var y in lines) - ctx.DrawLine(_lineGuideColor, 1, new PointF(0, y), new PointF(WIDTH, y)); - - // // draw min and max price on the chart - // ctx.DrawText(min.ToString(CultureInfo.InvariantCulture), - // SystemFonts.CreateFont("Arial", 5), - // Color.White, - // new PointF(0, (float)HeightOffset() - 5) - // ); - // - // ctx.DrawText(max.ToString("N1", CultureInfo.InvariantCulture), - // SystemFonts.CreateFont("Arial", 5), - // Color.White, - // new PointF(0, HEIGHT - (float)HeightOffset()) - // ); - }); - } - - public Task GenerateSparklineAsync(IReadOnlyCollection series) - { - if (series.Count == 0) - return Task.FromResult(default); - - using var image = CreateCanvasInternal(); - - var points = GetSparklinePointsInternal(series); - - image.Mutate(ctx => - { - ctx.DrawLine(_sparklineColor, 2, points); - }); - - return Task.FromResult(new("png", image.ToStream())); - } - - public Task GenerateCombinedChartAsync(IReadOnlyCollection series) - { - if (series.Count == 0) - return Task.FromResult(default); - - using var image = CreateCanvasInternal(); - - DrawLineGuides(image, series); - - var chartData = GetChartDrawingDataInternal(series); - DrawChartData(image, chartData); - - var points = GetSparklinePointsInternal(series); - image.Mutate(ctx => - { - ctx.DrawLine(Color.ParseHex("00FFFFAA"), 1, points); - }); - - return Task.FromResult(new("png", image.ToStream())); - } - - public Task GenerateCandleChartAsync(IReadOnlyCollection series) - { - if (series.Count == 0) - return Task.FromResult(default); - - using var image = CreateCanvasInternal(); - - DrawLineGuides(image, series); - - var drawData = GetChartDrawingDataInternal(series); - DrawChartData(image, drawData); - - return Task.FromResult(new("png", image.ToStream())); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/IStockDataService.cs b/src/EllieBot/Modules/Searches/Crypto/IStockDataService.cs deleted file mode 100644 index 5f778e8..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/IStockDataService.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface IStockDataService -{ - public Task GetStockDataAsync(string symbol); - Task> SearchSymbolAsync(string query); - Task> GetCandleDataAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/CandleData.cs b/src/EllieBot/Modules/Searches/Crypto/_common/CandleData.cs deleted file mode 100644 index 97d1a17..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/CandleData.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public record CandleData( - decimal Open, - decimal Close, - decimal High, - decimal Low, - long Volume); \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/ImageData.cs b/src/EllieBot/Modules/Searches/Crypto/_common/ImageData.cs deleted file mode 100644 index d49d1ba..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/ImageData.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public record ImageData(string Extension, Stream FileData) : IAsyncDisposable -{ - public ValueTask DisposeAsync() - => FileData.DisposeAsync(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/QuoteResponse.cs b/src/EllieBot/Modules/Searches/Crypto/_common/QuoteResponse.cs deleted file mode 100644 index 13ea277..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/QuoteResponse.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public class QuoteResponse -{ - public class ResultModel - { - [JsonPropertyName("longName")] - public string LongName { get; set; } - - [JsonPropertyName("regularMarketPrice")] - public double RegularMarketPrice { get; set; } - - [JsonPropertyName("regularMarketPreviousClose")] - public double RegularMarketPreviousClose { get; set; } - - [JsonPropertyName("fullExchangeName")] - public string FullExchangeName { get; set; } - - [JsonPropertyName("averageDailyVolume10Day")] - public int AverageDailyVolume10Day { get; set; } - - [JsonPropertyName("fiftyDayAverageChangePercent")] - public double FiftyDayAverageChangePercent { get; set; } - - [JsonPropertyName("twoHundredDayAverageChangePercent")] - public double TwoHundredDayAverageChangePercent { get; set; } - - [JsonPropertyName("marketCap")] - public long MarketCap { get; set; } - - [JsonPropertyName("symbol")] - public string Symbol { get; set; } - } - - [JsonPropertyName("result")] - public List Result { get; set; } - - [JsonPropertyName("error")] - public object Error { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/StockData.cs b/src/EllieBot/Modules/Searches/Crypto/_common/StockData.cs deleted file mode 100644 index dfb99c7..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/StockData.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Searches; - -public class StockData -{ - public string Name { get; set; } - public string Symbol { get; set; } - public double Price { get; set; } - public string MarketCap { get; set; } - public double Close { get; set; } - public double Change50d { get; set; } - public double Change200d { get; set; } - public long DailyVolume { get; set; } - public string Exchange { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/SymbolData.cs b/src/EllieBot/Modules/Searches/Crypto/_common/SymbolData.cs deleted file mode 100644 index 01ef65d..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/SymbolData.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public record SymbolData(string Symbol, string Description); \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceCandleData.cs b/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceCandleData.cs deleted file mode 100644 index 619bdc3..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceCandleData.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public class YahooFinanceCandleData -{ - public DateTime Date { get; set; } - public decimal Open { get; set; } - public decimal High { get; set; } - public decimal Low { get; set; } - public decimal Close { get; set; } - public decimal AdjClose { get; set; } - public long Volume { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponse.cs b/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponse.cs deleted file mode 100644 index 168dd82..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public class YahooFinanceSearchResponse -{ - [JsonPropertyName("suggestionTitleAccessor")] - public string SuggestionTitleAccessor { get; set; } - - [JsonPropertyName("suggestionMeta")] - public List SuggestionMeta { get; set; } - - [JsonPropertyName("hiConf")] - public bool HiConf { get; set; } - - [JsonPropertyName("items")] - public List Items { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponseItem.cs b/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponseItem.cs deleted file mode 100644 index e8eaa9f..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/YahooFinanceSearchResponseItem.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public class YahooFinanceSearchResponseItem -{ - [JsonPropertyName("symbol")] - public string Symbol { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("exch")] - public string Exch { get; set; } - - [JsonPropertyName("type")] - public string Type { get; set; } - - [JsonPropertyName("exchDisp")] - public string ExchDisp { get; set; } - - [JsonPropertyName("typeDisp")] - public string TypeDisp { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Crypto/_common/YahooQueryModel.cs b/src/EllieBot/Modules/Searches/Crypto/_common/YahooQueryModel.cs deleted file mode 100644 index 4efc94f..0000000 --- a/src/EllieBot/Modules/Searches/Crypto/_common/YahooQueryModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public class YahooQueryModel -{ - [JsonPropertyName("quoteResponse")] - public QuoteResponse QuoteResponse { get; set; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Feeds/FeedCommands.cs b/src/EllieBot/Modules/Searches/Feeds/FeedCommands.cs deleted file mode 100644 index 316fc73..0000000 --- a/src/EllieBot/Modules/Searches/Feeds/FeedCommands.cs +++ /dev/null @@ -1,148 +0,0 @@ -using CodeHollow.FeedReader; -using EllieBot.Modules.Searches.Services; -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class FeedCommands : EllieModule - { - private static readonly Regex _ytChannelRegex = - new(@"youtube\.com\/(?:c\/|channel\/|user\/)?(?[a-zA-Z0-9\-_]{1,})"); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [Priority(1)] - public Task YtUploadNotif(string url, [Leftover] string? message = null) - => YtUploadNotif(url, null, message); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [Priority(2)] - public Task YtUploadNotif(string url, ITextChannel? channel = null, [Leftover] string? message = null) - { - var m = _ytChannelRegex.Match(url); - if (!m.Success) - return Response().Error(strs.invalid_input).SendAsync(); - - channel ??= ctx.Channel as ITextChannel; - - if (!((IGuildUser)ctx.User).GetPermissions(channel).MentionEveryone) - message = message?.SanitizeAllMentions(); - - var channelId = m.Groups["channelid"].Value; - - return Feed($"https://www.youtube.com/feeds/videos.xml?channel_id={channelId}", channel, message); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [Priority(0)] - public Task Feed(string url, [Leftover] string? message = null) - => Feed(url, null, message); - - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [Priority(1)] - public async Task Feed(string url, ITextChannel? channel = null, [Leftover] string? message = null) - { - if (!Uri.TryCreate(url, UriKind.Absolute, out var uri) - || (uri.Scheme != Uri.UriSchemeHttp && uri.Scheme != Uri.UriSchemeHttps)) - { - await Response().Error(strs.feed_invalid_url).SendAsync(); - return; - } - - channel ??= (ITextChannel)ctx.Channel; - - if (!((IGuildUser)ctx.User).GetPermissions(channel).MentionEveryone) - message = message?.SanitizeAllMentions(); - - try - { - await FeedReader.ReadAsync(url); - } - catch (Exception ex) - { - Log.Information(ex, "Unable to get feeds from that url"); - await Response().Error(strs.feed_cant_parse).SendAsync(); - return; - } - - if (ctx.User is not IGuildUser gu || !gu.GuildPermissions.Administrator) - message = message?.SanitizeMentions(true); - - var result = _service.AddFeed(ctx.Guild.Id, channel.Id, url, message); - if (result == FeedAddResult.Success) - { - await Response().Confirm(strs.feed_added).SendAsync(); - return; - } - - if (result == FeedAddResult.Duplicate) - { - await Response().Error(strs.feed_duplicate).SendAsync(); - return; - } - - if (result == FeedAddResult.LimitReached) - { - await Response().Error(strs.feed_limit_reached).SendAsync(); - return; - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task FeedRemove(int index) - { - if (_service.RemoveFeed(ctx.Guild.Id, --index)) - await Response().Confirm(strs.feed_removed).SendAsync(); - else - await Response().Error(strs.feed_out_of_range).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task FeedList(int page = 1) - { - if (--page < 0) - return; - - var feeds = _service.GetFeeds(ctx.Guild.Id); - - if (!feeds.Any()) - { - await Response() - .Embed(_sender.CreateEmbed().WithOkColor().WithDescription(GetText(strs.feed_no_feed))) - .SendAsync(); - return; - } - - await Response() - .Paginated() - .Items(feeds) - .PageSize(10) - .CurrentPage(page) - .Page((items, cur) => - { - var embed = _sender.CreateEmbed().WithOkColor(); - var i = 0; - var fs = string.Join("\n", - items.Select(x => $"`{(cur * 10) + ++i}.` <#{x.ChannelId}> {x.Url}")); - - return embed.WithDescription(fs); - }) - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs b/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs deleted file mode 100644 index d08ec0a..0000000 --- a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs +++ /dev/null @@ -1,309 +0,0 @@ -#nullable disable -using CodeHollow.FeedReader; -using CodeHollow.FeedReader.Feeds; -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Searches.Services; - -public class FeedsService : IEService -{ - private readonly DbService _db; - private readonly ConcurrentDictionary> _subs; - private readonly DiscordSocketClient _client; - private readonly IMessageSenderService _sender; - - private readonly ConcurrentDictionary _lastPosts = new(); - private readonly Dictionary _errorCounters = new(); - - public FeedsService( - IBot bot, - DbService db, - DiscordSocketClient client, - IMessageSenderService sender) - { - _db = db; - - using (var uow = db.GetDbContext()) - { - var guildConfigIds = bot.AllGuildConfigs.Select(x => x.Id).ToList(); - _subs = uow.Set() - .AsQueryable() - .Where(x => guildConfigIds.Contains(x.Id)) - .Include(x => x.FeedSubs) - .ToList() - .SelectMany(x => x.FeedSubs) - .GroupBy(x => x.Url.ToLower()) - .ToDictionary(x => x.Key, x => x.ToList()) - .ToConcurrent(); - } - - _client = client; - _sender = sender; - - _ = Task.Run(TrackFeeds); - } - - private void ClearErrors(string url) - => _errorCounters.Remove(url); - - private async Task AddError(string url, List ids) - { - try - { - var newValue = _errorCounters[url] = _errorCounters.GetValueOrDefault(url) + 1; - - if (newValue >= 100) - { - // remove from db - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .DeleteAsync(x => ids.Contains(x.Id)); - - // remove from the local cache - _subs.TryRemove(url, out _); - - // reset the error counter - ClearErrors(url); - } - - return newValue; - } - catch (Exception ex) - { - Log.Error(ex, "Error adding rss errors..."); - return 0; - } - } - - private DateTime? GetPubDate(FeedItem item) - { - if (item.PublishingDate is not null) - return item.PublishingDate; - if (item.SpecificItem is AtomFeedItem atomItem) - return atomItem.UpdatedDate; - return null; - } - - public async Task TrackFeeds() - { - while (true) - { - var allSendTasks = new List(_subs.Count); - foreach (var kvp in _subs) - { - if (kvp.Value.Count == 0) - continue; - - var rssUrl = kvp.Value.First().Url; - try - { - var feed = await FeedReader.ReadAsync(rssUrl); - - var items = new List<(FeedItem Item, DateTime LastUpdate)>(); - foreach (var item in feed.Items) - { - var pubDate = GetPubDate(item); - - if (pubDate is null) - continue; - - items.Add((item, pubDate.Value.ToUniversalTime())); - - // show at most 3 items if you're behind - if (items.Count > 2) - break; - } - - if (items.Count == 0) - continue; - - if (!_lastPosts.TryGetValue(kvp.Key, out var lastFeedUpdate)) - { - lastFeedUpdate = _lastPosts[kvp.Key] = items[0].LastUpdate; - } - - for (var index = 1; index <= items.Count; index++) - { - var (feedItem, itemUpdateDate) = items[^index]; - if (itemUpdateDate <= lastFeedUpdate) - continue; - - var embed = _sender.CreateEmbed().WithFooter(rssUrl); - - _lastPosts[kvp.Key] = itemUpdateDate; - - var link = feedItem.SpecificItem.Link; - if (!string.IsNullOrWhiteSpace(link) && Uri.IsWellFormedUriString(link, UriKind.Absolute)) - embed.WithUrl(link); - - var title = string.IsNullOrWhiteSpace(feedItem.Title) ? "-" : feedItem.Title; - - var gotImage = false; - if (feedItem.SpecificItem is MediaRssFeedItem mrfi - && (mrfi.Enclosure?.MediaType?.StartsWith("image/") ?? false)) - { - var imgUrl = mrfi.Enclosure.Url; - if (!string.IsNullOrWhiteSpace(imgUrl) - && Uri.IsWellFormedUriString(imgUrl, UriKind.Absolute)) - { - embed.WithImageUrl(imgUrl); - gotImage = true; - } - } - - if (!gotImage && feedItem.SpecificItem is AtomFeedItem afi) - { - var previewElement = afi.Element.Elements() - .FirstOrDefault(x => x.Name.LocalName == "preview"); - - if (previewElement is null) - { - previewElement = afi.Element.Elements() - .FirstOrDefault(x => x.Name.LocalName == "thumbnail"); - } - - if (previewElement is not null) - { - var urlAttribute = previewElement.Attribute("url"); - if (urlAttribute is not null - && !string.IsNullOrWhiteSpace(urlAttribute.Value) - && Uri.IsWellFormedUriString(urlAttribute.Value, UriKind.Absolute)) - { - embed.WithImageUrl(urlAttribute.Value); - gotImage = true; - } - } - } - - embed.WithTitle(title.TrimTo(256)); - - var desc = feedItem.Description?.StripHtml(); - if (!string.IsNullOrWhiteSpace(feedItem.Description)) - embed.WithDescription(desc.TrimTo(2048)); - - - var tasks = new List(); - - foreach (var val in kvp.Value) - { - var ch = _client.GetGuild(val.GuildConfig.GuildId).GetTextChannel(val.ChannelId); - - if (ch is null) - continue; - - var sendTask = _sender.Response(ch) - .Embed(embed) - .Text(string.IsNullOrWhiteSpace(val.Message) - ? string.Empty - : val.Message) - .SendAsync(); - tasks.Add(sendTask); - } - - allSendTasks.Add(tasks.WhenAll()); - - // as data retrieval was successful, reset error counter - ClearErrors(rssUrl); - } - } - catch (Exception ex) - { - var errorCount = await AddError(rssUrl, kvp.Value.Select(x => x.Id).ToList()); - - Log.Warning("An error occured while getting rss stream ({ErrorCount} / 100) {RssFeed}" - + "\n {Message}", - errorCount, - rssUrl, - $"[{ex.GetType().Name}]: {ex.Message}"); - } - } - - await Task.WhenAll(Task.WhenAll(allSendTasks), Task.Delay(30000)); - } - } - - public List GetFeeds(ulong guildId) - { - using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs)) - .FeedSubs.OrderBy(x => x.Id) - .ToList(); - } - - public FeedAddResult AddFeed( - ulong guildId, - ulong channelId, - string rssFeed, - string message) - { - ArgumentNullException.ThrowIfNull(rssFeed, nameof(rssFeed)); - - var fs = new FeedSub - { - ChannelId = channelId, - Url = rssFeed.Trim(), - Message = message - }; - - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs)); - - if (gc.FeedSubs.Any(x => x.Url.ToLower() == fs.Url.ToLower())) - return FeedAddResult.Duplicate; - if (gc.FeedSubs.Count >= 10) - return FeedAddResult.LimitReached; - - gc.FeedSubs.Add(fs); - uow.SaveChanges(); - //adding all, in case bot wasn't on this guild when it started - foreach (var feed in gc.FeedSubs) - { - _subs.AddOrUpdate(feed.Url.ToLower(), - [feed], - (_, old) => - { - old.Add(feed); - return old; - }); - } - - return FeedAddResult.Success; - } - - public bool RemoveFeed(ulong guildId, int index) - { - if (index < 0) - return false; - - using var uow = _db.GetDbContext(); - var items = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs)) - .FeedSubs.OrderBy(x => x.Id) - .ToList(); - - if (items.Count <= index) - return false; - var toRemove = items[index]; - _subs.AddOrUpdate(toRemove.Url.ToLower(), - [], - (_, old) => - { - old.Remove(toRemove); - return old; - }); - uow.Remove(toRemove); - uow.SaveChanges(); - - return true; - } -} - -public enum FeedAddResult -{ - Success, - LimitReached, - Invalid, - Duplicate, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/JokeCommands.cs b/src/EllieBot/Modules/Searches/JokeCommands.cs deleted file mode 100644 index d41c50a..0000000 --- a/src/EllieBot/Modules/Searches/JokeCommands.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class JokeCommands : EllieModule - { - [Cmd] - public async Task Yomama() - => await Response().Confirm(await _service.GetYomamaJoke()).SendAsync(); - - [Cmd] - public async Task Randjoke() - { - var (setup, punchline) = await _service.GetRandomJoke(); - await Response().Confirm(setup, punchline).SendAsync(); - } - - [Cmd] - public async Task ChuckNorris() - => await Response().Confirm(await _service.GetChuckNorrisJoke()).SendAsync(); - - [Cmd] - public async Task WowJoke() - { - if (!_service.WowJokes.Any()) - { - await Response().Error(strs.jokes_not_loaded).SendAsync(); - return; - } - - var joke = _service.WowJokes[new EllieRandom().Next(0, _service.WowJokes.Count)]; - await Response().Confirm(joke.Question, joke.Answer).SendAsync(); - } - - [Cmd] - public async Task MagicItem() - { - if (!_service.MagicItems.Any()) - { - await Response().Error(strs.magicitems_not_loaded).SendAsync(); - return; - } - - var item = _service.MagicItems[new EllieRandom().Next(0, _service.MagicItems.Count)]; - - await Response().Confirm("✨" + item.Name, item.Description).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs b/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs deleted file mode 100644 index 22c4a82..0000000 --- a/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs +++ /dev/null @@ -1,124 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class OsuCommands : EllieModule - { - private readonly IBotCredentials _creds; - private readonly IHttpClientFactory _httpFactory; - - public OsuCommands(IBotCredentials creds, IHttpClientFactory factory) - { - _creds = creds; - _httpFactory = factory; - } - - [Cmd] - public async Task Osu(string user, [Leftover] string mode = null) - { - if (string.IsNullOrWhiteSpace(user)) - return; - - try - { - if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) - { - await Response().Error(strs.osu_api_key).SendAsync(); - return; - } - - var obj = await _service.GetOsuData(user, mode); - if (obj is null) - { - await Response().Error(strs.osu_user_not_found).SendAsync(); - return; - } - - var userId = obj.UserId; - var smode = OsuService.ResolveGameMode(obj.ModeNumber); - - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu! {smode} profile for {user}") - .WithThumbnailUrl($"https://a.ppy.sh/{userId}") - .WithDescription($"https://osu.ppy.sh/u/{userId}") - .AddField("Official Rank", $"#{obj.PpRank}", true) - .AddField("Country Rank", - $"#{obj.PpCountryRank} :flag_{obj.Country.ToLower()}:", - true) - .AddField("Total PP", Math.Round(obj.PpRaw, 2), true) - .AddField("Accuracy", Math.Round(obj.Accuracy, 2) + "%", true) - .AddField("Playcount", obj.Playcount, true) - .AddField("Level", Math.Round(obj.Level), true)) - .SendAsync(); - } - catch (Exception ex) - { - await Response().Error(strs.osu_failed).SendAsync(); - Log.Warning(ex, "Osu command failed"); - } - } - - [Cmd] - public async Task Gatari(string user, [Leftover] string mode = null) - { - var modeNumber = OsuService.ResolveGameMode(mode); - var modeStr = OsuService.ResolveGameMode(modeNumber); - var (userData, userStats) = await _service.GetGatariDataAsync(user, mode); - if (userStats is null) - { - await Response().Error(strs.osu_user_not_found).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu!Gatari {modeStr} profile for {user}") - .WithThumbnailUrl($"https://a.gatari.pw/{userStats.Id}") - .WithDescription($"https://osu.gatari.pw/u/{userStats.Id}") - .AddField("Official Rank", $"#{userStats.Rank}", true) - .AddField("Country Rank", - $"#{userStats.CountryRank} :flag_{userData.Country.ToLower()}:", - true) - .AddField("Total PP", userStats.Pp, true) - .AddField("Accuracy", $"{Math.Round(userStats.AvgAccuracy, 2)}%", true) - .AddField("Playcount", userStats.Playcount, true) - .AddField("Level", userStats.Level, true); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task Osu5(string user, [Leftover] string mode = null) - { - if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) - { - await Response().Error("An osu! API key is required.").SendAsync(); - return; - } - - if (string.IsNullOrWhiteSpace(user)) - { - await Response().Error("Please provide a username.").SendAsync(); - return; - } - - var plays = await _service.GetOsuPlay(user, mode); - - - var eb = _sender.CreateEmbed().WithOkColor().WithTitle($"Top 5 plays for {user}"); - - foreach (var (title, desc) in plays) - eb.AddField(title, desc); - - await Response().Embed(eb).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Osu/OsuService.cs b/src/EllieBot/Modules/Searches/Osu/OsuService.cs deleted file mode 100644 index 18327c9..0000000 --- a/src/EllieBot/Modules/Searches/Osu/OsuService.cs +++ /dev/null @@ -1,227 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class OsuService : IEService -{ - private readonly IHttpClientFactory _httpFactory; - private readonly IBotCredentials _creds; - - public OsuService(IHttpClientFactory httpFactory, IBotCredentials creds) - { - _httpFactory = httpFactory; - _creds = creds; - } - - public async Task GetOsuData(string username, string mode) - { - using var http = _httpFactory.CreateClient(); - - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - var userReq = $"https://osu.ppy.sh/api/get_user?k={_creds.OsuApiKey}&u={username}&m={modeNumber}"; - var userResString = await http.GetStringAsync(userReq); - - if (string.IsNullOrWhiteSpace(userResString)) - return null; - var objs = JsonConvert.DeserializeObject>(userResString); - - if (objs.Count == 0) - { - return null; - } - - var obj = objs[0]; - - obj.ModeNumber = modeNumber; - return obj; - } - - public static int ResolveGameMode(string mode) - { - switch (mode?.ToUpperInvariant()) - { - case "STD": - case "STANDARD": - return 0; - case "TAIKO": - return 1; - case "CTB": - case "CATCHTHEBEAT": - return 2; - case "MANIA": - case "OSU!MANIA": - return 3; - default: - return 0; - } - } - - public static string ResolveGameMode(int mode) - { - switch (mode) - { - case 0: - return "Standard"; - case 1: - return "Taiko"; - case 2: - return "Catch"; - case 3: - return "Mania"; - default: - return "Standard"; - } - } - - public async Task<(GatariUserData userData, GatariUserStats userStats)> GetGatariDataAsync( - string user, - string mode) - { - using var http = _httpFactory.CreateClient(); - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - - var resString = await http.GetStringAsync($"https://api.gatari.pw/user/stats?u={user}&mode={modeNumber}"); - - var statsResponse = JsonConvert.DeserializeObject(resString); - if (statsResponse.Code != 200 || statsResponse.Stats.Id == 0) - { - return default; - } - - var usrResString = await http.GetStringAsync($"https://api.gatari.pw/users/get?u={user}"); - - var userData = JsonConvert.DeserializeObject(usrResString).Users[0]; - var userStats = statsResponse.Stats; - - return (userData, userStats); - } - - public async Task<(string title, string desc)[]> GetOsuPlay(string user, string mode) - { - using var http = _httpFactory.CreateClient(); - var m = 0; - if (!string.IsNullOrWhiteSpace(mode)) - m = OsuService.ResolveGameMode(mode); - - var reqString = "https://osu.ppy.sh/api/get_user_best" - + $"?k={_creds.OsuApiKey}" - + $"&u={Uri.EscapeDataString(user)}" - + "&type=string" - + "&limit=5" - + $"&m={m}"; - - var resString = await http.GetStringAsync(reqString); - var obj = JsonConvert.DeserializeObject>(resString); - - var mapTasks = obj.Select(async item => - { - var mapReqString = "https://osu.ppy.sh/api/get_beatmaps" - + $"?k={_creds.OsuApiKey}" - + $"&b={item.BeatmapId}"; - - var mapResString = await http.GetStringAsync(mapReqString); - var map = JsonConvert.DeserializeObject>(mapResString).FirstOrDefault(); - if (map is null) - return default; - var pp = Math.Round(item.Pp, 2); - var acc = CalculateAcc(item, m); - var mods = ResolveMods(item.EnabledMods); - - var title = $"{map.Artist}-{map.Title} ({map.Version})"; - var desc = $@"[/b/{item.BeatmapId}](https://osu.ppy.sh/b/{item.BeatmapId}) - {pp + "pp",-7} | {acc + "%",-7} - "; - if (mods != "+") - desc += Format.Bold(mods); - - return (title, desc); - }); - - return await Task.WhenAll(mapTasks); - } - - //https://osu.ppy.sh/wiki/Accuracy - private static double CalculateAcc(OsuUserBests play, int mode) - { - double hitPoints; - double totalHits; - if (mode == 0) - { - hitPoints = (play.Count50 * 50) + (play.Count100 * 100) + (play.Count300 * 300); - totalHits = play.Count50 + play.Count100 + play.Count300 + play.Countmiss; - totalHits *= 300; - } - else if (mode == 1) - { - hitPoints = (play.Countmiss * 0) + (play.Count100 * 0.5) + play.Count300; - totalHits = (play.Countmiss + play.Count100 + play.Count300) * 300; - hitPoints *= 300; - } - else if (mode == 2) - { - hitPoints = play.Count50 + play.Count100 + play.Count300; - totalHits = play.Countmiss + play.Count50 + play.Count100 + play.Count300 + play.Countkatu; - } - else - { - hitPoints = (play.Count50 * 50) - + (play.Count100 * 100) - + (play.Countkatu * 200) - + ((play.Count300 + play.Countgeki) * 300); - - totalHits = (play.Countmiss - + play.Count50 - + play.Count100 - + play.Countkatu - + play.Count300 - + play.Countgeki) - * 300; - } - - - return Math.Round(hitPoints / totalHits * 100, 2); - } - - - //https://github.com/ppy/osu-api/wiki#mods - private static string ResolveMods(int mods) - { - var modString = "+"; - - if (IsBitSet(mods, 0)) - modString += "NF"; - if (IsBitSet(mods, 1)) - modString += "EZ"; - if (IsBitSet(mods, 8)) - modString += "HT"; - - if (IsBitSet(mods, 3)) - modString += "HD"; - if (IsBitSet(mods, 4)) - modString += "HR"; - if (IsBitSet(mods, 6) && !IsBitSet(mods, 9)) - modString += "DT"; - if (IsBitSet(mods, 9)) - modString += "NC"; - if (IsBitSet(mods, 10)) - modString += "FL"; - - if (IsBitSet(mods, 5)) - modString += "SD"; - if (IsBitSet(mods, 14)) - modString += "PF"; - - if (IsBitSet(mods, 7)) - modString += "RX"; - if (IsBitSet(mods, 11)) - modString += "AT"; - if (IsBitSet(mods, 12)) - modString += "SO"; - return modString; - } - - private static bool IsBitSet(int mods, int pos) - => (mods & (1 << pos)) != 0; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/PokemonSearchCommands.cs b/src/EllieBot/Modules/Searches/PokemonSearchCommands.cs deleted file mode 100644 index 6250e87..0000000 --- a/src/EllieBot/Modules/Searches/PokemonSearchCommands.cs +++ /dev/null @@ -1,74 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class PokemonSearchCommands : EllieModule - { - private readonly ILocalDataCache _cache; - - public PokemonSearchCommands(ILocalDataCache cache) - => _cache = cache; - - [Cmd] - public async Task Pokemon([Leftover] string pokemon = null) - { - pokemon = pokemon?.Trim().ToUpperInvariant(); - if (string.IsNullOrWhiteSpace(pokemon)) - return; - - foreach (var kvp in await _cache.GetPokemonsAsync()) - { - if (kvp.Key.ToUpperInvariant() == pokemon.ToUpperInvariant()) - { - var p = kvp.Value; - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(kvp.Key.ToTitleCase()) - .WithDescription(p.BaseStats.ToString()) - .WithThumbnailUrl( - $"https://assets.pokemon.com/assets/cms2/img/pokedex/detail/{p.Id.ToString("000")}.png") - .AddField(GetText(strs.types), string.Join("\n", p.Types), true) - .AddField(GetText(strs.height_weight), - GetText(strs.height_weight_val(p.HeightM, p.WeightKg)), - true) - .AddField(GetText(strs.abilities), - string.Join("\n", p.Abilities.Select(a => a.Value)), - true)).SendAsync(); - return; - } - } - - await Response().Error(strs.pokemon_none).SendAsync(); - } - - [Cmd] - public async Task PokemonAbility([Leftover] string ability = null) - { - ability = ability?.Trim().ToUpperInvariant().Replace(" ", "", StringComparison.InvariantCulture); - if (string.IsNullOrWhiteSpace(ability)) - return; - foreach (var kvp in await _cache.GetPokemonAbilitiesAsync()) - { - if (kvp.Key.ToUpperInvariant() == ability) - { - await Response().Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(kvp.Value.Name) - .WithDescription(string.IsNullOrWhiteSpace(kvp.Value.Desc) - ? kvp.Value.ShortDesc - : kvp.Value.Desc) - .AddField(GetText(strs.rating), - kvp.Value.Rating.ToString(Culture), - true)).SendAsync(); - return; - } - } - - await Response().Error(strs.pokemon_ability_none).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs deleted file mode 100644 index 8edcd1d..0000000 --- a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public class BibleVerse -{ - [JsonPropertyName("book_name")] - public required string BookName { get; set; } - - public required int Chapter { get; set; } - public required int Verse { get; set; } - public required string Text { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs deleted file mode 100644 index e31ee04..0000000 --- a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public class BibleVerses -{ - public string? Error { get; set; } - public BibleVerse[]? Verses { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs b/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs deleted file mode 100644 index b299242..0000000 --- a/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class QuranAyah -{ - [JsonPropertyName("number")] - public int Number { get; set; } - - [JsonPropertyName("audio")] - public string Audio { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("text")] - public string Text { get; set; } - -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs b/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs deleted file mode 100644 index 86bee95..0000000 --- a/src/EllieBot/Modules/Searches/Religious/Common/QuranResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class QuranResponse -{ - [JsonPropertyName("code")] - public required int Code { get; set; } - - [JsonPropertyName("status")] - public required string Status { get; set; } - - [JsonPropertyName("data")] - public required T[] Data { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs deleted file mode 100644 index ccef2b8..0000000 --- a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs +++ /dev/null @@ -1,62 +0,0 @@ -using OneOf; -using OneOf.Types; -using System.Net; -using System.Net.Http.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class ReligiousApiService : IEService -{ - private readonly IHttpClientFactory _httpFactory; - - public ReligiousApiService(IHttpClientFactory httpFactory) - { - _httpFactory = httpFactory; - } - - public async Task>> GetBibleVerseAsync(string book, string chapterAndVerse) - { - if (string.IsNullOrWhiteSpace(book) || string.IsNullOrWhiteSpace(chapterAndVerse)) - return new Error("Invalid input."); - - - book = Uri.EscapeDataString(book); - chapterAndVerse = Uri.EscapeDataString(chapterAndVerse); - - using var http = _httpFactory.CreateClient(); - try - { - var res = await http.GetFromJsonAsync($"https://bible-api.com/{book} {chapterAndVerse}"); - - if (res is null || res.Error is not null || res.Verses is null || res.Verses.Length == 0) - { - return new Error(res?.Error ?? "No verse found."); - } - - return res.Verses[0]; - } - catch (HttpRequestException ex) when (ex.StatusCode == HttpStatusCode.NotFound) - { - return new Error("No verse found."); - } - } - - public async Task, Error>> GetQuranVerseAsync(string ayah) - { - if (string.IsNullOrWhiteSpace(ayah)) - return new Error(strs.invalid_input); - - ayah = Uri.EscapeDataString(ayah); - - using var http = _httpFactory.CreateClient(); - var res = await http.GetFromJsonAsync>( - $"https://api.alquran.cloud/v1/ayah/{ayah}/editions/en.asad,ar.alafasy"); - - if (res is null or not { Code: 200 }) - { - return new Error(strs.not_found); - } - - return res; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs deleted file mode 100644 index 3bb7899..0000000 --- a/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - public partial class ReligiousCommands : EllieModule - { - private readonly IHttpClientFactory _httpFactory; - - public ReligiousCommands(IHttpClientFactory httpFactory) - => _httpFactory = httpFactory; - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Bible(string book, string chapterAndVerse) - { - var res = await _service.GetBibleVerseAsync(book, chapterAndVerse); - - if (!res.TryPickT0(out var verse, out var error)) - { - await Response().Error(error.Value).SendAsync(); - return; - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{verse.BookName} {verse.Chapter}:{verse.Verse}") - .WithDescription(verse.Text)) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Quran(string ayah) - { - var res = await _service.GetQuranVerseAsync(ayah); - - if (!res.TryPickT0(out var qr, out var error)) - { - await Response().Error(error.Value).SendAsync(); - return; - } - - var english = qr.Data[0]; - var arabic = qr.Data[1]; - - using var http = _httpFactory.CreateClient(); - await using var audio = await http.GetStreamAsync(arabic.Audio); - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .AddField("Arabic", arabic.Text) - .AddField("English", english.Text) - .WithFooter(arabic.Number.ToString())) - .File(audio, Uri.EscapeDataString(ayah) + ".mp3") - .SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs b/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs deleted file mode 100644 index fa3c634..0000000 --- a/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs +++ /dev/null @@ -1,65 +0,0 @@ -using EllieBot.Modules.Searches.GoogleScrape; -using EllieBot.Modules.Searches.Youtube; - -namespace EllieBot.Modules.Searches; - -public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, IEService -{ - private readonly SearchesConfigService _scs; - private readonly SearxSearchService _sss; - private readonly GoogleSearchService _gss; - - private readonly YtdlpYoutubeSearchService _ytdlp; - private readonly YtdlYoutubeSearchService _ytdl; - private readonly YoutubeDataApiSearchService _ytdata; - private readonly InvidiousYtSearchService _iYtSs; - private readonly GoogleScrapeService _gscs; - - public DefaultSearchServiceFactory( - SearchesConfigService scs, - GoogleSearchService gss, - GoogleScrapeService gscs, - SearxSearchService sss, - YtdlpYoutubeSearchService ytdlp, - YtdlYoutubeSearchService ytdl, - YoutubeDataApiSearchService ytdata, - InvidiousYtSearchService iYtSs) - { - _scs = scs; - _sss = sss; - _gss = gss; - _gscs = gscs; - _iYtSs = iYtSs; - - _ytdlp = ytdlp; - _ytdl = ytdl; - _ytdata = ytdata; - } - - public ISearchService GetSearchService(string? hint = null) - => _scs.Data.WebSearchEngine switch - { - WebSearchEngine.Google => _gss, - WebSearchEngine.Google_Scrape => _gscs, - WebSearchEngine.Searx => _sss, - _ => _gss - }; - - public ISearchService GetImageSearchService(string? hint = null) - => _scs.Data.ImgSearchEngine switch - { - ImgSearchEngine.Google => _gss, - ImgSearchEngine.Searx => _sss, - _ => _gss - }; - - public IYoutubeSearchService GetYoutubeSearchService(string? hint = null) - => _scs.Data.YtProvider switch - { - YoutubeSearcher.YtDataApiv3 => _ytdata, - YoutubeSearcher.Ytdlp => _ytdlp, - YoutubeSearcher.Ytdl => _ytdl, - YoutubeSearcher.Invidious => _iYtSs, - _ => _ytdl - }; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleCustomSearchResult.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleCustomSearchResult.cs deleted file mode 100644 index 74fd3c0..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleCustomSearchResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class GoogleCustomSearchResult : ISearchResult -{ - ISearchResultInformation ISearchResult.Info - => Info; - - public string? Answer - => null; - - IReadOnlyCollection ISearchResult.Entries - => Entries ?? Array.Empty(); - - [JsonPropertyName("searchInformation")] - public GoogleSearchResultInformation Info { get; init; } = null!; - - [JsonPropertyName("items")] - public IReadOnlyCollection? Entries { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageData.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleImageData.cs deleted file mode 100644 index 503a1cc..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageData.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class GoogleImageData -{ - [JsonPropertyName("contextLink")] - public string ContextLink { get; init; } = null!; - - [JsonPropertyName("thumbnailLink")] - public string ThumbnailLink { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResult.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResult.cs deleted file mode 100644 index 9cf406b..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResult.cs +++ /dev/null @@ -1,19 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class GoogleImageResult : IImageSearchResult -{ - ISearchResultInformation IImageSearchResult.Info - => Info; - - IReadOnlyCollection IImageSearchResult.Entries - => Entries ?? Array.Empty(); - - [JsonPropertyName("searchInformation")] - public GoogleSearchResultInformation Info { get; init; } = null!; - - [JsonPropertyName("items")] - public IReadOnlyCollection? Entries { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResultEntry.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResultEntry.cs deleted file mode 100644 index cd06fae..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleImageResultEntry.cs +++ /dev/null @@ -1,13 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class GoogleImageResultEntry : IImageSearchResultEntry -{ - [JsonPropertyName("link")] - public string Link { get; init; } = null!; - - [JsonPropertyName("image")] - public GoogleImageData Image { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchResultInformation.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchResultInformation.cs deleted file mode 100644 index 0106c0a..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchResultInformation.cs +++ /dev/null @@ -1,13 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class GoogleSearchResultInformation : ISearchResultInformation -{ - [JsonPropertyName("formattedTotalResults")] - public string TotalResults { get; init; } = null!; - - [JsonPropertyName("formattedSearchTime")] - public string SearchTime { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchService.cs b/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchService.cs deleted file mode 100644 index c74d746..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/GoogleSearchService.cs +++ /dev/null @@ -1,66 +0,0 @@ -using MorseCode.ITask; - -namespace EllieBot.Modules.Searches; - -public sealed class GoogleSearchService : SearchServiceBase, IEService -{ - private readonly IBotCredsProvider _creds; - private readonly IHttpClientFactory _httpFactory; - - public GoogleSearchService(IBotCredsProvider creds, IHttpClientFactory httpFactory) - { - _creds = creds; - _httpFactory = httpFactory; - } - - public override async ITask SearchImagesAsync(string query) - { - ArgumentNullException.ThrowIfNull(query); - - var creds = _creds.GetCreds(); - var key = creds.Google.ImageSearchId; - var cx = string.IsNullOrWhiteSpace(key) - ? "c3f56de3be2034c07" - : key; - - using var http = _httpFactory.CreateClient("google:search"); - http.DefaultRequestHeaders.Add("Accept-Encoding", "gzip"); - await using var stream = await http.GetStreamAsync( - $"https://customsearch.googleapis.com/customsearch/v1" - + $"?cx={cx}" - + $"&q={Uri.EscapeDataString(query)}" - + $"&fields=items(image(contextLink%2CthumbnailLink)%2Clink)%2CsearchInformation" - + $"&key={creds.GoogleApiKey}" - + $"&searchType=image" - + $"&safe=active"); - - var result = await System.Text.Json.JsonSerializer.DeserializeAsync(stream); - - return result; - } - - public override async ITask SearchAsync(string? query) - { - ArgumentNullException.ThrowIfNull(query); - - var creds = _creds.GetCreds(); - var key = creds.Google.SearchId; - var cx = string.IsNullOrWhiteSpace(key) - ? "c7f1dac95987d4571" - : key; - - using var http = _httpFactory.CreateClient("google:search"); - http.DefaultRequestHeaders.Add("Accept-Encoding", "gzip"); - await using var stream = await http.GetStreamAsync( - $"https://customsearch.googleapis.com/customsearch/v1" - + $"?cx={cx}" - + $"&q={Uri.EscapeDataString(query)}" - + $"&fields=items(title%2Clink%2CdisplayLink%2Csnippet)%2CsearchInformation" - + $"&key={creds.GoogleApiKey}" - + $"&safe=active"); - - var result = await System.Text.Json.JsonSerializer.DeserializeAsync(stream); - - return result; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Google/OfficialGoogleSearchResultEntry.cs b/src/EllieBot/Modules/Searches/Search/Google/OfficialGoogleSearchResultEntry.cs deleted file mode 100644 index bf23180..0000000 --- a/src/EllieBot/Modules/Searches/Search/Google/OfficialGoogleSearchResultEntry.cs +++ /dev/null @@ -1,19 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Text.Json.Serialization; - -namespace EllieBot.Services; - -public sealed class OfficialGoogleSearchResultEntry : ISearchResultEntry -{ - [JsonPropertyName("title")] - public string Title { get; init; } = null!; - - [JsonPropertyName("link")] - public string Url { get; init; } = null!; - - [JsonPropertyName("displayLink")] - public string DisplayUrl { get; init; } = null!; - - [JsonPropertyName("snippet")] - public string Description { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/GoogleScrape/GoogleScrapeService.cs b/src/EllieBot/Modules/Searches/Search/GoogleScrape/GoogleScrapeService.cs deleted file mode 100644 index 8c20767..0000000 --- a/src/EllieBot/Modules/Searches/Search/GoogleScrape/GoogleScrapeService.cs +++ /dev/null @@ -1,121 +0,0 @@ -using AngleSharp.Html.Dom; -using AngleSharp.Html.Parser; -using MorseCode.ITask; - -namespace EllieBot.Modules.Searches.GoogleScrape; - -public sealed class GoogleScrapeService : SearchServiceBase, IEService -{ - private static readonly HtmlParser _googleParser = new(new() - { - IsScripting = false, - IsEmbedded = false, - IsSupportingProcessingInstructions = false, - IsKeepingSourceReferences = false, - IsNotSupportingFrames = true - }); - - - private readonly IHttpClientFactory _httpFactory; - - public GoogleScrapeService(IHttpClientFactory httpClientFactory) - => _httpFactory = httpClientFactory; - - public override async ITask SearchAsync(string? query) - { - ArgumentNullException.ThrowIfNull(query); - - query = Uri.EscapeDataString(query)?.Replace(' ', '+'); - - var fullQueryLink = $"https://www.google.ca/search?q={query}&safe=on&lr=lang_eng&hl=en&ie=utf-8&oe=utf-8"; - - using var msg = new HttpRequestMessage(HttpMethod.Get, fullQueryLink); - msg.Headers.Add("User-Agent", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"); - msg.Headers.Add("Cookie", "CONSENT=YES+shp.gws-20210601-0-RC2.en+FX+423;"); - - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - - using var response = await http.SendAsync(msg); - await using var content = await response.Content.ReadAsStreamAsync(); - - using var document = await _googleParser.ParseDocumentAsync(content); - var elems = document.QuerySelectorAll("div.g, div.mnr-c > div > div"); - - var resultsElem = document.QuerySelector("#result-stats"); - var resultsArr = resultsElem?.TextContent.Split("results"); - var totalResults = resultsArr?.Length is null or 0 - ? null - : resultsArr[0]; - - var time = resultsArr is null or {Length: < 2} - ? null - : resultsArr[1] - .Replace("(", string.Empty) - .Replace("seconds)", string.Empty); - - //var time = resultsElem.Children.FirstOrDefault()?.TextContent - //^ this doesn't work for some reason, is completely missing in parsed collection - if (!elems.Any()) - return default; - - var results = elems.Select(elem => - { - var aTag = elem.QuerySelector("a"); - - if (aTag is null) - return null; - - var url = ((IHtmlAnchorElement)aTag).Href; - var title = aTag.QuerySelector("h3")?.TextContent; - - var txt = aTag.ParentElement - ?.NextElementSibling - ?.QuerySelector("span") - ?.TextContent - .StripHtml() - ?? elem - ?.QuerySelectorAll("span") - .Skip(3) - .FirstOrDefault() - ?.TextContent - .StripHtml(); - // .Select(x => x.TextContent.StripHtml()) - // .Join("\n"); - - if (string.IsNullOrWhiteSpace(url) - || string.IsNullOrWhiteSpace(title) - || string.IsNullOrWhiteSpace(txt)) - return null; - - return new PlainSearchResultEntry - { - Title = title, - Url = url, - DisplayUrl = url, - Description = txt - }; - }) - .Where(x => x is not null) - .ToList(); - - // return new GoogleSearchResult(results.AsReadOnly(), fullQueryLink, totalResults); - - return new PlainGoogleScrapeSearchResult() - { - Answer = null, - Entries = results!, - Info = new PlainSearchResultInfo() - { - SearchTime = time ?? "?", - TotalResults = totalResults ?? "?" - } - }; - } - - - // someone can mr this - public override ITask SearchImagesAsync(string query) - => throw new NotSupportedException(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainGoogleScrapeSearchResult.cs b/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainGoogleScrapeSearchResult.cs deleted file mode 100644 index 9abc999..0000000 --- a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainGoogleScrapeSearchResult.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Searches.GoogleScrape; - -public class PlainGoogleScrapeSearchResult : ISearchResult -{ - public required string? Answer { get; init; } - public required IReadOnlyCollection Entries { get; init; } - public required ISearchResultInformation Info { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultEntry.cs b/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultEntry.cs deleted file mode 100644 index 99fad02..0000000 --- a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultEntry.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Searches.GoogleScrape; - -public sealed class PlainSearchResultEntry : ISearchResultEntry -{ - public string Title { get; init; } = null!; - public string Url { get; init; } = null!; - public string DisplayUrl { get; init; } = null!; - public string? Description { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultInfo.cs b/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultInfo.cs deleted file mode 100644 index 92ba006..0000000 --- a/src/EllieBot/Modules/Searches/Search/GoogleScrape/PlainSearchResultInfo.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches.GoogleScrape; - -public sealed class PlainSearchResultInfo : ISearchResultInformation -{ - public string TotalResults { get; init; } = null!; - public string SearchTime { get; init; } = null!; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/IImageSearchResult.cs b/src/EllieBot/Modules/Searches/Search/IImageSearchResult.cs deleted file mode 100644 index d470613..0000000 --- a/src/EllieBot/Modules/Searches/Search/IImageSearchResult.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface IImageSearchResult -{ - ISearchResultInformation Info { get; } - - IReadOnlyCollection Entries { get; } -} - -public interface IImageSearchResultEntry -{ - string Link { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/ISearchResult.cs b/src/EllieBot/Modules/Searches/Search/ISearchResult.cs deleted file mode 100644 index d910819..0000000 --- a/src/EllieBot/Modules/Searches/Search/ISearchResult.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface ISearchResult -{ - string? Answer { get; } - IReadOnlyCollection Entries { get; } - ISearchResultInformation Info { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/ISearchResultEntry.cs b/src/EllieBot/Modules/Searches/Search/ISearchResultEntry.cs deleted file mode 100644 index e4dfc44..0000000 --- a/src/EllieBot/Modules/Searches/Search/ISearchResultEntry.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface ISearchResultEntry -{ - string Title { get; } - string Url { get; } - string DisplayUrl { get; } - string? Description { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/ISearchResultInformation.cs b/src/EllieBot/Modules/Searches/Search/ISearchResultInformation.cs deleted file mode 100644 index dfd9a53..0000000 --- a/src/EllieBot/Modules/Searches/Search/ISearchResultInformation.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public interface ISearchResultInformation -{ - string TotalResults { get; } - string SearchTime { get; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/ISearchService.cs b/src/EllieBot/Modules/Searches/Search/ISearchService.cs deleted file mode 100644 index 7454a60..0000000 --- a/src/EllieBot/Modules/Searches/Search/ISearchService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using MorseCode.ITask; - -namespace EllieBot.Modules.Searches; - -public interface ISearchService -{ - ITask SearchAsync(string? query); - ITask SearchImagesAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/ISearchServiceFactory.cs b/src/EllieBot/Modules/Searches/Search/ISearchServiceFactory.cs deleted file mode 100644 index bb46b09..0000000 --- a/src/EllieBot/Modules/Searches/Search/ISearchServiceFactory.cs +++ /dev/null @@ -1,10 +0,0 @@ -using EllieBot.Modules.Searches.Youtube; - -namespace EllieBot.Modules.Searches; - -public interface ISearchServiceFactory -{ - public ISearchService GetSearchService(string? hint = null); - public ISearchService GetImageSearchService(string? hint = null); - public IYoutubeSearchService GetYoutubeSearchService(string? hint = null); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs deleted file mode 100644 index b155c75..0000000 --- a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs +++ /dev/null @@ -1,205 +0,0 @@ -using EllieBot.Modules.Searches.Youtube; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - public partial class SearchCommands : EllieModule - { - private readonly ISearchServiceFactory _searchFactory; - private readonly IBotCache _cache; - - public SearchCommands( - ISearchServiceFactory searchFactory, - IBotCache cache) - { - _searchFactory = searchFactory; - _cache = cache; - } - - [Cmd] - public async Task Google([Leftover] string? query = null) - { - query = query?.Trim(); - - if (string.IsNullOrWhiteSpace(query)) - { - await Response().Error(strs.specify_search_params).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var search = _searchFactory.GetSearchService(); - var data = await search.SearchAsync(query); - - if (data is null or { Entries: null or { Count: 0 } }) - { - await Response().Error(strs.no_results).SendAsync(); - return; - } - - // 3 with an answer - // 4 without an answer - // 5 is ideal but it lookes horrible on mobile - - var takeCount = string.IsNullOrWhiteSpace(data.Answer) - ? 4 - : 3; - - var descStr = data.Entries - .Take(takeCount) - .Select(static res => $@"**[{Format.Sanitize(res.Title)}]({res.Url})** -*{Format.EscapeUrl(res.DisplayUrl)}* -{Format.Sanitize(res.Description ?? "-")}") - .Join("\n\n"); - - if (!string.IsNullOrWhiteSpace(data.Answer)) - descStr = Format.Code(data.Answer) + "\n\n" + descStr; - - descStr = descStr.TrimTo(4096); - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query.TrimTo(64)!) - .WithDescription(descStr) - .WithFooter( - GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), - "https://i.imgur.com/G46fm8J.png"); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task Image([Leftover] string query) - { - query = query.Trim(); - - if (string.IsNullOrWhiteSpace(query)) - { - await Response().Error(strs.specify_search_params).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var search = _searchFactory.GetImageSearchService(); - var data = await search.SearchImagesAsync(query); - - if (data is null or { Entries: null or { Count: 0 } }) - { - await Response().Error(strs.no_search_results).SendAsync(); - return; - } - - var embeds = new List(4); - - - EmbedBuilder CreateEmbed(IImageSearchResultEntry entry) - { - return _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query) - .WithUrl("https://google.com") - .WithImageUrl(entry.Link); - } - - await Response() - .Paginated() - .Items(data.Entries) - .PageSize(1) - .AddFooter(false) - .Page((items, _) => - { - var item = items.FirstOrDefault(); - - if (item is null) - return _sender.CreateEmbed() - .WithDescription(GetText(strs.no_search_results)); - - var embed = CreateEmbed(item); - embeds.Add(embed); - - return embed; - }) - .SendAsync(); - } - - private TypedKey GetYtCacheKey(string query) - => new($"search:youtube:{query}"); - - private async Task AddYoutubeUrlToCacheAsync(string query, string url) - => await _cache.AddAsync(GetYtCacheKey(query), url, expiry: 1.Hours()); - - private async Task GetYoutubeUrlFromCacheAsync(string query) - { - var result = await _cache.GetAsync(GetYtCacheKey(query)); - - if (!result.TryGetValue(out var url) || string.IsNullOrWhiteSpace(url)) - return null; - - return new VideoInfo() - { - Url = url - }; - } - - [Cmd] - public async Task Youtube([Leftover] string? query = null) - { - query = query?.Trim(); - - if (string.IsNullOrWhiteSpace(query)) - { - await Response().Error(strs.specify_search_params).SendAsync(); - return; - } - - _ = ctx.Channel.TriggerTypingAsync(); - - var maybeResult = await GetYoutubeUrlFromCacheAsync(query) - ?? await _searchFactory.GetYoutubeSearchService().SearchAsync(query); - if (maybeResult is not { } result || result is { Url: null }) - { - await Response().Error(strs.no_results).SendAsync(); - return; - } - - await AddYoutubeUrlToCacheAsync(query, result.Url); - await Response().Text(result.Url).SendAsync(); - } - -// [Cmd] -// public async Task DuckDuckGo([Leftover] string query = null) -// { -// query = query?.Trim(); -// if (!await ValidateQuery(query)) -// return; -// -// _ = ctx.Channel.TriggerTypingAsync(); -// -// var data = await _service.DuckDuckGoSearchAsync(query); -// if (data is null) -// { -// await Response().Error(strs.no_results).SendAsync(); -// return; -// } -// -// var desc = data.Results.Take(5) -// .Select(res => $@"[**{res.Title}**]({res.Link}) -// {res.Text.TrimTo(380 - res.Title.Length - res.Link.Length)}"); -// -// var descStr = string.Join("\n\n", desc); -// -// var embed = _sender.CreateEmbed() -// .WithAuthor(ctx.User.ToString(), -// "https://upload.wikimedia.org/wikipedia/en/9/90/The_DuckDuckGo_Duck.png") -// .WithDescription($"{GetText(strs.search_for)} **{query}**\n\n" + descStr) -// .WithOkColor(); -// -// await Response().Embed(embed).SendAsync(); -// } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/SearchServiceBase.cs b/src/EllieBot/Modules/Searches/Search/SearchServiceBase.cs deleted file mode 100644 index c346306..0000000 --- a/src/EllieBot/Modules/Searches/Search/SearchServiceBase.cs +++ /dev/null @@ -1,9 +0,0 @@ -using MorseCode.ITask; - -namespace EllieBot.Modules.Searches; - -public abstract class SearchServiceBase : ISearchService -{ - public abstract ITask SearchAsync(string? query); - public abstract ITask SearchImagesAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResult.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResult.cs deleted file mode 100644 index 54fdcdd..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResult.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Globalization; -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxImageSearchResult : IImageSearchResult -{ - public string SearchTime { get; set; } = null!; - - public ISearchResultInformation Info - => new SearxSearchResultInformation() - { - SearchTime = SearchTime, - TotalResults = NumberOfResults.ToString("N", CultureInfo.InvariantCulture) - }; - - public IReadOnlyCollection Entries - => Results; - - [JsonPropertyName("results")] - public List Results { get; set; } = new List(); - - [JsonPropertyName("query")] - public string Query { get; set; } = null!; - - [JsonPropertyName("number_of_results")] - public double NumberOfResults { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResultEntry.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResultEntry.cs deleted file mode 100644 index 888a2ce..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxImageSearchResultEntry.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxImageSearchResultEntry : IImageSearchResultEntry -{ - public string Link - => ImageSource.StartsWith("//") - ? "https:" + ImageSource - : ImageSource; - - [JsonPropertyName("img_src")] - public string ImageSource { get; set; } = string.Empty; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxInfobox.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxInfobox.cs deleted file mode 100644 index 1fd9ee2..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxInfobox.cs +++ /dev/null @@ -1,30 +0,0 @@ -// using System.Text.Json.Serialization; -// -// namespace EllieBot.Modules.Searches; -// -// public sealed class SearxInfobox -// { -// [JsonPropertyName("infobox")] -// public string Infobox { get; set; } -// -// [JsonPropertyName("id")] -// public string Id { get; set; } -// -// [JsonPropertyName("content")] -// public string Content { get; set; } -// -// [JsonPropertyName("img_src")] -// public string ImgSrc { get; set; } -// -// [JsonPropertyName("urls")] -// public List Urls { get; } = new List(); -// -// [JsonPropertyName("engine")] -// public string Engine { get; set; } -// -// [JsonPropertyName("engines")] -// public List Engines { get; } = new List(); -// -// [JsonPropertyName("attributes")] -// public List Attributes { get; } = new List(); -// } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchAttribute.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchAttribute.cs deleted file mode 100644 index 7071ea7..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxSearchAttribute -{ - [JsonPropertyName("label")] - public string? Label { get; set; } - - [JsonPropertyName("value")] - public string? Value { get; set; } - - [JsonPropertyName("entity")] - public string? Entity { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResult.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResult.cs deleted file mode 100644 index 3483548..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResult.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Globalization; -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxSearchResult : ISearchResult -{ - [JsonPropertyName("query")] - public string Query { get; set; } = null!; - - [JsonPropertyName("number_of_results")] - public double NumberOfResults { get; set; } - - [JsonPropertyName("results")] - public List Results { get; set; } = new List(); - - [JsonPropertyName("answers")] - public List Answers { get; set; } = new List(); - // - // [JsonPropertyName("corrections")] - // public List Corrections { get; } = new List(); - - // [JsonPropertyName("infoboxes")] - // public List Infoboxes { get; } = new List(); - // - // [JsonPropertyName("suggestions")] - // public List Suggestions { get; } = new List(); - - // [JsonPropertyName("unresponsive_engines")] - // public List UnresponsiveEngines { get; } = new List(); - - - public string SearchTime { get; set; } = null!; - - public IReadOnlyCollection Entries - => Results; - - public ISearchResultInformation Info - => new SearxSearchResultInformation() - { - SearchTime = SearchTime, - TotalResults = NumberOfResults.ToString("N", CultureInfo.InvariantCulture) - }; - - public string? Answer - => Answers.FirstOrDefault(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultEntry.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultEntry.cs deleted file mode 100644 index 9670a17..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultEntry.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxSearchResultEntry : ISearchResultEntry -{ - public string DisplayUrl - => Url; - - public string Description - => Content.TrimTo(768)!; - - [JsonPropertyName("url")] - public string Url { get; set; } = null!; - - [JsonPropertyName("title")] - public string Title { get; set; } = null!; - - [JsonPropertyName("content")] - public string? Content { get; set; } - - // [JsonPropertyName("engine")] - // public string Engine { get; set; } - // - // [JsonPropertyName("parsed_url")] - // public List ParsedUrl { get; } = new List(); - // - // [JsonPropertyName("template")] - // public string Template { get; set; } - // - // [JsonPropertyName("engines")] - // public List Engines { get; } = new List(); - // - // [JsonPropertyName("positions")] - // public List Positions { get; } = new List(); - // - // [JsonPropertyName("score")] - // public double Score { get; set; } - // - // [JsonPropertyName("category")] - // public string Category { get; set; } - // - // [JsonPropertyName("pretty_url")] - // public string PrettyUrl { get; set; } - // - // [JsonPropertyName("open_group")] - // public bool OpenGroup { get; set; } - // - // [JsonPropertyName("close_group")] - // public bool? CloseGroup { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultInformation.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultInformation.cs deleted file mode 100644 index 33b8077..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchResultInformation.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public sealed class SearxSearchResultInformation : ISearchResultInformation -{ - public string TotalResults { get; init; } = string.Empty; - public string SearchTime { get; init; } = string.Empty; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs deleted file mode 100644 index 5d8ecc6..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxSearchService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using MorseCode.ITask; -using System.Diagnostics; -using System.Globalization; -using System.Text.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxSearchService : SearchServiceBase, IEService -{ - private readonly IHttpClientFactory _http; - private readonly SearchesConfigService _scs; - - private static readonly Random _rng = new EllieRandom(); - - public SearxSearchService(IHttpClientFactory http, SearchesConfigService scs) - => (_http, _scs) = (http, scs); - - private string GetRandomInstance() - { - var instances = _scs.Data.SearxInstances; - - if (instances is null or { Count: 0 }) - throw new InvalidOperationException("No searx instances specified in searches.yml"); - - return instances[_rng.Next(0, instances.Count)]; - } - - public override async ITask SearchAsync(string? query) - { - ArgumentNullException.ThrowIfNull(query); - - var instanceUrl = GetRandomInstance(); - - Log.Information("Using {Instance} instance for web search...", instanceUrl); - var startTime = Stopwatch.GetTimestamp(); - - using var http = _http.CreateClient(); - await using var res = await http.GetStreamAsync($"{instanceUrl}" - + $"?q={Uri.EscapeDataString(query)}" - + $"&format=json" - + $"&strict=2"); - - var elapsed = Stopwatch.GetElapsedTime(startTime); - var dat = await JsonSerializer.DeserializeAsync(res); - - if (dat is null) - return new SearxSearchResult(); - - dat.SearchTime = elapsed.TotalSeconds.ToString("N2", CultureInfo.InvariantCulture); - return dat; - } - - public override async ITask SearchImagesAsync(string query) - { - ArgumentNullException.ThrowIfNull(query); - - var instanceUrl = GetRandomInstance(); - - Log.Information("Using {Instance} instance for img search...", instanceUrl); - var startTime = Stopwatch.GetTimestamp(); - using var http = _http.CreateClient(); - await using var res = await http.GetStreamAsync($"{instanceUrl}" - + $"?q={Uri.EscapeDataString(query)}" - + $"&format=json" - + $"&category_images=on" - + $"&strict=2"); - - var elapsed = Stopwatch.GetElapsedTime(startTime); - var dat = await JsonSerializer.DeserializeAsync(res); - - if (dat is null) - return new SearxImageSearchResult(); - - dat.SearchTime = elapsed.TotalSeconds.ToString("N2", CultureInfo.InvariantCulture); - return dat; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Searx/SearxUrlData.cs b/src/EllieBot/Modules/Searches/Search/Searx/SearxUrlData.cs deleted file mode 100644 index 07f8591..0000000 --- a/src/EllieBot/Modules/Searches/Search/Searx/SearxUrlData.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class SearxUrlData -{ - [JsonPropertyName("title")] - public string Title { get; set; } = null!; - - [JsonPropertyName("url")] - public string Url { get; set; } = null!; - - [JsonPropertyName("official")] - public bool? Official { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs deleted file mode 100644 index 5b9bfab..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public interface IYoutubeSearchService -{ - Task SearchAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs deleted file mode 100644 index 9b18d0c..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches; - -public sealed class InvidiousSearchResponse -{ - [JsonPropertyName("videoId")] - public required string VideoId { get; init; } - - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videoThumbnails")] - public required List Thumbnails { get; init; } - - [JsonPropertyName("lengthSeconds")] - public required int LengthSeconds { get; init; } - - [JsonPropertyName("description")] - public required string Description { get; init; } -} - -public sealed class InvidiousVideoResponse -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videoId")] - public required string VideoId { get; init; } - - [JsonPropertyName("lengthSeconds")] - public required int LengthSeconds { get; init; } - - [JsonPropertyName("videoThumbnails")] - public required List Thumbnails { get; init; } - - [JsonPropertyName("adaptiveFormats")] - public required List AdaptiveFormats { get; init; } -} - -public sealed class InvidiousAdaptiveFormat -{ - [JsonPropertyName("url")] - public required string Url { get; init; } - - [JsonPropertyName("audioQuality")] - public string? AudioQuality { get; init; } -} - -public sealed class InvidiousPlaylistResponse -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videos")] - public required List Videos { get; init; } -} - -public sealed class InvidiousThumbnail -{ - [JsonPropertyName("url")] - public required string Url { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs deleted file mode 100644 index 17bd519..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs +++ /dev/null @@ -1,47 +0,0 @@ -using EllieBot.Modules.Searches.Youtube; -using System.Net.Http.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class InvidiousYtSearchService : IYoutubeSearchService, IEService -{ - private readonly IHttpClientFactory _http; - private readonly SearchesConfigService _scs; - private readonly EllieRandom _rng; - - public InvidiousYtSearchService( - IHttpClientFactory http, - SearchesConfigService scs) - { - _http = http; - _scs = scs; - _rng = new(); - } - - public async Task SearchAsync(string query) - { - ArgumentNullException.ThrowIfNull(query); - - var instances = _scs.Data.InvidiousInstances; - if (instances is null or { Count: 0 }) - { - Log.Warning("Attempted to use Invidious as the .youtube provider but there are no 'invidiousInstances' " - + "specified in `data/searches.yml`"); - return null; - } - - var instance = instances[_rng.Next(0, instances.Count)]; - - var url = $"{instance}/api/v1/search" - + $"?q={query}" - + $"&type=video"; - using var http = _http.CreateClient(); - var res = await http.GetFromJsonAsync>( - url); - - if (res is null or { Count: 0 }) - return null; - - return new VideoInfo(res[0].VideoId); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/VideoInfo.cs b/src/EllieBot/Modules/Searches/Search/Youtube/VideoInfo.cs deleted file mode 100644 index 5f53b9b..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/VideoInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public readonly struct VideoInfo -{ - public VideoInfo(string videoId) - => Url = $"https://youtube.com/watch?v={videoId}"; - - public string Url { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs deleted file mode 100644 index e8bfcd2..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public sealed class YoutubeDataApiSearchService : IYoutubeSearchService, IEService -{ - private readonly IGoogleApiService _gapi; - - public YoutubeDataApiSearchService(IGoogleApiService gapi) - { - _gapi = gapi; - } - - public async Task SearchAsync(string query) - { - ArgumentNullException.ThrowIfNull(query); - - var results = await _gapi.GetVideoLinksByKeywordAsync(query); - var first = results.FirstOrDefault(); - if (first is null) - return null; - - return new() - { - Url = first - }; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs deleted file mode 100644 index 3ac59f8..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public sealed class YtdlYoutubeSearchService : YoutubedlxServiceBase, IEService -{ - public override async Task SearchAsync(string query) - => await InternalGetInfoAsync(query, false); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs deleted file mode 100644 index d7e66fa..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public sealed class YtdlpYoutubeSearchService : YoutubedlxServiceBase, IEService -{ - public override async Task SearchAsync(string query) - => await InternalGetInfoAsync(query, true); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs deleted file mode 100644 index 6239bdd..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public abstract class YoutubedlxServiceBase : IYoutubeSearchService -{ - private YtdlOperation CreateYtdlOp(bool isYtDlp) - => new YtdlOperation("-4 " - + "--geo-bypass " - + "--encoding UTF8 " - + "--get-id " - + "--no-check-certificate " - + "--default-search " - + "\"ytsearch:\" -- \"{0}\"", - isYtDlp: isYtDlp); - - protected async Task InternalGetInfoAsync(string query, bool isYtDlp) - { - var op = CreateYtdlOp(isYtDlp); - var data = await op.GetDataAsync(query); - var items = data?.Split('\n'); - if (items is null or { Length: 0 }) - return null; - - var id = items.FirstOrDefault(x => x.Length is > 5 and < 15); - if (id is null) - return null; - - return new VideoInfo() - { - Url = $"https://youtube.com/watch?v={id}" - }; - } - - public abstract Task SearchAsync(string query); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs deleted file mode 100644 index 70e2556..0000000 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ /dev/null @@ -1,461 +0,0 @@ -using Microsoft.Extensions.Caching.Memory; -using EllieBot.Modules.Searches.Common; -using EllieBot.Modules.Searches.Services; -using Newtonsoft.Json; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using System.Diagnostics.CodeAnalysis; -using Color = SixLabors.ImageSharp.Color; - -namespace EllieBot.Modules.Searches; - -public partial class Searches : EllieModule -{ - private readonly IBotCredentials _creds; - private readonly IGoogleApiService _google; - private readonly IHttpClientFactory _httpFactory; - private readonly IMemoryCache _cache; - private readonly ITimezoneService _tzSvc; - - public Searches( - IBotCredentials creds, - IGoogleApiService google, - IHttpClientFactory factory, - IMemoryCache cache, - ITimezoneService tzSvc) - { - _creds = creds; - _google = google; - _httpFactory = factory; - _cache = cache; - _tzSvc = tzSvc; - } - - [Cmd] - public async Task Weather([Leftover] string query) - { - if (!await ValidateQuery(query)) - return; - - var embed = _sender.CreateEmbed(); - var data = await _service.GetWeatherDataAsync(query); - - if (data is null) - embed.WithDescription(GetText(strs.city_not_found)).WithErrorColor(); - else - { - var f = StandardConversions.CelsiusToFahrenheit; - - var tz = _tzSvc.GetTimeZoneOrUtc(ctx.Guild?.Id); - var sunrise = data.Sys.Sunrise.ToUnixTimestamp(); - var sunset = data.Sys.Sunset.ToUnixTimestamp(); - sunrise = sunrise.ToOffset(tz.GetUtcOffset(sunrise)); - sunset = sunset.ToOffset(tz.GetUtcOffset(sunset)); - var timezone = $"UTC{sunrise:zzz}"; - - embed - .AddField("🌍 " + Format.Bold(GetText(strs.location)), - $"[{data.Name + ", " + data.Sys.Country}](https://openweathermap.org/city/{data.Id})", - true) - .AddField("📏 " + Format.Bold(GetText(strs.latlong)), $"{data.Coord.Lat}, {data.Coord.Lon}", true) - .AddField("☁ " + Format.Bold(GetText(strs.condition)), - string.Join(", ", data.Weather.Select(w => w.Main)), - true) - .AddField("😓 " + Format.Bold(GetText(strs.humidity)), $"{data.Main.Humidity}%", true) - .AddField("💨 " + Format.Bold(GetText(strs.wind_speed)), data.Wind.Speed + " m/s", true) - .AddField("🌡 " + Format.Bold(GetText(strs.temperature)), - $"{data.Main.Temp:F1}°C / {f(data.Main.Temp):F1}°F", - true) - .AddField("🔆 " + Format.Bold(GetText(strs.min_max)), - $"{data.Main.TempMin:F1}°C - {data.Main.TempMax:F1}°C\n{f(data.Main.TempMin):F1}°F - {f(data.Main.TempMax):F1}°F", - true) - .AddField("🌄 " + Format.Bold(GetText(strs.sunrise)), $"{sunrise:HH:mm} {timezone}", true) - .AddField("🌇 " + Format.Bold(GetText(strs.sunset)), $"{sunset:HH:mm} {timezone}", true) - .WithOkColor() - .WithFooter("Powered by openweathermap.org", - $"https://openweathermap.org/img/w/{data.Weather[0].Icon}.png"); - } - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task Time([Leftover] string query) - { - if (!await ValidateQuery(query)) - return; - - await ctx.Channel.TriggerTypingAsync(); - - var (data, err) = await _service.GetTimeDataAsync(query); - if (err is not null) - { - await HandleErrorAsync(err.Value); - return; - } - - if (string.IsNullOrWhiteSpace(data.TimeZoneName)) - { - await Response().Error(strs.timezone_db_api_key).SendAsync(); - return; - } - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.time_new)) - .WithDescription(Format.Code(data.Time.ToString(Culture))) - .AddField(GetText(strs.location), string.Join('\n', data.Address.Split(", ")), true) - .AddField(GetText(strs.timezone), data.TimeZoneName, true); - - await Response().Embed(eb).SendAsync(); - } - - [Cmd] - public async Task Movie([Leftover] string query) - { - if (!await ValidateQuery(query)) - return; - - await ctx.Channel.TriggerTypingAsync(); - - var movie = await _service.GetMovieDataAsync(query); - if (movie is null) - { - await Response().Error(strs.imdb_fail).SendAsync(); - return; - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(movie.Title) - .WithUrl($"https://www.imdb.com/title/{movie.ImdbId}/") - .WithDescription(movie.Plot.TrimTo(1000)) - .AddField("Rating", movie.ImdbRating, true) - .AddField("Genre", movie.Genre, true) - .AddField("Year", movie.Year, true) - .WithImageUrl(Uri.IsWellFormedUriString(movie.Poster, UriKind.Absolute) - ? movie.Poster - : null)) - .SendAsync(); - } - - [Cmd] - public Task RandomCat() - => InternalRandomImage(SearchesService.ImageTag.Cats); - - [Cmd] - public Task RandomDog() - => InternalRandomImage(SearchesService.ImageTag.Dogs); - - [Cmd] - public Task RandomFood() - => InternalRandomImage(SearchesService.ImageTag.Food); - - [Cmd] - public Task RandomBird() - => InternalRandomImage(SearchesService.ImageTag.Birds); - - private Task InternalRandomImage(SearchesService.ImageTag tag) - { - var url = _service.GetRandomImageUrl(tag); - return Response().Embed(_sender.CreateEmbed().WithOkColor().WithImageUrl(url)).SendAsync(); - } - - [Cmd] - public async Task Lmgtfy([Leftover] string smh) - { - if (!await ValidateQuery(smh)) - return; - - var link = $"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"; - var shortenedUrl = await _service.ShortenLink(link) ?? link; - await Response().Confirm($"<{shortenedUrl}>").SendAsync(); - } - - [Cmd] - public async Task Shorten([Leftover] string query) - { - if (!await ValidateQuery(query)) - return; - - var shortLink = await _service.ShortenLink(query); - - if (shortLink is null) - { - await Response().Error(strs.error_occured).SendAsync(); - return; - } - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .AddField(GetText(strs.original_url), $"<{query}>") - .AddField(GetText(strs.short_url), $"<{shortLink}>")) - .SendAsync(); - } - - - [Cmd] - public async Task MagicTheGathering([Leftover] string search) - { - if (!await ValidateQuery(search)) - return; - - await ctx.Channel.TriggerTypingAsync(); - var card = await _service.GetMtgCardAsync(search); - - if (card is null) - { - await Response().Error(strs.card_not_found).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(card.Name) - .WithDescription(card.Description) - .WithImageUrl(card.ImageUrl) - .AddField(GetText(strs.store_url), card.StoreUrl, true) - .AddField(GetText(strs.cost), card.ManaCost, true) - .AddField(GetText(strs.types), card.Types, true); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task Hearthstone([Leftover] string name) - { - if (!await ValidateQuery(name)) - return; - - if (string.IsNullOrWhiteSpace(_creds.RapidApiKey)) - { - await Response().Error(strs.mashape_api_missing).SendAsync(); - return; - } - - await ctx.Channel.TriggerTypingAsync(); - var card = await _service.GetHearthstoneCardDataAsync(name); - - if (card is null) - { - await Response().Error(strs.card_not_found).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed().WithOkColor().WithImageUrl(card.Img); - - if (!string.IsNullOrWhiteSpace(card.Flavor)) - embed.WithDescription(card.Flavor); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task UrbanDict([Leftover] string query) - { - if (!await ValidateQuery(query)) - return; - - await ctx.Channel.TriggerTypingAsync(); - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync($"https://api.urbandictionary.com/v0/define?" - + $"term={Uri.EscapeDataString(query)}"); - var allItems = JsonConvert.DeserializeObject(res)?.List; - - if (allItems is null or { Length: 0 }) - { - await Response().Error(strs.ud_error).SendAsync(); - return; - } - - await Response() - .Paginated() - .Items(allItems) - .PageSize(1) - .CurrentPage(0) - .Page((items, _) => - { - var item = items[0]; - return _sender.CreateEmbed() - .WithOkColor() - .WithUrl(item.Permalink) - .WithTitle(item.Word) - .WithDescription(item.Definition); - }) - .SendAsync(); - } - - [Cmd] - public async Task Define([Leftover] string word) - { - if (!await ValidateQuery(word)) - return; - - - var maybeItems = await _service.GetDefinitionsAsync(word); - - if (!maybeItems.TryPickT0(out var defs, out var error)) - { - await HandleErrorAsync(error); - return; - } - - await Response() - .Paginated() - .Items(defs) - .PageSize(1) - .Page((items, _) => - { - var model = items.First(); - var embed = _sender.CreateEmbed() - .WithDescription(ctx.User.Mention) - .AddField(GetText(strs.word), model.Word, true) - .AddField(GetText(strs._class), model.WordType, true) - .AddField(GetText(strs.definition), model.Definition) - .WithOkColor(); - - if (!string.IsNullOrWhiteSpace(model.Example)) - embed.AddField(GetText(strs.example), model.Example); - - return embed; - }) - .SendAsync(); - } - - [Cmd] - public async Task Catfact() - { - var maybeFact = await _service.GetCatFactAsync(); - - if (!maybeFact.TryPickT0(out var fact, out var error)) - { - await HandleErrorAsync(error); - return; - } - - await Response().Confirm("🐈" + GetText(strs.catfact), fact).SendAsync(); - } - - [Cmd] - public async Task Wiki([Leftover] string query) - { - query = query.Trim(); - - if (!await ValidateQuery(query)) - return; - - var maybeRes = await _service.GetWikipediaPageAsync(query); - if (!maybeRes.TryPickT0(out var res, out var error)) - { - await HandleErrorAsync(error); - return; - } - - var data = res.Data; - await Response().Text(data.Url).SendAsync(); - } - - public Task HandleErrorAsync(ErrorType error) - { - var errorKey = error switch - { - ErrorType.ApiKeyMissing => strs.api_key_missing, - ErrorType.InvalidInput => strs.invalid_input, - ErrorType.NotFound => strs.not_found, - ErrorType.Unknown => strs.error_occured, - _ => strs.error_occured, - }; - - return Response().Error(errorKey).SendAsync(); - } - - [Cmd] - public async Task Color(params Color[] colors) - { - if (!colors.Any()) - return; - - var colorObjects = colors.Take(10).ToArray(); - - using var img = new Image(colorObjects.Length * 50, 50); - for (var i = 0; i < colorObjects.Length; i++) - { - var x = i * 50; - var j = i; - img.Mutate(m => m.FillPolygon(colorObjects[j], new(x, 0), new(x + 50, 0), new(x + 50, 50), new(x, 50))); - } - - await using var ms = await img.ToStreamAsync(); - await ctx.Channel.SendFileAsync(ms, "colors.png"); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Avatar([Leftover] IGuildUser? usr = null) - { - usr ??= (IGuildUser)ctx.User; - - var avatarUrl = usr.RealAvatarUrl(2048); - - await Response() - .Embed( - _sender.CreateEmbed() - .WithOkColor() - .AddField("Username", usr.ToString()) - .AddField("Avatar Url", avatarUrl) - .WithThumbnailUrl(avatarUrl.ToString())) - .SendAsync(); - } - - [Cmd] - public async Task Wikia(string target, [Leftover] string query) - { - if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query)) - { - await Response().Error(strs.wikia_input_error).SendAsync(); - return; - } - - var maybeRes = await _service.GetWikiaPageAsync(target, query); - - if (!maybeRes.TryPickT0(out var res, out var error)) - { - await HandleErrorAsync(error); - return; - } - - var response = $"### {res.Title}\n{res.Url}"; - await Response().Text(response).Sanitize().SendAsync(); - } - - [Cmd] - public async Task Steam([Leftover] string query) - { - if (string.IsNullOrWhiteSpace(query)) - return; - - await ctx.Channel.TriggerTypingAsync(); - - var appId = await _service.GetSteamAppIdByName(query); - if (appId == -1) - { - await Response().Error(strs.not_found).SendAsync(); - return; - } - - await Response().Text($"https://store.steampowered.com/app/{appId}").SendAsync(); - } - - private async Task ValidateQuery([MaybeNullWhen(false)] string query) - { - if (!string.IsNullOrWhiteSpace(query)) - return true; - - await Response().Error(strs.specify_search_params).SendAsync(); - return false; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs deleted file mode 100644 index 05f2d90..0000000 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ /dev/null @@ -1,614 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using OneOf; -using System.Text.Json; - -namespace EllieBot.Modules.Searches.Services; - -public class SearchesService : IEService -{ - public enum ImageTag - { - Food, - Dogs, - Cats, - Birds - } - - public List WowJokes { get; } = []; - public List MagicItems { get; } = []; - private readonly IHttpClientFactory _httpFactory; - private readonly IGoogleApiService _google; - private readonly IBotCache _c; - private readonly IBotCredsProvider _creds; - private readonly EllieRandom _rng; - private readonly List _yomamaJokes; - - private readonly object _yomamaLock = new(); - private int yomamaJokeIndex; - private readonly ConcurrentDictionary _cachedShortenedLinks = new(); - - public SearchesService( - IGoogleApiService google, - IBotCache c, - IHttpClientFactory factory, - IBotCredsProvider creds) - { - _httpFactory = factory; - _google = google; - _c = c; - _creds = creds; - _rng = new(); - - //joke commands - if (File.Exists("data/wowjokes.json")) - WowJokes = JsonConvert.DeserializeObject>(File.ReadAllText("data/wowjokes.json")); - else - Log.Warning("data/wowjokes.json is missing. WOW Jokes are not loaded"); - - if (File.Exists("data/magicitems.json")) - MagicItems = JsonConvert.DeserializeObject>(File.ReadAllText("data/magicitems.json")); - else - Log.Warning("data/magicitems.json is missing. Magic items are not loaded"); - - if (File.Exists("data/yomama.txt")) - _yomamaJokes = File.ReadAllLines("data/yomama.txt").Shuffle().ToList(); - else - { - _yomamaJokes = []; - Log.Warning("data/yomama.txt is missing. .yomama command won't work"); - } - } - - public async Task GetWeatherDataAsync(string query) - { - query = query.Trim().ToLowerInvariant(); - - return await _c.GetOrAddAsync(new($"ellie_weather_{query}"), - async () => await GetWeatherDataFactory(query), - TimeSpan.FromHours(3)); - } - - private async Task GetWeatherDataFactory(string query) - { - using var http = _httpFactory.CreateClient(); - try - { - var data = await http.GetStringAsync("https://api.openweathermap.org/data/2.5/weather?" - + $"q={query}&" - + "appid=42cd627dd60debf25a5739e50a217d74&" - + "units=metric"); - - if (string.IsNullOrWhiteSpace(data)) - return null; - - return JsonConvert.DeserializeObject(data); - } - catch (Exception ex) - { - Log.Warning(ex, "Error getting weather data"); - return null; - } - } - - public Task<((string Address, DateTime Time, string TimeZoneName), ErrorType?)> GetTimeDataAsync(string arg) - => GetTimeDataFactory(arg); - - //return _cache.GetOrAddCachedDataAsync($"ellie_time_{arg}", - // GetTimeDataFactory, - // arg, - // TimeSpan.FromMinutes(1)); - private async Task<((string Address, DateTime Time, string TimeZoneName), ErrorType?)> GetTimeDataFactory( - string query) - { - query = query.Trim(); - - if (string.IsNullOrEmpty(query)) - return (default, ErrorType.InvalidInput); - - - var locIqKey = _creds.GetCreds().LocationIqApiKey; - var tzDbKey = _creds.GetCreds().TimezoneDbApiKey; - if (string.IsNullOrWhiteSpace(locIqKey) || string.IsNullOrWhiteSpace(tzDbKey)) - return (default, ErrorType.ApiKeyMissing); - - try - { - using var http = _httpFactory.CreateClient(); - var res = await _c.GetOrAddAsync(new($"searches:geo:{query}"), - async () => - { - var url = "https://eu1.locationiq.com/v1/search.php?" - + (string.IsNullOrWhiteSpace(locIqKey) - ? "key=" - : $"key={locIqKey}&") - + $"q={Uri.EscapeDataString(query)}&" - + "format=json"; - - var res = await http.GetStringAsync(url); - return res; - }, - TimeSpan.FromHours(1)); - - var responses = JsonConvert.DeserializeObject(res); - if (responses is null || responses.Length == 0) - { - Log.Warning("Geocode lookup failed for: {Query}", query); - return (default, ErrorType.NotFound); - } - - var geoData = responses[0]; - - using var req = new HttpRequestMessage(HttpMethod.Get, - "http://api.timezonedb.com/v2.1/get-time-zone?" - + $"key={tzDbKey}" - + $"&format=json" - + $"&by=position" - + $"&lat={geoData.Lat}" - + $"&lng={geoData.Lon}"); - - using var geoRes = await http.SendAsync(req); - var resString = await geoRes.Content.ReadAsStringAsync(); - var timeObj = JsonConvert.DeserializeObject(resString); - - var time = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timeObj.Timestamp); - - return ((Address: responses[0].DisplayName, Time: time, TimeZoneName: timeObj.TimezoneName), default); - } - catch (Exception ex) - { - Log.Error(ex, "Weather error: {Message}", ex.Message); - return (default, ErrorType.NotFound); - } - } - - public string GetRandomImageUrl(ImageTag tag) - { - var subpath = tag.ToString().ToLowerInvariant(); - - var max = tag switch - { - ImageTag.Food => 773, - ImageTag.Dogs => 750, - ImageTag.Cats => 773, - ImageTag.Birds => 578, - _ => 100, - }; - - - return $"https://nadeko-pictures.nyc3.digitaloceanspaces.com/{subpath}/" - + _rng.Next(1, max).ToString("000") - + ".png"; - } - - public Task GetYomamaJoke() - { - string joke; - lock (_yomamaLock) - { - if (yomamaJokeIndex >= _yomamaJokes.Count) - { - yomamaJokeIndex = 0; - var newList = _yomamaJokes.ToList(); - _yomamaJokes.Clear(); - _yomamaJokes.AddRange(newList.Shuffle()); - } - - joke = _yomamaJokes[yomamaJokeIndex++]; - } - - return Task.FromResult(joke); - - // using (var http = _httpFactory.CreateClient()) - // { - // var response = await http.GetStringAsync(new Uri("http://api.yomomma.info/")); - // return JObject.Parse(response)["joke"].ToString() + " 😆"; - // } - } - - public async Task<(string Setup, string Punchline)> GetRandomJoke() - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync("https://official-joke-api.appspot.com/random_joke"); - var resObj = JsonConvert.DeserializeAnonymousType(res, - new - { - setup = "", - punchline = "" - }); - return (resObj.setup, resObj.punchline); - } - - public async Task GetChuckNorrisJoke() - { - using var http = _httpFactory.CreateClient(); - var response = await http.GetStringAsync(new Uri("https://api.chucknorris.io/jokes/random")); - return JObject.Parse(response)["value"] + " 😆"; - } - - public async Task GetMtgCardAsync(string search) - { - search = search.Trim().ToLowerInvariant(); - var data = await _c.GetOrAddAsync(new($"mtg:{search}"), - async () => await GetMtgCardFactory(search), - TimeSpan.FromDays(1)); - - if (data is null || data.Length == 0) - return null; - - return data[_rng.Next(0, data.Length)]; - } - - private async Task GetMtgCardFactory(string search) - { - async Task GetMtgDataAsync(MtgResponse.Data card) - { - string storeUrl; - try - { - storeUrl = await _google.ShortenUrl("https://shop.tcgplayer.com/productcatalog/product/show?" - + "newSearch=false&" - + "ProductType=All&" - + "IsProductNameExact=false&" - + $"ProductName={Uri.EscapeDataString(card.Name)}"); - } - catch { storeUrl = ""; } - - return new() - { - Description = card.Text, - Name = card.Name, - ImageUrl = card.ImageUrl, - StoreUrl = storeUrl, - Types = string.Join(",\n", card.Types), - ManaCost = card.ManaCost - }; - } - - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - var response = - await http.GetStringAsync($"https://api.magicthegathering.io/v1/cards?name={Uri.EscapeDataString(search)}"); - - var responseObject = JsonConvert.DeserializeObject(response); - if (responseObject is null) - return Array.Empty(); - - var cards = responseObject.Cards.Take(5).ToArray(); - if (cards.Length == 0) - return Array.Empty(); - - return await cards.Select(GetMtgDataAsync).WhenAll(); - } - - public async Task GetHearthstoneCardDataAsync(string name) - { - name = name.ToLowerInvariant(); - return await _c.GetOrAddAsync($"hearthstone:{name}", - () => HearthstoneCardDataFactory(name), - TimeSpan.FromDays(1)); - } - - private async Task HearthstoneCardDataFactory(string name) - { - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - http.DefaultRequestHeaders.Add("x-rapidapi-key", _creds.GetCreds().RapidApiKey); - try - { - var response = await http.GetStringAsync("https://omgvamp-hearthstone-v1.p.rapidapi.com/" - + $"cards/search/{Uri.EscapeDataString(name)}"); - var objs = JsonConvert.DeserializeObject(response); - if (objs is null || objs.Length == 0) - return null; - var data = objs.FirstOrDefault(x => x.Collectible) - ?? objs.FirstOrDefault(x => !string.IsNullOrEmpty(x.PlayerClass)) ?? objs.FirstOrDefault(); - if (data is null) - return null; - if (!string.IsNullOrWhiteSpace(data.Img)) - data.Img = await _google.ShortenUrl(data.Img); - // if (!string.IsNullOrWhiteSpace(data.Text)) - // { - // var converter = new Converter(); - // data.Text = converter.Convert(data.Text); - // } - - return data; - } - catch (Exception ex) - { - Log.Error(ex, "Error getting Hearthstone Card: {ErrorMessage}", ex.Message); - return null; - } - } - - public async Task GetMovieDataAsync(string name) - { - name = name.Trim().ToLowerInvariant(); - return await _c.GetOrAddAsync(new($"movie:{name}"), - () => GetMovieDataFactory(name), - TimeSpan.FromDays(1)); - } - - private async Task GetMovieDataFactory(string name) - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync("https://omdbapi.nadeko.bot/" - + $"?t={name.Trim().Replace(' ', '+')}" - + "&y=" - + "&plot=full" - + "&r=json"); - var movie = JsonConvert.DeserializeObject(res); - if (movie?.Title is null) - return null; - movie.Poster = await _google.ShortenUrl(movie.Poster); - return movie; - } - - public async Task GetSteamAppIdByName(string query) - { - const string steamGameIdsKey = "steam_names_to_appid"; - - var gamesMap = await _c.GetOrAddAsync(new(steamGameIdsKey), - async () => - { - using var http = _httpFactory.CreateClient(); - - // https://api.steampowered.com/ISteamApps/GetAppList/v2/ - var gamesStr = await http.GetStringAsync("https://api.steampowered.com/ISteamApps/GetAppList/v2/"); - var apps = JsonConvert - .DeserializeAnonymousType(gamesStr, - new - { - applist = new - { - apps = new List() - } - })! - .applist.apps; - - return apps.OrderBy(x => x.Name, StringComparer.OrdinalIgnoreCase) - .GroupBy(x => x.Name) - .ToDictionary(x => x.Key, x => x.First().AppId); - }, - TimeSpan.FromHours(24)); - - if (gamesMap is null) - return -1; - - query = query.Trim(); - - var keyList = gamesMap.Keys.ToList(); - - var key = keyList.FirstOrDefault(x => x.Equals(query, StringComparison.OrdinalIgnoreCase)); - - if (key == default) - { - key = keyList.FirstOrDefault(x => x.StartsWith(query, StringComparison.OrdinalIgnoreCase)); - if (key == default) - return -1; - } - - return gamesMap[key]; - } - - public async Task> GetWikipediaPageAsync(string query) - { - query = query.Trim(); - if (string.IsNullOrEmpty(query)) - { - return ErrorType.InvalidInput; - } - - try - { - var result = await _c.GetOrAddAsync($"wikipedia_{query}", - async () => - { - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - - return await http.GetStringAsync( - "https://en.wikipedia.org/w/api.php?action=query" - + "&format=json" - + "&prop=info" - + "&redirects=1" - + "&formatversion=2" - + "&inprop=url" - + "&titles=" - + Uri.EscapeDataString(query)); - }, - TimeSpan.FromHours(1)) - .ConfigureAwait(false); - - var data = JsonConvert.DeserializeObject(result); - - if (data.Query.Pages is null || !data.Query.Pages.Any() || data.Query.Pages.First().Missing) - { - return ErrorType.NotFound; - } - - Log.Information("Sending wikipedia url for: {Query}", query); - - return new WikipediaReply - { - Data = new() - { - Url = data.Query.Pages[0].FullUrl, - } - }; - } - catch (Exception ex) - { - Log.Error(ex, "Error retrieving wikipedia data for: '{Query}'", query); - - return ErrorType.Unknown; - } - } - - public async Task> GetCatFactAsync() - { - using var http = _httpFactory.CreateClient(); - var response = await http.GetStringAsync("https://catfact.ninja/fact").ConfigureAwait(false); - - var doc = JsonDocument.Parse(response); - - - if (!doc.RootElement.TryGetProperty("fact", out var factElement)) - { - return ErrorType.Unknown; - } - - return factElement.ToString(); - } - - public async Task> GetWikiaPageAsync(string target, string query) - { - if (string.IsNullOrWhiteSpace(target) || string.IsNullOrWhiteSpace(query)) - { - return ErrorType.InvalidInput; - } - - query = Uri.EscapeDataString(query.Trim()); - target = Uri.EscapeDataString(target.Trim()); - - if (string.IsNullOrEmpty(query)) - { - return ErrorType.InvalidInput; - } - - using var http = _httpFactory.CreateClient(); - http.DefaultRequestHeaders.Clear(); - try - { - var res = await http.GetStringAsync($"https://{Uri.EscapeDataString(target)}.fandom.com/api.php" - + "?action=query" - + "&format=json" - + "&list=search" - + $"&srsearch={Uri.EscapeDataString(query)}" - + "&srlimit=1"); - var items = JObject.Parse(res); - var title = items["query"]?["search"]?.FirstOrDefault()?["title"]?.ToString(); - - if (string.IsNullOrWhiteSpace(title)) - { - return ErrorType.NotFound; - } - - var url = $"https://{target}.fandom.com/wiki/{title}"; - - return new WikiaResponse() - { - Url = url, - Title = title, - }; - } - catch (Exception ex) - { - Log.Warning(ex, "Error getting wikia page: {Message}", ex.Message); - return ErrorType.Unknown; - } - } - - private static TypedKey GetDefineKey(string query) - => new TypedKey($"define_{query}"); - - public async Task, ErrorType>> GetDefinitionsAsync(string query) - { - if (string.IsNullOrEmpty(query)) - { - return ErrorType.InvalidInput; - } - - query = Uri.EscapeDataString(query); - - using var http = _httpFactory.CreateClient(); - string res; - try - { - res = await _c.GetOrAddAsync(GetDefineKey(query), - async () => await http.GetStringAsync( - $"https://api.pearson.com/v2/dictionaries/entries?headword={query}"), - TimeSpan.FromHours(12)); - - var responseModel = JsonConvert.DeserializeObject(res); - - var data = responseModel.Results - .Where(x => x.Senses is not null - && x.Senses.Count > 0 - && x.Senses[0].Definition is not null) - .Select(x => (Sense: x.Senses[0], x.PartOfSpeech)) - .ToList(); - - if (!data.Any()) - { - Log.Warning("Definition not found: {Word}", query); - return ErrorType.NotFound; - } - - var items = new List(); - - foreach (var d in data) - { - items.Add(new DefineData - { - Definition = d.Sense.Definition is JArray { Count: > 0 } defs - ? defs[0].ToString() - : d.Sense.Definition.ToString(), - Example = d.Sense.Examples is null || d.Sense.Examples.Count == 0 - ? string.Empty - : d.Sense.Examples[0].Text, - WordType = string.IsNullOrWhiteSpace(d.PartOfSpeech) ? "-" : d.PartOfSpeech, - Word = query, - }); - } - - return items.OrderByDescending(x => !string.IsNullOrWhiteSpace(x.Example)).ToList(); - } - catch (Exception ex) - { - Log.Error(ex, "Error retrieving definition data for: {Word}", query); - return ErrorType.Unknown; - } - } - - public async Task ShortenLink(string query) - { - query = query.Trim(); - - if (_cachedShortenedLinks.TryGetValue(query, out var shortLink)) - return shortLink; - - try - { - using var http = _httpFactory.CreateClient(); - using var req = new HttpRequestMessage(HttpMethod.Post, "https://goolnk.com/api/v1/shorten"); - var formData = new MultipartFormDataContent - { - { new StringContent(query), "url" } - }; - req.Content = formData; - - using var res = await http.SendAsync(req); - var content = await res.Content.ReadAsStringAsync(); - var data = JsonConvert.DeserializeObject(content); - - if (!string.IsNullOrWhiteSpace(data?.ResultUrl)) - _cachedShortenedLinks.TryAdd(query, data.ResultUrl); - else - return query; - - shortLink = data.ResultUrl; - } - catch (Exception ex) - { - Log.Error(ex, "Error shortening a link: {Message}", ex.Message); - return null; - } - - return shortLink; - throw new NotImplementedException(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs deleted file mode 100644 index ed260ae..0000000 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs +++ /dev/null @@ -1,195 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class StreamNotificationCommands : EllieModule - { - private readonly DbService _db; - - public StreamNotificationCommands(DbService db) - => _db = db; - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task StreamAdd(string link) - { - var data = await _service.FollowStream(ctx.Guild.Id, ctx.Channel.Id, link); - if (data is null) - { - await Response().Error(strs.stream_not_added).SendAsync(); - return; - } - - var embed = _service.GetEmbed(ctx.Guild.Id, data); - await Response() - .Embed(embed) - .Text(strs.stream_tracked) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - [Priority(1)] - public async Task StreamRemove(int index) - { - if (--index < 0) - return; - - var fs = await _service.UnfollowStreamAsync(ctx.Guild.Id, index); - if (fs is null) - { - await Response().Error(strs.stream_no).SendAsync(); - return; - } - - await Response().Confirm(strs.stream_removed(Format.Bold(fs.Username), fs.Type)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - public async Task StreamsClear() - { - await _service.ClearAllStreams(ctx.Guild.Id); - await Response().Confirm(strs.streams_cleared).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task StreamList(int page = 1) - { - if (page-- < 1) - return; - - var allStreams = await _service.GetAllStreamsAsync((SocketGuild)ctx.Guild); - - await Response() - .Paginated() - .Items(allStreams) - .PageSize(12) - .CurrentPage(page) - .Page((elements, cur) => - { - if (elements.Count == 0) - return _sender.CreateEmbed().WithDescription(GetText(strs.streams_none)).WithErrorColor(); - - var eb = _sender.CreateEmbed().WithTitle(GetText(strs.streams_follow_title)).WithOkColor(); - for (var index = 0; index < elements.Count; index++) - { - var elem = elements[index]; - eb.AddField($"**#{index + 1 + (12 * cur)}** {elem.Username.ToLower()}", - $"【{elem.Type}】\n<#{elem.ChannelId}>\n{elem.Message?.TrimTo(50)}", - true); - } - - return eb; - }) - .SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task StreamOffline() - { - var newValue = _service.ToggleStreamOffline(ctx.Guild.Id); - if (newValue) - await Response().Confirm(strs.stream_off_enabled).SendAsync(); - else - await Response().Confirm(strs.stream_off_disabled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task StreamOnlineDelete() - { - var newValue = _service.ToggleStreamOnlineDelete(ctx.Guild.Id); - if (newValue) - await Response().Confirm(strs.stream_online_delete_enabled).SendAsync(); - else - await Response().Confirm(strs.stream_online_delete_disabled).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task StreamMessage(int index, [Leftover] string message) - { - if (--index < 0) - return; - - var canMentionEveryone = (ctx.User as IGuildUser)?.GuildPermissions.MentionEveryone ?? true; - if (!canMentionEveryone) - message = message?.SanitizeAllMentions(); - - if (!_service.SetStreamMessage(ctx.Guild.Id, index, message, out var fs)) - { - await Response().Confirm(strs.stream_not_following).SendAsync(); - return; - } - - if (string.IsNullOrWhiteSpace(message)) - await Response().Confirm(strs.stream_message_reset(Format.Bold(fs.Username))).SendAsync(); - else - await Response().Confirm(strs.stream_message_set(Format.Bold(fs.Username))).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageMessages)] - public async Task StreamMessageAll([Leftover] string message) - { - var canMentionEveryone = (ctx.User as IGuildUser)?.GuildPermissions.MentionEveryone ?? true; - if (!canMentionEveryone) - message = message?.SanitizeAllMentions(); - - var count = _service.SetStreamMessageForAll(ctx.Guild.Id, message); - - if (count == 0) - { - await Response().Confirm(strs.stream_not_following_any).SendAsync(); - return; - } - - await Response().Confirm(strs.stream_message_set_all(count)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task StreamCheck(string url) - { - try - { - var data = await _service.GetStreamDataAsync(url); - if (data is null) - { - await Response().Error(strs.no_channel_found).SendAsync(); - return; - } - - if (data.IsLive) - { - await Response() - .Confirm(strs.streamer_online(Format.Bold(data.Name), - Format.Bold(data.Viewers.ToString()))) - .SendAsync(); - } - else - await Response().Confirm(strs.streamer_offline(data.Name)).SendAsync(); - } - catch - { - await Response().Error(strs.no_channel_found).SendAsync(); - } - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs deleted file mode 100644 index 03bcb13..0000000 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs +++ /dev/null @@ -1,671 +0,0 @@ -#nullable disable -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using EllieBot.Modules.Searches.Common; -using EllieBot.Modules.Searches.Common.StreamNotifications; - -namespace EllieBot.Modules.Searches.Services; - -public sealed class StreamNotificationService : IEService, IReadyExecutor -{ - private readonly DbService _db; - private readonly IBotStrings _strings; - private readonly Random _rng = new EllieRandom(); - private readonly DiscordSocketClient _client; - private readonly NotifChecker _streamTracker; - - private readonly object _shardLock = new(); - - private readonly Dictionary> _trackCounter = new(); - - private readonly Dictionary>> _shardTrackedStreams; - private readonly ConcurrentHashSet _offlineNotificationServers; - private readonly ConcurrentHashSet _deleteOnOfflineServers; - - private readonly IPubSub _pubSub; - private readonly IMessageSenderService _sender; - private readonly SearchesConfigService _config; - private readonly IReplacementService _repSvc; - - public TypedKey> StreamsOnlineKey { get; } - public TypedKey> StreamsOfflineKey { get; } - - private readonly TypedKey _streamFollowKey; - private readonly TypedKey _streamUnfollowKey; - - public event Func< - FollowedStream.FType, - string, - IReadOnlyCollection<(ulong, ulong)>, - Task> OnlineMessagesSent = static delegate { return Task.CompletedTask; }; - - public StreamNotificationService( - DbService db, - DiscordSocketClient client, - IBotStrings strings, - IBotCredsProvider creds, - IHttpClientFactory httpFactory, - IBot bot, - IPubSub pubSub, - IMessageSenderService sender, - SearchesConfigService config, - IReplacementService repSvc) - { - _db = db; - _client = client; - _strings = strings; - _pubSub = pubSub; - _sender = sender; - _config = config; - _repSvc = repSvc; - - _streamTracker = new(httpFactory, creds); - - StreamsOnlineKey = new("streams.online"); - StreamsOfflineKey = new("streams.offline"); - - _streamFollowKey = new("stream.follow"); - _streamUnfollowKey = new("stream.unfollow"); - - using (var uow = db.GetDbContext()) - { - var ids = client.GetGuildIds(); - var guildConfigs = uow.Set() - .AsQueryable() - .Include(x => x.FollowedStreams) - .Where(x => ids.Contains(x.GuildId)) - .ToList(); - - _offlineNotificationServers = new(guildConfigs - .Where(gc => gc.NotifyStreamOffline) - .Select(x => x.GuildId) - .ToList()); - - _deleteOnOfflineServers = new(guildConfigs - .Where(gc => gc.DeleteStreamOnlineMessage) - .Select(x => x.GuildId) - .ToList()); - - var followedStreams = guildConfigs.SelectMany(x => x.FollowedStreams).ToList(); - - _shardTrackedStreams = followedStreams.GroupBy(x => new - { - x.Type, - Name = x.Username.ToLower() - }) - .ToList() - .ToDictionary( - x => new StreamDataKey(x.Key.Type, x.Key.Name.ToLower()), - x => x.GroupBy(y => y.GuildId) - .ToDictionary(y => y.Key, - y => y.AsEnumerable().ToHashSet())); - - // shard 0 will keep track of when there are no more guilds which track a stream - if (client.ShardId == 0) - { - var allFollowedStreams = uow.Set().AsQueryable().ToList(); - - foreach (var fs in allFollowedStreams) - _streamTracker.AddLastData(fs.CreateKey(), null, false); - - _trackCounter = allFollowedStreams.GroupBy(x => new - { - x.Type, - Name = x.Username.ToLower() - }) - .ToDictionary(x => new StreamDataKey(x.Key.Type, x.Key.Name), - x => x.Select(fs => fs.GuildId).ToHashSet()); - } - } - - _pubSub.Sub(StreamsOfflineKey, HandleStreamsOffline); - _pubSub.Sub(StreamsOnlineKey, HandleStreamsOnline); - - if (client.ShardId == 0) - { - // only shard 0 will run the tracker, - // and then publish updates with redis to other shards - _streamTracker.OnStreamsOffline += OnStreamsOffline; - _streamTracker.OnStreamsOnline += OnStreamsOnline; - _ = _streamTracker.RunAsync(); - - _pubSub.Sub(_streamFollowKey, HandleFollowStream); - _pubSub.Sub(_streamUnfollowKey, HandleUnfollowStream); - } - - bot.JoinedGuild += ClientOnJoinedGuild; - client.LeftGuild += ClientOnLeftGuild; - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30)); - while (await timer.WaitForNextTickAsync()) - { - try - { - var errorLimit = TimeSpan.FromHours(12); - var failingStreams = _streamTracker.GetFailingStreams(errorLimit, true).ToList(); - - if (!failingStreams.Any()) - continue; - - var deleteGroups = failingStreams.GroupBy(x => x.Type) - .ToDictionary(x => x.Key, x => x.Select(y => y.Name).ToList()); - - await using var uow = _db.GetDbContext(); - foreach (var kvp in deleteGroups) - { - Log.Information( - "Deleting {StreamCount} {Platform} streams because they've been erroring for more than {ErrorLimit}: {RemovedList}", - kvp.Value.Count, - kvp.Key, - errorLimit, - string.Join(", ", kvp.Value)); - - var toDelete = uow.Set() - .AsQueryable() - .Where(x => x.Type == kvp.Key && kvp.Value.Contains(x.Username)) - .ToList(); - - uow.RemoveRange(toDelete); - await uow.SaveChangesAsync(); - - foreach (var loginToDelete in kvp.Value) - _streamTracker.UntrackStreamByKey(new(kvp.Key, loginToDelete)); - } - } - catch (Exception ex) - { - Log.Error(ex, "Error cleaning up FollowedStreams"); - } - } - } - - /// - /// Handles follow stream pubs to keep the counter up to date. - /// When counter reaches 0, stream is removed from tracking because - /// that means no guilds are subscribed to that stream anymore - /// - private ValueTask HandleFollowStream(FollowStreamPubData info) - { - _streamTracker.AddLastData(info.Key, null, false); - lock (_shardLock) - { - var key = info.Key; - if (_trackCounter.ContainsKey(key)) - _trackCounter[key].Add(info.GuildId); - else - { - _trackCounter[key] = [info.GuildId]; - } - } - - return default; - } - - /// - /// Handles unfollow pubs to keep the counter up to date. - /// When counter reaches 0, stream is removed from tracking because - /// that means no guilds are subscribed to that stream anymore - /// - private ValueTask HandleUnfollowStream(FollowStreamPubData info) - { - lock (_shardLock) - { - var key = info.Key; - if (!_trackCounter.TryGetValue(key, out var set)) - { - // it should've been removed already? - _streamTracker.UntrackStreamByKey(in key); - return default; - } - - set.Remove(info.GuildId); - if (set.Count != 0) - return default; - - _trackCounter.Remove(key); - // if no other guilds are following this stream - // untrack the stream - _streamTracker.UntrackStreamByKey(in key); - } - - return default; - } - - private async ValueTask HandleStreamsOffline(List offlineStreams) - { - foreach (var stream in offlineStreams) - { - var key = stream.CreateKey(); - if (_shardTrackedStreams.TryGetValue(key, out var fss)) - { - await fss - // send offline stream notifications only to guilds which enable it with .stoff - .SelectMany(x => x.Value) - .Where(x => _offlineNotificationServers.Contains(x.GuildId)) - .Select(fs => - { - var ch = _client.GetGuild(fs.GuildId) - ?.GetTextChannel(fs.ChannelId); - - if (ch is null) - return Task.CompletedTask; - - return _sender.Response(ch).Embed(GetEmbed(fs.GuildId, stream)).SendAsync(); - }) - .WhenAll(); - } - } - } - - - private async ValueTask HandleStreamsOnline(List onlineStreams) - { - foreach (var stream in onlineStreams) - { - var key = stream.CreateKey(); - if (_shardTrackedStreams.TryGetValue(key, out var fss)) - { - var messages = await fss.SelectMany(x => x.Value) - .Select(async fs => - { - var textChannel = _client.GetGuild(fs.GuildId) - ?.GetTextChannel(fs.ChannelId); - - if (textChannel is null) - return default; - - var repCtx = new ReplacementContext(guild: textChannel.Guild, - client: _client) - .WithOverride("%platform%", () => fs.Type.ToString()); - - - var message = string.IsNullOrWhiteSpace(fs.Message) - ? "" - : await _repSvc.ReplaceAsync(fs.Message, repCtx); - - var msg = await _sender.Response(textChannel) - .Embed(GetEmbed(fs.GuildId, stream, false)) - .Text(message) - .Sanitize(false) - .SendAsync(); - - // only cache the ids of channel/message pairs - if (_deleteOnOfflineServers.Contains(fs.GuildId)) - return (textChannel.Id, msg.Id); - else - return default; - }) - .WhenAll(); - - - // push online stream messages to redis - // when streams go offline, any server which - // has the online stream message deletion feature - // enabled will have the online messages deleted - try - { - var pairs = messages - .Where(x => x != default) - .Select(x => (x.Item1, x.Item2)) - .ToList(); - - if (pairs.Count > 0) - await OnlineMessagesSent(key.Type, key.Name, pairs); - } - catch - { - } - } - } - } - - private Task OnStreamsOnline(List data) - => _pubSub.Pub(StreamsOnlineKey, data); - - private Task OnStreamsOffline(List data) - => _pubSub.Pub(StreamsOfflineKey, data); - - private Task ClientOnJoinedGuild(GuildConfig guildConfig) - { - using (var uow = _db.GetDbContext()) - { - var gc = uow.Set() - .AsQueryable() - .Include(x => x.FollowedStreams) - .FirstOrDefault(x => x.GuildId == guildConfig.GuildId); - - if (gc is null) - return Task.CompletedTask; - - if (gc.NotifyStreamOffline) - _offlineNotificationServers.Add(gc.GuildId); - - foreach (var followedStream in gc.FollowedStreams) - { - var key = followedStream.CreateKey(); - var streams = GetLocalGuildStreams(key, gc.GuildId); - streams.Add(followedStream); - PublishFollowStream(followedStream); - } - } - - return Task.CompletedTask; - } - - private Task ClientOnLeftGuild(SocketGuild guild) - { - using (var uow = _db.GetDbContext()) - { - var gc = uow.GuildConfigsForId(guild.Id, set => set.Include(x => x.FollowedStreams)); - - _offlineNotificationServers.TryRemove(gc.GuildId); - - foreach (var followedStream in gc.FollowedStreams) - { - var streams = GetLocalGuildStreams(followedStream.CreateKey(), guild.Id); - streams.Remove(followedStream); - - PublishUnfollowStream(followedStream); - } - } - - return Task.CompletedTask; - } - - public async Task ClearAllStreams(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FollowedStreams)); - uow.RemoveRange(gc.FollowedStreams); - - foreach (var s in gc.FollowedStreams) - await PublishUnfollowStream(s); - - uow.SaveChanges(); - - return gc.FollowedStreams.Count; - } - - public async Task UnfollowStreamAsync(ulong guildId, int index) - { - FollowedStream fs; - await using (var uow = _db.GetDbContext()) - { - var fss = uow.Set() - .AsQueryable() - .Where(x => x.GuildId == guildId) - .OrderBy(x => x.Id) - .ToList(); - - // out of range - if (fss.Count <= index) - return null; - - fs = fss[index]; - uow.Remove(fs); - - await uow.SaveChangesAsync(); - - // remove from local cache - lock (_shardLock) - { - var key = fs.CreateKey(); - var streams = GetLocalGuildStreams(key, guildId); - streams.Remove(fs); - } - } - - await PublishUnfollowStream(fs); - - return fs; - } - - private void PublishFollowStream(FollowedStream fs) - => _pubSub.Pub(_streamFollowKey, - new() - { - Key = fs.CreateKey(), - GuildId = fs.GuildId - }); - - private Task PublishUnfollowStream(FollowedStream fs) - => _pubSub.Pub(_streamUnfollowKey, - new() - { - Key = fs.CreateKey(), - GuildId = fs.GuildId - }); - - public async Task FollowStream(ulong guildId, ulong channelId, string url) - { - // this will - var data = await _streamTracker.GetStreamDataByUrlAsync(url); - - if (data is null) - return null; - - FollowedStream fs; - await using (var uow = _db.GetDbContext()) - { - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FollowedStreams)); - - // add it to the database - fs = new() - { - Type = data.StreamType, - Username = data.UniqueName, - ChannelId = channelId, - GuildId = guildId - }; - - var config = _config.Data; - if (config.FollowedStreams.MaxCount is not -1 - && gc.FollowedStreams.Count >= config.FollowedStreams.MaxCount) - return null; - - gc.FollowedStreams.Add(fs); - await uow.SaveChangesAsync(); - - // add it to the local cache of tracked streams - // this way this shard will know it needs to post a message to discord - // when shard 0 publishes stream status changes for this stream - lock (_shardLock) - { - var key = data.CreateKey(); - var streams = GetLocalGuildStreams(key, guildId); - streams.Add(fs); - } - } - - PublishFollowStream(fs); - - return data; - } - - public EmbedBuilder GetEmbed(ulong guildId, StreamData status, bool showViewers = true) - { - var embed = _sender.CreateEmbed() - .WithTitle(status.Name) - .WithUrl(status.StreamUrl) - .WithDescription(status.StreamUrl) - .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true); - - if (showViewers) - { - embed.AddField(GetText(guildId, strs.viewers), - status.Viewers == 0 && !status.IsLive - ? "-" - : status.Viewers, - true); - } - - if (status.IsLive) - embed = embed.WithOkColor(); - else - embed = embed.WithErrorColor(); - - if (!string.IsNullOrWhiteSpace(status.Title)) - embed.WithAuthor(status.Title); - - if (!string.IsNullOrWhiteSpace(status.Game)) - embed.AddField(GetText(guildId, strs.streaming), status.Game, true); - - if (!string.IsNullOrWhiteSpace(status.AvatarUrl)) - embed.WithThumbnailUrl(status.AvatarUrl); - - if (!string.IsNullOrWhiteSpace(status.Preview)) - embed.WithImageUrl(status.Preview + "?dv=" + _rng.Next()); - - return embed; - } - - private string GetText(ulong guildId, LocStr str) - => _strings.GetText(str, guildId); - - public bool ToggleStreamOffline(ulong guildId) - { - bool newValue; - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - newValue = gc.NotifyStreamOffline = !gc.NotifyStreamOffline; - uow.SaveChanges(); - - if (newValue) - _offlineNotificationServers.Add(guildId); - else - _offlineNotificationServers.TryRemove(guildId); - - return newValue; - } - - public bool ToggleStreamOnlineDelete(ulong guildId) - { - using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set); - var newValue = gc.DeleteStreamOnlineMessage = !gc.DeleteStreamOnlineMessage; - uow.SaveChanges(); - - if (newValue) - _deleteOnOfflineServers.Add(guildId); - else - _deleteOnOfflineServers.TryRemove(guildId); - - return newValue; - } - - public Task GetStreamDataAsync(string url) - => _streamTracker.GetStreamDataByUrlAsync(url); - - private HashSet GetLocalGuildStreams(in StreamDataKey key, ulong guildId) - { - if (_shardTrackedStreams.TryGetValue(key, out var map)) - { - if (map.TryGetValue(guildId, out var set)) - return set; - return map[guildId] = []; - } - - _shardTrackedStreams[key] = new() - { - { guildId, [] } - }; - return _shardTrackedStreams[key][guildId]; - } - - public bool SetStreamMessage( - ulong guildId, - int index, - string message, - out FollowedStream fs) - { - using var uow = _db.GetDbContext(); - var fss = uow.Set().AsQueryable().Where(x => x.GuildId == guildId).OrderBy(x => x.Id).ToList(); - - if (fss.Count <= index) - { - fs = null; - return false; - } - - fs = fss[index]; - fs.Message = message; - lock (_shardLock) - { - var streams = GetLocalGuildStreams(fs.CreateKey(), guildId); - - // message doesn't participate in equality checking - // removing and adding = update - streams.Remove(fs); - streams.Add(fs); - } - - uow.SaveChanges(); - - return true; - } - - public int SetStreamMessageForAll(ulong guildId, string message) - { - using var uow = _db.GetDbContext(); - - var all = uow.Set() - .Where(x => x.GuildId == guildId) - .ToList(); - - if (all.Count == 0) - return 0; - - all.ForEach(x => x.Message = message); - - uow.SaveChanges(); - - lock (_shardLock) - { - foreach (var fs in all) - { - var streams = GetLocalGuildStreams(fs.CreateKey(), guildId); - - // message doesn't participate in equality checking - // removing and adding = update - streams.Remove(fs); - streams.Add(fs); - } - } - - return all.Count; - } - - public sealed class FollowStreamPubData - { - public StreamDataKey Key { get; init; } - public ulong GuildId { get; init; } - } - - public async Task> GetAllStreamsAsync(SocketGuild guild) - { - var allStreams = new List(); - await using var uow = _db.GetDbContext(); - var all = uow.GuildConfigsForId(guild.Id, set => set.Include(gc => gc.FollowedStreams)) - .FollowedStreams - .OrderBy(x => x.Id) - .ToList(); - - for (var index = all.Count - 1; index >= 0; index--) - { - var fs = all[index]; - if (guild.GetTextChannel(fs.ChannelId) is null) - await UnfollowStreamAsync(fs.GuildId, index); - else - allStreams.Insert(0, fs); - } - - return allStreams; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamOnlineMessageDeleterService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamOnlineMessageDeleterService.cs deleted file mode 100644 index ae51752..0000000 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamOnlineMessageDeleterService.cs +++ /dev/null @@ -1,99 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using EllieBot.Modules.Searches.Common; - -namespace EllieBot.Modules.Searches.Services; - -public sealed class StreamOnlineMessageDeleterService : IEService, IReadyExecutor -{ - private readonly StreamNotificationService _notifService; - private readonly DbService _db; - private readonly DiscordSocketClient _client; - private readonly IPubSub _pubSub; - - public StreamOnlineMessageDeleterService( - StreamNotificationService notifService, - DbService db, - IPubSub pubSub, - DiscordSocketClient client) - { - _notifService = notifService; - _db = db; - _client = client; - _pubSub = pubSub; - } - - public async Task OnReadyAsync() - { - _notifService.OnlineMessagesSent += OnOnlineMessagesSent; - - if (_client.ShardId == 0) - await _pubSub.Sub(_notifService.StreamsOfflineKey, OnStreamsOffline); - } - - private async Task OnOnlineMessagesSent( - FollowedStream.FType type, - string name, - IReadOnlyCollection<(ulong, ulong)> pairs) - { - await using var ctx = _db.GetDbContext(); - foreach (var (channelId, messageId) in pairs) - { - await ctx.GetTable() - .InsertAsync(() => new() - { - Name = name, - Type = type, - MessageId = messageId, - ChannelId = channelId, - DateAdded = DateTime.UtcNow, - }); - } - } - - private async ValueTask OnStreamsOffline(List streamDatas) - { - if (_client.ShardId != 0) - return; - - var pairs = await GetMessagesToDelete(streamDatas); - - foreach (var (channelId, messageId) in pairs) - { - try - { - var textChannel = await _client.GetChannelAsync(channelId) as ITextChannel; - if (textChannel is null) - continue; - - await textChannel.DeleteMessageAsync(messageId); - } - catch - { - continue; - } - } - } - - private async Task> GetMessagesToDelete(List streamDatas) - { - await using var ctx = _db.GetDbContext(); - - var toReturn = new List<(ulong, ulong)>(); - foreach (var sd in streamDatas) - { - var key = sd.CreateKey(); - var toDelete = await ctx.GetTable() - .Where(x => (x.Type == key.Type && x.Name == key.Name) - || Sql.DateDiff(Sql.DateParts.Day, x.DateAdded, DateTime.UtcNow) > 1) - .DeleteWithOutputAsync(); - - toReturn.AddRange(toDelete.Select(x => (x.ChannelId, x.MessageId))); - } - - return toReturn; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Translate/ITranslateService.cs b/src/EllieBot/Modules/Searches/Translate/ITranslateService.cs deleted file mode 100644 index 6766b6f..0000000 --- a/src/EllieBot/Modules/Searches/Translate/ITranslateService.cs +++ /dev/null @@ -1,17 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Searches; - -public interface ITranslateService -{ - public Task Translate(string source, string target, string text = null); - Task ToggleAtl(ulong guildId, ulong channelId, bool autoDelete); - IEnumerable GetLanguages(); - - Task RegisterUserAsync( - ulong userId, - ulong channelId, - string from, - string to); - - Task UnregisterUser(ulong channelId, ulong userId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Translate/TranslateService.cs b/src/EllieBot/Modules/Searches/Translate/TranslateService.cs deleted file mode 100644 index 9f50615..0000000 --- a/src/EllieBot/Modules/Searches/Translate/TranslateService.cs +++ /dev/null @@ -1,224 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using System.Net; - -namespace EllieBot.Modules.Searches; - -public sealed class TranslateService : ITranslateService, IExecNoCommand, IReadyExecutor, IEService -{ - private readonly IGoogleApiService _google; - private readonly DbService _db; - private readonly IMessageSenderService _sender; - private readonly IBot _bot; - - private readonly ConcurrentDictionary _atcs = new(); - private readonly ConcurrentDictionary> _users = new(); - - public TranslateService( - IGoogleApiService google, - DbService db, - IMessageSenderService sender, - IBot bot) - { - _google = google; - _db = db; - _sender = sender; - _bot = bot; - } - - public async Task OnReadyAsync() - { - List cs; - await using (var ctx = _db.GetDbContext()) - { - var guilds = _bot.AllGuildConfigs.Select(x => x.GuildId).ToList(); - cs = await ctx.Set().Include(x => x.Users) - .Where(x => guilds.Contains(x.GuildId)) - .ToListAsyncEF(); - } - - foreach (var c in cs) - { - _atcs[c.ChannelId] = c.AutoDelete; - _users[c.ChannelId] = - new(c.Users.ToDictionary(x => x.UserId, x => (x.Source.ToLower(), x.Target.ToLower()))); - } - } - - - public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) - { - if (string.IsNullOrWhiteSpace(msg.Content)) - return; - - if (msg is { Channel: ITextChannel tch } um) - { - if (!_atcs.TryGetValue(tch.Id, out var autoDelete)) - return; - - if (!_users.TryGetValue(tch.Id, out var users) || !users.TryGetValue(um.Author.Id, out var langs)) - return; - - var output = await _google.Translate(msg.Content, langs.From, langs.To); - - if (string.IsNullOrWhiteSpace(output) - || msg.Content.Equals(output, StringComparison.InvariantCultureIgnoreCase)) - return; - - var embed = _sender.CreateEmbed().WithOkColor(); - - if (autoDelete) - { - embed.WithAuthor(um.Author.ToString(), um.Author.GetAvatarUrl()) - .AddField(langs.From, um.Content) - .AddField(langs.To, output); - - await _sender.Response(tch).Embed(embed).SendAsync(); - - try - { - await um.DeleteAsync(); - } - catch (HttpException ex) when (ex.HttpCode == HttpStatusCode.Forbidden) - { - _atcs.TryUpdate(tch.Id, false, true); - } - - return; - } - - await um.ReplyAsync(embed: embed.AddField(langs.To, output).Build(), allowedMentions: AllowedMentions.None); - } - } - - public async Task Translate(string source, string target, string text = null) - { - if (string.IsNullOrWhiteSpace(text)) - throw new ArgumentException("Text is empty or null", nameof(text)); - - var res = await _google.Translate(text, source.ToLowerInvariant(), target.ToLowerInvariant()); - return res.SanitizeMentions(true); - } - - public async Task ToggleAtl(ulong guildId, ulong channelId, bool autoDelete) - { - await using var ctx = _db.GetDbContext(); - - var old = await ctx.Set().ToLinqToDBTable() - .FirstOrDefaultAsyncLinqToDB(x => x.ChannelId == channelId); - - if (old is null) - { - ctx.Set().Add(new() - { - GuildId = guildId, - ChannelId = channelId, - AutoDelete = autoDelete - }); - - await ctx.SaveChangesAsync(); - - _atcs[channelId] = autoDelete; - _users[channelId] = new(); - - return true; - } - - // if autodelete value is different, update the autodelete value - // instead of disabling - if (old.AutoDelete != autoDelete) - { - old.AutoDelete = autoDelete; - await ctx.SaveChangesAsync(); - _atcs[channelId] = autoDelete; - return true; - } - - await ctx.Set().ToLinqToDBTable().DeleteAsync(x => x.ChannelId == channelId); - - await ctx.SaveChangesAsync(); - _atcs.TryRemove(channelId, out _); - _users.TryRemove(channelId, out _); - - return false; - } - - - private void UpdateUser( - ulong channelId, - ulong userId, - string from, - string to) - { - var dict = _users.GetOrAdd(channelId, new ConcurrentDictionary()); - dict[userId] = (from, to); - } - - public async Task RegisterUserAsync( - ulong userId, - ulong channelId, - string from, - string to) - { - if (!_google.Languages.ContainsKey(from) || !_google.Languages.ContainsKey(to)) - return null; - - await using var ctx = _db.GetDbContext(); - var ch = await ctx.Set().GetByChannelId(channelId); - - if (ch is null) - return null; - - var user = ch.Users.FirstOrDefault(x => x.UserId == userId); - - if (user is null) - { - ch.Users.Add(user = new() - { - Source = from, - Target = to, - UserId = userId - }); - - await ctx.SaveChangesAsync(); - - UpdateUser(channelId, userId, from, to); - - return true; - } - - // if it's different from old settings, update - if (user.Source != from || user.Target != to) - { - user.Source = from; - user.Target = to; - - await ctx.SaveChangesAsync(); - - UpdateUser(channelId, userId, from, to); - - return true; - } - - return await UnregisterUser(channelId, userId); - } - - public async Task UnregisterUser(ulong channelId, ulong userId) - { - await using var ctx = _db.GetDbContext(); - var rows = await ctx.Set().ToLinqToDBTable() - .DeleteAsync(x => x.UserId == userId && x.Channel.ChannelId == channelId); - - if (_users.TryGetValue(channelId, out var inner)) - inner.TryRemove(userId, out _); - - return rows > 0; - } - - public IEnumerable GetLanguages() - => _google.Languages.GroupBy(x => x.Value).Select(x => $"{x.AsEnumerable().Select(y => y.Key).Join(", ")}"); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs b/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs deleted file mode 100644 index 348ca61..0000000 --- a/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs +++ /dev/null @@ -1,95 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class TranslateCommands : EllieModule - { - public enum AutoDeleteAutoTranslate - { - Del, - Nodel - } - - [Cmd] - public async Task Translate(string fromLang, string toLang, [Leftover] string text = null) - { - try - { - await ctx.Channel.TriggerTypingAsync(); - var translation = await _service.Translate(fromLang, toLang, text); - - var embed = _sender.CreateEmbed().WithOkColor().AddField(fromLang, text).AddField(toLang, translation); - - await Response().Embed(embed).SendAsync(); - } - catch - { - await Response().Error(strs.bad_input_format).SendAsync(); - } - } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] - [BotPerm(ChannelPerm.ManageMessages)] - [OwnerOnly] - public async Task AutoTranslate(AutoDeleteAutoTranslate autoDelete = AutoDeleteAutoTranslate.Nodel) - { - var toggle = - await _service.ToggleAtl(ctx.Guild.Id, ctx.Channel.Id, autoDelete == AutoDeleteAutoTranslate.Del); - if (toggle) - await Response().Confirm(strs.atl_started).SendAsync(); - else - await Response().Confirm(strs.atl_stopped).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AutoTransLang() - { - if (await _service.UnregisterUser(ctx.Channel.Id, ctx.User.Id)) - await Response().Confirm(strs.atl_removed).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task AutoTransLang(string fromLang, string toLang) - { - var succ = await _service.RegisterUserAsync(ctx.User.Id, ctx.Channel.Id, fromLang.ToLower(), toLang.ToLower()); - - if (succ is null) - { - await Response().Error(strs.atl_not_enabled).SendAsync(); - return; - } - - if (succ is false) - { - await Response().Error(strs.invalid_lang).SendAsync(); - return; - } - - await Response().Confirm(strs.atl_set(fromLang, toLang)).SendAsync(); - } - - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task Translangs() - { - var langs = _service.GetLanguages().ToList(); - - var eb = _sender.CreateEmbed() - .WithTitle(GetText(strs.supported_languages)) - .WithOkColor(); - - foreach (var chunk in langs.Chunk(15)) - { - eb.AddField("󠀁", chunk.Join("\n"), inline: true); - } - - await Response().Embed(eb).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/XkcdCommands.cs b/src/EllieBot/Modules/Searches/XkcdCommands.cs deleted file mode 100644 index d913a87..0000000 --- a/src/EllieBot/Modules/Searches/XkcdCommands.cs +++ /dev/null @@ -1,97 +0,0 @@ -#nullable disable -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class XkcdCommands : EllieModule - { - private const string XKCD_URL = "https://xkcd.com"; - private readonly IHttpClientFactory _httpFactory; - - public XkcdCommands(IHttpClientFactory factory) - => _httpFactory = factory; - - [Cmd] - [Priority(0)] - public async Task Xkcd(string arg = null) - { - if (arg?.ToLowerInvariant().Trim() == "latest") - { - try - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync($"{XKCD_URL}/info.0.json"); - var comic = JsonConvert.DeserializeObject(res); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithImageUrl(comic.ImageLink) - .WithAuthor(comic.Title, "https://xkcd.com/s/919f27.ico", $"{XKCD_URL}/{comic.Num}") - .AddField(GetText(strs.comic_number), comic.Num.ToString(), true) - .AddField(GetText(strs.date), $"{comic.Month}/{comic.Year}", true); - var sent = await Response().Embed(embed).SendAsync(); - - await Task.Delay(10000); - - await sent.ModifyAsync(m => m.Embed = embed.AddField("Alt", comic.Alt).Build()); - } - catch (HttpRequestException) - { - await Response().Error(strs.comic_not_found).SendAsync(); - } - - return; - } - - await Xkcd(new EllieRandom().Next(1, 1750)); - } - - [Cmd] - [Priority(1)] - public async Task Xkcd(int num) - { - if (num < 1) - return; - try - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync($"{XKCD_URL}/{num}/info.0.json"); - - var comic = JsonConvert.DeserializeObject(res); - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithImageUrl(comic.ImageLink) - .WithAuthor(comic.Title, "https://xkcd.com/s/919f27.ico", $"{XKCD_URL}/{num}") - .AddField(GetText(strs.comic_number), comic.Num.ToString(), true) - .AddField(GetText(strs.date), $"{comic.Month}/{comic.Year}", true); - - var sent = await Response().Embed(embed).SendAsync(); - - await Task.Delay(10000); - - await sent.ModifyAsync(m => m.Embed = embed.AddField("Alt", comic.Alt).Build()); - } - catch (HttpRequestException) - { - await Response().Error(strs.comic_not_found).SendAsync(); - } - } - } - - public class XkcdComic - { - public int Num { get; set; } - public string Month { get; set; } - public string Year { get; set; } - - [JsonProperty("safe_title")] - public string Title { get; set; } - - [JsonProperty("img")] - public string ImageLink { get; set; } - - public string Alt { get; set; } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/YoutubeTrack/YtTrackService.cs b/src/EllieBot/Modules/Searches/YoutubeTrack/YtTrackService.cs deleted file mode 100644 index 6cbe065..0000000 --- a/src/EllieBot/Modules/Searches/YoutubeTrack/YtTrackService.cs +++ /dev/null @@ -1,134 +0,0 @@ -#nullable disable - -// public class YtTrackService : IEService -// { -// private readonly IGoogleApiService _google; -// private readonly IHttpClientFactory httpClientFactory; -// private readonly DiscordSocketClient _client; -// private readonly DbService _db; -// private readonly ConcurrentDictionary>> followedChannels; -// private readonly ConcurrentDictionary _latestPublishes = new ConcurrentDictionary(); -// -// public YtTrackService(IGoogleApiService google, IHttpClientFactory httpClientFactory, DiscordSocketClient client, -// DbService db) -// { -// this._google = google; -// this.httpClientFactory = httpClientFactory; -// this._client = client; -// this._db = db; -// -// if (_client.ShardId == 0) -// { -// _ = CheckLoop(); -// } -// } -// -// public async Task CheckLoop() -// { -// while (true) -// { -// await Task.Delay(10000); -// using (var http = httpClientFactory.CreateClient()) -// { -// await followedChannels.Select(kvp => CheckChannel(kvp.Key, kvp.Value.SelectMany(x => x.Value).ToList())).WhenAll(); -// } -// } -// } -// -// /// -// /// Checks the specified youtube channel, and sends a message to all provided -// /// -// /// Id of the youtube channel -// /// Where to post updates if there is a new update -// private async Task CheckChannel(string youtubeChannelId, List followedChannels) -// { -// var latestVid = (await _google.GetLatestChannelVideosAsync(youtubeChannelId, 1)) -// .FirstOrDefault(); -// if (latestVid is null) -// { -// return; -// } -// -// if (_latestPublishes.TryGetValue(youtubeChannelId, out var latestPub) && latestPub >= latestVid.PublishedAt) -// { -// return; -// } -// _latestPublishes[youtubeChannelId] = latestVid.PublishedAt; -// -// foreach (var chObj in followedChannels) -// { -// var gCh = _client.GetChannel(chObj.ChannelId); -// if (gCh is ITextChannel ch) -// { -// var msg = latestVid.GetVideoUrl(); -// if (!string.IsNullOrWhiteSpace(chObj.UploadMessage)) -// msg = chObj.UploadMessage + Environment.NewLine + msg; -// -// await ch.SendMessageAsync(msg); -// } -// } -// } -// -// /// -// /// Starts posting updates on the specified discord channel when a new video is posted on the specified YouTube channel. -// /// -// /// Id of the discord guild -// /// Id of the discord channel -// /// Id of the youtube channel -// /// Message to post when a new video is uploaded, along with video URL -// /// Whether adding was successful -// public async Task ToggleChannelFollowAsync(ulong guildId, ulong channelId, string ytChannelId, string uploadMessage) -// { -// // to to see if we can get a video from that channel -// var vids = await _google.GetLatestChannelVideosAsync(ytChannelId, 1); -// if (vids.Count == 0) -// return false; -// -// using(var uow = _db.GetDbContext()) -// { -// var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.YtFollowedChannels)); -// -// // see if this yt channel was already followed on this discord channel -// var oldObj = gc.YtFollowedChannels -// .FirstOrDefault(x => x.ChannelId == channelId && x.YtChannelId == ytChannelId); -// -// if(oldObj is not null) -// { -// return false; -// } -// -// // can only add up to 10 tracked channels per server -// if (gc.YtFollowedChannels.Count >= 10) -// { -// return false; -// } -// -// var obj = new YtFollowedChannel -// { -// ChannelId = channelId, -// YtChannelId = ytChannelId, -// UploadMessage = uploadMessage -// }; -// -// // add to database -// gc.YtFollowedChannels.Add(obj); -// -// // add to the local cache: -// -// // get follows on all guilds -// var allGuildFollows = followedChannels.GetOrAdd(ytChannelId, new ConcurrentDictionary>()); -// // add to this guild's follows -// allGuildFollows.AddOrUpdate(guildId, -// new List(), -// (key, old) => -// { -// old.Add(obj); -// return old; -// }); -// -// await uow.SaveChangesAsync(); -// } -// -// return true; -// } -// } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/YoutubeTrack/YtUploadCommands.cs b/src/EllieBot/Modules/Searches/YoutubeTrack/YtUploadCommands.cs deleted file mode 100644 index 2439ad4..0000000 --- a/src/EllieBot/Modules/Searches/YoutubeTrack/YtUploadCommands.cs +++ /dev/null @@ -1,54 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - // [Group] - // public partial class YtTrackCommands : EllieModule - // { - // ; - // [RequireContext(ContextType.Guild)] - // public async Task YtFollow(string ytChannelId, [Leftover] string uploadMessage = null) - // { - // var succ = await _service.ToggleChannelFollowAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage); - // if(succ) - // { - // await Response().Confirm(strs.yt_follow_added).SendAsync(); - // } - // else - // { - // await Response().Confirm(strs.yt_follow_fail).SendAsync(); - // } - // } - // - // [EllieCommand, Usage, Description, Aliases] - // [RequireContext(ContextType.Guild)] - // public async Task YtTrackRm(int index) - // { - // //var succ = await _service.ToggleChannelTrackingAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage); - // //if (succ) - // //{ - // // await Response().Confirm(strs.yt_track_added).SendAsync(); - // //} - // //else - // //{ - // // await Response().Confirm(strs.yt_track_fail).SendAsync(); - // //} - // } - // - // [EllieCommand, Usage, Description, Aliases] - // [RequireContext(ContextType.Guild)] - // public async Task YtTrackList() - // { - // //var succ = await _service.ToggleChannelTrackingAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage); - // //if (succ) - // //{ - // // await Response().Confirm(strs.yt_track_added).SendAsync(); - // //} - // //else - // //{ - // // await Response().Confirm(strs.yt_track_fail).SendAsync(); - // //} - // } - // } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/AtlExtensions.cs b/src/EllieBot/Modules/Searches/_common/AtlExtensions.cs deleted file mode 100644 index e8ab960..0000000 --- a/src/EllieBot/Modules/Searches/_common/AtlExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -#nullable disable -using LinqToDB.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Searches; - -public static class AtlExtensions -{ - public static Task GetByChannelId(this IQueryable set, ulong channelId) - => set.Include(x => x.Users).FirstOrDefaultAsyncEF(x => x.ChannelId == channelId); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/ImgSearchEngine.cs b/src/EllieBot/Modules/Searches/_common/Config/ImgSearchEngine.cs deleted file mode 100644 index b34fb36..0000000 --- a/src/EllieBot/Modules/Searches/_common/Config/ImgSearchEngine.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public enum ImgSearchEngine -{ - Google, - Searx, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs deleted file mode 100644 index 8cb0227..0000000 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Cloneable; -using EllieBot.Common.Yml; - -namespace EllieBot.Modules.Searches; - -[Cloneable] -public partial class SearchesConfig : ICloneable -{ - [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 3; - - [Comment(""" - Which engine should .search command - 'google_scrape' - default. Scrapes the webpage for results. May break. Requires no api keys. - 'google' - official google api. Requires googleApiKey and google.searchId set in creds.yml - 'searx' - requires at least one searx instance specified in the 'searxInstances' property below - """)] - public WebSearchEngine WebSearchEngine { get; set; } = WebSearchEngine.Google_Scrape; - - [Comment(""" - Which engine should .image command use - 'google'- official google api. googleApiKey and google.imageSearchId set in creds.yml - 'searx' requires at least one searx instance specified in the 'searxInstances' property below - """)] - public ImgSearchEngine ImgSearchEngine { get; set; } = ImgSearchEngine.Google; - - - [Comment(""" - Which search provider will be used for the `.youtube` and `.q` commands. - - - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console - - - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow. - - - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables - - - `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property - """)] - public YoutubeSearcher YtProvider { get; set; } = YoutubeSearcher.Ytdlp; - - [Comment(""" - Set the searx instance urls in case you want to use 'searx' for either img or web search. - Ellie will use a random one for each request. - Use a fully qualified url. Example: `https://my-searx-instance.mydomain.com` - Instances specified must support 'format=json' query parameter. - - In case you're running your own searx instance, set - - search: - formats: - - json - - in 'searxng/settings.yml' on your server - - - If you're using a public instance, make sure that the instance you're using supports it (they usually don't) - """)] - public List SearxInstances { get; set; } = new List(); - - [Comment(""" - Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search - Ellie will use a random one for each request. - Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com - - Instances specified must have api available. - You check that by opening an api endpoint in your browser. For example: https://my-invidious-instance.mydomain.com/api/v1/trending - """)] - public List InvidiousInstances { get; set; } = new List(); - - [Comment("Maximum number of followed streams per server")] - public FollowedStreamConfig FollowedStreams { get; set; } = new FollowedStreamConfig(); -} - -public sealed class FollowedStreamConfig -{ - [Comment("Maximum number of streams that each server can follow. -1 for infinite")] - public int MaxCount { get; set; } = 10; -} - -public enum YoutubeSearcher -{ - YtDataApiv3, - Ytdl, - Ytdlp, - Invid, - Invidious = 3 -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs deleted file mode 100644 index 39ae3c6..0000000 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs +++ /dev/null @@ -1,66 +0,0 @@ -using EllieBot.Common.Configs; - -namespace EllieBot.Modules.Searches; - -public class SearchesConfigService : ConfigServiceBase -{ - private static string FILE_PATH = "data/searches.yml"; - private static readonly TypedKey _changeKey = new("config.searches.updated"); - - public override string Name - => "searches"; - - public SearchesConfigService(IConfigSeria serializer, IPubSub pubSub) - : base(FILE_PATH, serializer, pubSub, _changeKey) - { - AddParsedProp("webEngine", - sc => sc.WebSearchEngine, - ConfigParsers.InsensitiveEnum, - ConfigPrinters.ToString); - - AddParsedProp("imgEngine", - sc => sc.ImgSearchEngine, - ConfigParsers.InsensitiveEnum, - ConfigPrinters.ToString); - - AddParsedProp("ytProvider", - sc => sc.YtProvider, - ConfigParsers.InsensitiveEnum, - ConfigPrinters.ToString); - - AddParsedProp("followedStreams.maxCount", - sc => sc.FollowedStreams.MaxCount, - int.TryParse, - ConfigPrinters.ToString); - - Migrate(); - } - - private void Migrate() - { - if (data.Version < 1) - { - ModifyConfig(c => - { - c.Version = 1; - c.WebSearchEngine = WebSearchEngine.Google_Scrape; - }); - } - - if (data.Version < 2) - { - ModifyConfig(c => - { - c.Version = 2; - }); - } - - if (data.Version < 3) - { - ModifyConfig(c => - { - c.Version = 3; - }); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/WebSearchEngine.cs b/src/EllieBot/Modules/Searches/_common/Config/WebSearchEngine.cs deleted file mode 100644 index e924f03..0000000 --- a/src/EllieBot/Modules/Searches/_common/Config/WebSearchEngine.cs +++ /dev/null @@ -1,9 +0,0 @@ -// ReSharper disable InconsistentNaming -namespace EllieBot.Modules.Searches; - -public enum WebSearchEngine -{ - Google, - Google_Scrape, - Searx, -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/CryptoData.cs b/src/EllieBot/Modules/Searches/_common/CryptoData.cs deleted file mode 100644 index 6600b59..0000000 --- a/src/EllieBot/Modules/Searches/_common/CryptoData.cs +++ /dev/null @@ -1,66 +0,0 @@ -#nullable disable -using System.Text.Json.Serialization; - -namespace EllieBot.Modules.Searches.Common; - -public class CryptoResponse -{ - public List Data { get; set; } -} - -public class CmcQuote -{ - [JsonPropertyName("price")] - public double Price { get; set; } - - [JsonPropertyName("volume_24h")] - public double Volume24h { get; set; } - - // [JsonPropertyName("volume_change_24h")] - // public double VolumeChange24h { get; set; } - // - // [JsonPropertyName("percent_change_1h")] - // public double PercentChange1h { get; set; } - - [JsonPropertyName("percent_change_24h")] - public double PercentChange24h { get; set; } - - [JsonPropertyName("percent_change_7d")] - public double PercentChange7d { get; set; } - - [JsonPropertyName("market_cap")] - public double MarketCap { get; set; } - - [JsonPropertyName("market_cap_dominance")] - public double MarketCapDominance { get; set; } -} - -public class CmcResponseData -{ - [JsonPropertyName("id")] - public int Id { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("symbol")] - public string Symbol { get; set; } - - [JsonPropertyName("slug")] - public string Slug { get; set; } - - [JsonPropertyName("cmc_rank")] - public int CmcRank { get; set; } - - [JsonPropertyName("circulating_supply")] - public double? CirculatingSupply { get; set; } - - [JsonPropertyName("total_supply")] - public double? TotalSupply { get; set; } - - [JsonPropertyName("max_supply")] - public double? MaxSupply { get; set; } - - [JsonPropertyName("quote")] - public Dictionary Quote { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/DefineData.cs b/src/EllieBot/Modules/Searches/_common/DefineData.cs deleted file mode 100644 index 2698d50..0000000 --- a/src/EllieBot/Modules/Searches/_common/DefineData.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -namespace EllieBot.Modules.Searches.Services; - -public sealed class DefineData -{ - public required string Definition { get; init; } - public required string Example { get; init; } - public required string WordType { get; init; } - public required string Word { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/DefineModel.cs b/src/EllieBot/Modules/Searches/_common/DefineModel.cs deleted file mode 100644 index a0e2018..0000000 --- a/src/EllieBot/Modules/Searches/_common/DefineModel.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable disable -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches.Common; - -public class Audio -{ - public string Url { get; set; } -} - -public class Example -{ - public List